#include <faceExtractorCaffe.hpp>
Inherits op::FaceExtractor.
Face keypoint extractor class for Caffe framework.
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
-
netInputSize | Size at which the cropped image (where the face is located) is resized. |
netOutputSize | Size of the final results. At the moment, it must be equal than netOutputSize. |
virtual op::FaceExtractorCaffe::~FaceExtractorCaffe |
( |
| ) |
|
|
virtual |
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
-
faceRectangles | location 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). |
cvInputData | Original image in cv::Mat format and BGR format. |
scaleInputToOutput | Desired 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: