OpenPose
1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
faceExtractorNet.hpp
Go to the documentation of this file.
1
#ifndef OPENPOSE_FACE_FACE_EXTRACTOR_HPP
2
#define OPENPOSE_FACE_FACE_EXTRACTOR_HPP
3
4
#include <atomic>
5
#include <
openpose/core/common.hpp
>
6
#include <
openpose/core/enumClasses.hpp
>
7
8
namespace
op
9
{
13
class
OP_API
FaceExtractorNet
14
{
15
public
:
21
explicit
FaceExtractorNet
(
const
Point<int>
& netInputSize,
const
Point<int>
& netOutputSize,
22
const
std::vector<HeatMapType>& heatMapTypes = {},
23
const
ScaleMode
heatMapScaleMode =
ScaleMode::ZeroToOneFixedAspect
);
24
29
virtual
~FaceExtractorNet
();
30
35
void
initializationOnThread
();
36
45
virtual
void
forwardPass
(
const
std::vector<
Rectangle<float>
>& faceRectangles,
const
Matrix
& inputData) = 0;
46
47
Array<float>
getHeatMaps
()
const
;
48
56
Array<float>
getFaceKeypoints
()
const
;
57
58
bool
getEnabled
()
const
;
59
60
void
setEnabled
(
const
bool
enabled);
61
62
protected
:
63
const
Point<int>
mNetOutputSize
;
64
Array<float>
mFaceImageCrop
;
65
Array<float>
mFaceKeypoints
;
66
// HeatMaps parameters
67
Array<float>
mHeatMaps
;
68
const
ScaleMode
mHeatMapScaleMode
;
69
const
std::vector<HeatMapType>
mHeatMapTypes
;
70
// Temporarily disable it
71
std::atomic<bool>
mEnabled
;
72
73
virtual
void
netInitializationOnThread
() = 0;
74
75
private
:
76
// Init with thread
77
std::thread::id mThreadId;
78
79
void
checkThread()
const
;
80
81
DELETE_COPY
(
FaceExtractorNet
);
82
};
83
}
84
85
#endif
// OPENPOSE_FACE_FACE_EXTRACTOR_HPP
op::Array< float >
op::FaceExtractorNet
Definition:
faceExtractorNet.hpp:14
op::FaceExtractorNet::FaceExtractorNet
FaceExtractorNet(const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScaleMode=ScaleMode::ZeroToOneFixedAspect)
op::FaceExtractorNet::getEnabled
bool getEnabled() const
op::FaceExtractorNet::getHeatMaps
Array< float > getHeatMaps() const
op::FaceExtractorNet::mHeatMapTypes
const std::vector< HeatMapType > mHeatMapTypes
Definition:
faceExtractorNet.hpp:69
op::FaceExtractorNet::mHeatMaps
Array< float > mHeatMaps
Definition:
faceExtractorNet.hpp:67
op::FaceExtractorNet::~FaceExtractorNet
virtual ~FaceExtractorNet()
op::FaceExtractorNet::mFaceKeypoints
Array< float > mFaceKeypoints
Definition:
faceExtractorNet.hpp:65
op::FaceExtractorNet::mEnabled
std::atomic< bool > mEnabled
Definition:
faceExtractorNet.hpp:71
op::FaceExtractorNet::netInitializationOnThread
virtual void netInitializationOnThread()=0
op::FaceExtractorNet::setEnabled
void setEnabled(const bool enabled)
op::FaceExtractorNet::forwardPass
virtual void forwardPass(const std::vector< Rectangle< float >> &faceRectangles, const Matrix &inputData)=0
op::FaceExtractorNet::initializationOnThread
void initializationOnThread()
op::FaceExtractorNet::mHeatMapScaleMode
const ScaleMode mHeatMapScaleMode
Definition:
faceExtractorNet.hpp:68
op::FaceExtractorNet::mNetOutputSize
const Point< int > mNetOutputSize
Definition:
faceExtractorNet.hpp:63
op::FaceExtractorNet::mFaceImageCrop
Array< float > mFaceImageCrop
Definition:
faceExtractorNet.hpp:64
op::FaceExtractorNet::getFaceKeypoints
Array< float > getFaceKeypoints() const
op::Matrix
Definition:
matrix.hpp:96
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::ScaleMode
ScaleMode
Definition:
enumClasses.hpp:7
op::ScaleMode::ZeroToOneFixedAspect
@ ZeroToOneFixedAspect
op::Point< int >
op::Rectangle
Definition:
rectangle.hpp:12
include
openpose
face
faceExtractorNet.hpp
Generated by
1.9.1