OpenPose
1.0.0rc2
OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
bodyPartConnectorCaffe.hpp
Go to the documentation of this file.
1
#ifndef OPENPOSE_POSE_BODY_PART_CONNECTOR_CAFFE_HPP
2
#define OPENPOSE_POSE_BODY_PART_CONNECTOR_CAFFE_HPP
3
4
#include <
openpose/core/common.hpp
>
5
#include <
openpose/pose/enumClasses.hpp
>
6
7
// PIMPL does not work here. Alternative:
8
// stackoverflow.com/questions/13978775/how-to-avoid-include-dependency-to-external-library?answertab=active#tab-top
9
namespace
caffe
10
{
11
template
<
typename
T>
class
Blob;
12
}
13
14
namespace
op
15
{
16
// It mostly follows the Caffe::layer implementation, so Caffe users can easily use it. However, in order to keep
17
// the compatibility with any generic Caffe version, we keep this 'layer' inside our library rather than in the
18
// Caffe code.
19
template
<
typename
T>
20
class
OP_API
BodyPartConnectorCaffe
21
{
22
public
:
23
explicit
BodyPartConnectorCaffe
();
24
25
~
BodyPartConnectorCaffe
();
26
27
virtual
void
Reshape(
const
std::vector
<
caffe::Blob<T>
*>& bottom);
28
29
virtual
inline
const
char
*
type
()
const
{
return
"BodyPartConnector"
; }
30
31
void
setPoseModel(
const
PoseModel
poseModel);
32
33
void
setInterMinAboveThreshold(
const
T interMinAboveThreshold);
34
35
void
setInterThreshold(
const
T interThreshold);
36
37
void
setMinSubsetCnt(
const
int
minSubsetCnt);
38
39
void
setMinSubsetScore(
const
T minSubsetScore);
40
41
void
setScaleNetToOutput(
const
T scaleNetToOutput);
42
43
virtual
void
Forward_cpu(
const
std::vector
<
caffe::Blob<T>
*>& bottom,
Array<T>
& poseKeypoints,
44
Array<T>
& poseScores);
45
46
virtual
void
Forward_gpu(
const
std::vector
<
caffe::Blob<T>
*>& bottom,
Array<T>
& poseKeypoints,
47
Array<T>
& poseScores);
48
49
virtual
void
Backward_cpu(
const
std::vector
<
caffe::Blob<T>
*>& top,
const
std::vector<bool>& propagate_down,
50
const
std::vector
<
caffe::Blob<T>
*>& bottom);
51
52
virtual
void
Backward_gpu(
const
std::vector
<
caffe::Blob<T>
*>& top,
const
std::vector<bool>& propagate_down,
53
const
std::vector
<
caffe::Blob<T>
*>& bottom);
54
55
private
:
56
PoseModel
mPoseModel;
57
T mInterMinAboveThreshold;
58
T mInterThreshold;
59
int
mMinSubsetCnt;
60
T mMinSubsetScore;
61
T mScaleNetToOutput;
62
std::array<int, 4> mHeatMapsSize;
63
std::array<int, 4> mPeaksSize;
64
std::array<int, 4> mTopSize;
65
// GPU auxiliary
66
unsigned
int
* pBodyPartPairsGpuPtr;
67
unsigned
int
* pMapIdxGpuPtr;
68
Array<T>
mFinalOutputCpu;
69
T* pFinalOutputGpuPtr;
70
71
DELETE_COPY
(
BodyPartConnectorCaffe
);
72
};
73
}
74
75
#endif // OPENPOSE_POSE_BODY_PART_CONNECTOR_CAFFE_HPP
DELETE_COPY
#define DELETE_COPY(className)
Definition:
macros.hpp:31
enumClasses.hpp
op::PoseModel
PoseModel
Definition:
enumClasses.hpp:9
common.hpp
op::BodyPartConnectorCaffe::type
virtual const char * type() const
Definition:
bodyPartConnectorCaffe.hpp:29
caffe::Blob
Definition:
macros.hpp:78
op::Array
Definition:
array.hpp:20
cl::vector
std::vector< T, Alloc > vector
Definition:
cl2.hpp:567
OP_API
#define OP_API
Definition:
macros.hpp:16
op::BodyPartConnectorCaffe
Definition:
bodyPartConnectorCaffe.hpp:20
include
openpose
pose
bodyPartConnectorCaffe.hpp
Generated by
1.8.6