OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
op::FaceExtractorCaffe Class Reference

#include <faceExtractorCaffe.hpp>

Inheritance diagram for op::FaceExtractorCaffe:
op::FaceExtractorNet

Public Member Functions

 FaceExtractorCaffe (const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScaleMode=ScaleMode::ZeroToOneFixedAspect, const bool enableGoogleLogging=true)
 
virtual ~FaceExtractorCaffe ()
 
void netInitializationOnThread ()
 
void forwardPass (const std::vector< Rectangle< float >> &faceRectangles, const Matrix &inputData)
 
- Public Member Functions inherited from op::FaceExtractorNet
 FaceExtractorNet (const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScaleMode=ScaleMode::ZeroToOneFixedAspect)
 
virtual ~FaceExtractorNet ()
 
void initializationOnThread ()
 
Array< float > getHeatMaps () const
 
Array< float > getFaceKeypoints () const
 
bool getEnabled () const
 
void setEnabled (const bool enabled)
 

Additional Inherited Members

- Protected Attributes inherited from op::FaceExtractorNet
const Point< int > mNetOutputSize
 
Array< float > mFaceImageCrop
 
Array< float > mFaceKeypoints
 
Array< float > mHeatMaps
 
const ScaleMode mHeatMapScaleMode
 
const std::vector< HeatMapTypemHeatMapTypes
 
std::atomic< bool > mEnabled
 

Detailed Description

Face keypoint extractor class for Caffe framework.

Definition at line 13 of file faceExtractorCaffe.hpp.

Constructor & Destructor Documentation

◆ FaceExtractorCaffe()

op::FaceExtractorCaffe::FaceExtractorCaffe ( const Point< int > &  netInputSize,
const Point< int > &  netOutputSize,
const std::string &  modelFolder,
const int  gpuId,
const std::vector< HeatMapType > &  heatMapTypes = {},
const ScaleMode  heatMapScaleMode = ScaleMode::ZeroToOneFixedAspect,
const bool  enableGoogleLogging = true 
)

Constructor of the FaceExtractor class.

Parameters
netInputSizeSize at which the cropped image (where the face is located) is resized.
netOutputSizeSize of the final results. At the moment, it must be equal than netOutputSize.

◆ ~FaceExtractorCaffe()

virtual op::FaceExtractorCaffe::~FaceExtractorCaffe ( )
virtual

Member Function Documentation

◆ forwardPass()

void op::FaceExtractorCaffe::forwardPass ( const std::vector< Rectangle< float >> &  faceRectangles,
const Matrix inputData 
)
virtual

This function extracts the face keypoints for each detected face in the image.

Parameters
faceRectangleslocation of the faces in the image. It is a length-variable std::vector, where each index corresponds to a different person in the image. Internally, a op::Rectangle<float> (similar to cv::Rect for floating values) with the position of that face (or 0,0,0,0 if some face is missing, e.g., if a specific person has only half of the body inside the image).
cvInputDataOriginal image in Mat format and BGR format.

Implements op::FaceExtractorNet.

◆ netInitializationOnThread()

void op::FaceExtractorCaffe::netInitializationOnThread ( )
virtual

This function must be call before using any other function. It must also be called inside the thread in which the functions are going to be used.

Implements op::FaceExtractorNet.


The documentation for this class was generated from the following file: