OpenPose
1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
poseExtractorNet.hpp
Go to the documentation of this file.
1
#ifndef OPENPOSE_POSE_POSE_EXTRACTOR_NET_HPP
2
#define OPENPOSE_POSE_POSE_EXTRACTOR_NET_HPP
3
4
#include <atomic>
5
#include <
openpose/core/common.hpp
>
6
#include <
openpose/core/enumClasses.hpp
>
7
#include <
openpose/pose/poseParameters.hpp
>
8
9
namespace
op
10
{
11
class
OP_API
PoseExtractorNet
12
{
13
public
:
14
PoseExtractorNet
(
const
PoseModel
poseModel,
15
const
std::vector<HeatMapType>& heatMapTypes = {},
16
const
ScaleMode
heatMapScaleMode =
ScaleMode::ZeroToOneFixedAspect
,
17
const
bool
addPartCandidates =
false
,
18
const
bool
maximizePositives =
false
);
19
20
virtual
~PoseExtractorNet
();
21
22
void
initializationOnThread
();
23
24
virtual
void
forwardPass
(
25
const
std::vector<
Array<float>
>& inputNetData,
const
Point<int>
& inputDataSize,
26
const
std::vector<double>& scaleRatios = {1.f},
const
Array<float>
& poseNetOutput =
Array<float>
{}) = 0;
27
28
virtual
const
float
*
getCandidatesCpuConstPtr
()
const
= 0;
29
30
virtual
const
float
*
getCandidatesGpuConstPtr
()
const
= 0;
31
32
virtual
const
float
*
getHeatMapCpuConstPtr
()
const
= 0;
33
34
virtual
const
float
*
getHeatMapGpuConstPtr
()
const
= 0;
35
36
virtual
std::vector<int>
getHeatMapSize
()
const
= 0;
37
38
Array<float>
getHeatMapsCopy
()
const
;
39
40
std::vector<std::vector<std::array<float,3>>>
getCandidatesCopy
()
const
;
41
42
virtual
const
float
*
getPoseGpuConstPtr
()
const
= 0;
43
44
Array<float>
getPoseKeypoints
()
const
;
45
46
Array<float>
getPoseScores
()
const
;
47
48
float
getScaleNetToOutput
()
const
;
49
50
double
get
(
const
PoseProperty
property)
const
;
51
52
void
set
(
const
PoseProperty
property,
const
double
value);
53
54
void
increase
(
const
PoseProperty
property,
const
double
value);
55
56
void
clear
();
57
58
protected
:
59
const
PoseModel
mPoseModel
;
60
Point<int>
mNetOutputSize
;
61
Array<float>
mPoseKeypoints
;
62
Array<float>
mPoseScores
;
63
float
mScaleNetToOutput
;
64
65
void
checkThread
()
const
;
66
67
virtual
void
netInitializationOnThread
() = 0;
68
69
private
:
70
const
std::vector<HeatMapType> mHeatMapTypes;
71
const
ScaleMode
mHeatMapScaleMode;
72
const
bool
mAddPartCandidates;
73
std::array<std::atomic<double>, (int)
PoseProperty::Size
> mProperties;
74
std::thread::id mThreadId;
75
76
DELETE_COPY
(
PoseExtractorNet
);
77
};
78
}
79
80
#endif
// OPENPOSE_POSE_POSE_EXTRACTOR_NET_HPP
op::Array< float >
op::PoseExtractorNet
Definition:
poseExtractorNet.hpp:12
op::PoseExtractorNet::initializationOnThread
void initializationOnThread()
op::PoseExtractorNet::getCandidatesCpuConstPtr
virtual const float * getCandidatesCpuConstPtr() const =0
op::PoseExtractorNet::getPoseKeypoints
Array< float > getPoseKeypoints() const
op::PoseExtractorNet::clear
void clear()
op::PoseExtractorNet::getPoseScores
Array< float > getPoseScores() const
op::PoseExtractorNet::increase
void increase(const PoseProperty property, const double value)
op::PoseExtractorNet::getHeatMapSize
virtual std::vector< int > getHeatMapSize() const =0
op::PoseExtractorNet::mPoseScores
Array< float > mPoseScores
Definition:
poseExtractorNet.hpp:62
op::PoseExtractorNet::getPoseGpuConstPtr
virtual const float * getPoseGpuConstPtr() const =0
op::PoseExtractorNet::PoseExtractorNet
PoseExtractorNet(const PoseModel poseModel, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScaleMode=ScaleMode::ZeroToOneFixedAspect, const bool addPartCandidates=false, const bool maximizePositives=false)
op::PoseExtractorNet::getCandidatesCopy
std::vector< std::vector< std::array< float, 3 > > > getCandidatesCopy() const
op::PoseExtractorNet::mScaleNetToOutput
float mScaleNetToOutput
Definition:
poseExtractorNet.hpp:63
op::PoseExtractorNet::set
void set(const PoseProperty property, const double value)
op::PoseExtractorNet::getHeatMapCpuConstPtr
virtual const float * getHeatMapCpuConstPtr() const =0
op::PoseExtractorNet::checkThread
void checkThread() const
op::PoseExtractorNet::mPoseModel
const PoseModel mPoseModel
Definition:
poseExtractorNet.hpp:59
op::PoseExtractorNet::forwardPass
virtual void forwardPass(const std::vector< Array< float >> &inputNetData, const Point< int > &inputDataSize, const std::vector< double > &scaleRatios={1.f}, const Array< float > &poseNetOutput=Array< float >{})=0
op::PoseExtractorNet::~PoseExtractorNet
virtual ~PoseExtractorNet()
op::PoseExtractorNet::netInitializationOnThread
virtual void netInitializationOnThread()=0
op::PoseExtractorNet::get
double get(const PoseProperty property) const
op::PoseExtractorNet::mPoseKeypoints
Array< float > mPoseKeypoints
Definition:
poseExtractorNet.hpp:61
op::PoseExtractorNet::mNetOutputSize
Point< int > mNetOutputSize
Definition:
poseExtractorNet.hpp:60
op::PoseExtractorNet::getCandidatesGpuConstPtr
virtual const float * getCandidatesGpuConstPtr() const =0
op::PoseExtractorNet::getScaleNetToOutput
float getScaleNetToOutput() const
op::PoseExtractorNet::getHeatMapGpuConstPtr
virtual const float * getHeatMapGpuConstPtr() const =0
op::PoseExtractorNet::getHeatMapsCopy
Array< float > getHeatMapsCopy() const
common.hpp
enumClasses.hpp
OP_API
#define OP_API
Definition:
macros.hpp:18
DELETE_COPY
#define DELETE_COPY(className)
Definition:
macros.hpp:32
op
Definition:
cameraParameterReader.hpp:7
op::PoseProperty
PoseProperty
Definition:
enumClasses.hpp:33
op::PoseProperty::Size
@ Size
op::PoseModel
PoseModel
Definition:
enumClasses.hpp:10
op::ScaleMode
ScaleMode
Definition:
enumClasses.hpp:7
op::ScaleMode::ZeroToOneFixedAspect
@ ZeroToOneFixedAspect
poseParameters.hpp
op::Point< int >
include
openpose
pose
poseExtractorNet.hpp
Generated by
1.9.1