API Reference
get_version
Name
get_version
Description
Retrieves the SDK version information from a library.
Input
None
Output
The version string is returned as a standard Python string.
get_deviceid
Name
get_deviceid
Description
Retrieves the Hardware ID from a library.
Input
None
Output
The Hardware ID is returned as a standard Python string.
init_sdk
Name
init_sdk
Description
Initializes the SDK in online mode.
Input
dict_path (str): Path to the engine binary files directory
online_key (str): Online key string
Output
Status code indicating the result of the initialization.
0: Success
Non-zero: Initialization failed
init_sdk_offline
Name
init_sdk_offline
Description
Initializes the SDK in offline mode.
Input
dict_path (str): Path to the engine binary files directory
offline_key (str): Path to the offline license key file
Output
Status code indicating the result of the initialization.
0: Success
Non-zero: Initialization failed
detect_face_rgb
Name
detect_face_rgb
Description
Detects and analyzes face.
Input
image (numpy.ndarray): Input image matrix
width (int): Width of the input image
height (int): Height of the input image
face_bbox (numpy.ndarray): Face bounding box coordinates. Extracted face bbox will be stored
liveness_score (numpy.ndarray): Liveness score of detected face
angles (numpy.ndarray): Pitch, Yaw, Roll degree of detected face
Output
Status code indicating the result of the liveness check.
>0: Success
0: No Face
-1: SDK Activation Error
-2: SDK Initialization Error
Liveness Score Values (Default Threshold is 0)
>Threshold
REAL
<=Threshold
FAKE
-100
TOO SMALL FACE
-200
FACE CUT OFF
-300
TOO TURNED FACE
-400
COVERED FACE
-500
MULTIPLE FACES
-600
DEEP FAKE DETECTED
Last updated