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 |
Aligning image to put face on the standard position.
- Parameters
-
| src_img | input image |
| face_box | the detection result used for indicate face in 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 |
Extracting 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 |
Calculating 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 | defining the similarity with optional values "FR_OSINE" or "FR_NORM_L2" |
The documentation for this class was generated from the following file: