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>
7 
8 namespace op
9 {
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 
36 
45  virtual void forwardPass(const std::vector<Rectangle<float>>& faceRectangles, const Matrix& inputData) = 0;
46 
48 
57 
58  bool getEnabled() const;
59 
60  void setEnabled(const bool enabled);
61 
62  protected:
66  // HeatMaps parameters
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 
82  };
83 }
84 
85 #endif // OPENPOSE_FACE_FACE_EXTRACTOR_HPP
FaceExtractorNet(const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScaleMode=ScaleMode::ZeroToOneFixedAspect)
bool getEnabled() const
Array< float > getHeatMaps() const
const std::vector< HeatMapType > mHeatMapTypes
Array< float > mHeatMaps
virtual ~FaceExtractorNet()
Array< float > mFaceKeypoints
std::atomic< bool > mEnabled
virtual void netInitializationOnThread()=0
void setEnabled(const bool enabled)
virtual void forwardPass(const std::vector< Rectangle< float >> &faceRectangles, const Matrix &inputData)=0
const ScaleMode mHeatMapScaleMode
const Point< int > mNetOutputSize
Array< float > mFaceImageCrop
Array< float > getFaceKeypoints() const
#define OP_API
Definition: macros.hpp:18
#define DELETE_COPY(className)
Definition: macros.hpp:32
ScaleMode
Definition: enumClasses.hpp:7