OpenPose  1.0.0rc2
OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
op::FaceExtractorCaffe Class Reference

#include <faceExtractorCaffe.hpp>

Inherits op::FaceExtractor.

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 heatMapScale=ScaleMode::ZeroToOne, const bool enableGoogleLogging=true)
 
virtual ~FaceExtractorCaffe ()
 
void netInitializationOnThread ()
 
void forwardPass (const std::vector< Rectangle< float >> &faceRectangles, const cv::Mat &cvInputData, const double scaleInputToOutput)
 
- Public Member Functions inherited from op::FaceExtractor
 FaceExtractor (const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScale=ScaleMode::ZeroToOne)
 
virtual ~FaceExtractor ()
 
void initializationOnThread ()
 
Array< float > getHeatMaps () const
 
Array< float > getFaceKeypoints () const
 

Additional Inherited Members

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

Detailed Description

Face keypoint extractor class for Caffe framework.

Constructor & Destructor Documentation

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  heatMapScale = ScaleMode::ZeroToOne,
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.
virtual op::FaceExtractorCaffe::~FaceExtractorCaffe ( )
virtual

Member Function Documentation

void op::FaceExtractorCaffe::forwardPass ( const std::vector< Rectangle< float >> &  faceRectangles,
const cv::Mat &  cvInputData,
const double  scaleInputToOutput 
)
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 cv::Mat format and BGR format.
scaleInputToOutputDesired scale of the final keypoints. Set to 1 if the desired size is the cvInputData size.

Implements op::FaceExtractor.

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::FaceExtractor.


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