Class FaceRecognizerSF
java.lang.Object
org.opencv.objdetect.FaceRecognizerSF
DNN-based face recognizer
model download link: https://github.com/opencv/opencv_zoo/tree/master/models/face_recognition_sface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intprotected final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FaceRecognizerSF__fromPtr__(long addr) voidAligning image to put face on the standard positionstatic FaceRecognizerSFCreates an instance of this class with given parametersstatic FaceRecognizerSFCreates an instance of this class with given parametersstatic FaceRecognizerSFCreates an instance of this class with given parametersvoidExtracting face feature from aligned imageprotected voidfinalize()longdoubleCalculating the distance between two face featuresdoubleCalculating the distance between two face features
-
Field Details
-
nativeObj
protected final long nativeObj -
FR_COSINE
public static final int FR_COSINE- See Also:
-
FR_NORM_L2
public static final int FR_NORM_L2- See Also:
-
-
Constructor Details
-
FaceRecognizerSF
protected FaceRecognizerSF(long addr)
-
-
Method Details
-
getNativeObjAddr
public long getNativeObjAddr() -
__fromPtr__
-
alignCrop
-
feature
-
match
Calculating the distance between two face features- Parameters:
face_feature1- the first input featureface_feature2- the second input feature of the same size and the same type as face_feature1dis_type- defining the similarity with optional values "FR_OSINE" or "FR_NORM_L2"- Returns:
- automatically generated
-
match
-
create
Creates an instance of this class with given parameters- Parameters:
model- the path of the onnx model used for face recognitionconfig- the path to the config file for compability, which is not requested for ONNX modelsbackend_id- the id of backendtarget_id- the id of target device- Returns:
- automatically generated
-
create
Creates an instance of this class with given parameters- Parameters:
model- the path of the onnx model used for face recognitionconfig- the path to the config file for compability, which is not requested for ONNX modelsbackend_id- the id of backend- Returns:
- automatically generated
-
create
Creates an instance of this class with given parameters- Parameters:
model- the path of the onnx model used for face recognitionconfig- the path to the config file for compability, which is not requested for ONNX models- Returns:
- automatically generated
-
finalize
-