DNN-based face recognizer.
More...
#include <opencv2/objdetect/face.hpp>
◆ DisType
Definition of distance used for calculating the distance between two face features.
Enumerator |
---|
FR_COSINE | |
FR_NORM_L2 | |
◆ ~FaceRecognizerSF()
virtual cv::FaceRecognizerSF::~FaceRecognizerSF |
( |
| ) |
|
|
inlinevirtual |
◆ alignCrop()
Python: |
---|
| cv.FaceRecognizerSF.alignCrop( | src_img, face_box[, aligned_img] | ) -> | aligned_img |
Aligns detected face with the source input image and crops it.
- Parameters
-
src_img | input image |
face_box | the detected face result from the input image |
aligned_img | output aligned image |
◆ create()
Python: |
---|
| cv.FaceRecognizerSF.create( | model, config[, backend_id[, target_id]] | ) -> | retval |
| cv.FaceRecognizerSF_create( | model, config[, backend_id[, target_id]] | ) -> | retval |
Creates an instance of this class with given parameters.
- Parameters
-
model | the path of the onnx model used for face recognition |
config | the path to the config file for compability, which is not requested for ONNX models |
backend_id | the id of backend |
target_id | the id of target device |
◆ feature()
Python: |
---|
| cv.FaceRecognizerSF.feature( | aligned_img[, face_feature] | ) -> | face_feature |
Extracts face feature from aligned image.
- Parameters
-
aligned_img | input aligned image |
face_feature | output face feature |
◆ match()
Python: |
---|
| cv.FaceRecognizerSF.match( | face_feature1, face_feature2[, dis_type] | ) -> | retval |
Calculates the distance between two face features.
- Parameters
-
face_feature1 | the first input feature |
face_feature2 | the second input feature of the same size and the same type as face_feature1 |
dis_type | defines how to calculate the distance between two face features with optional values "FR_COSINE" or "FR_NORM_L2" |
The documentation for this class was generated from the following file: