API Reference
get_version
def get_version() -> str:
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
def get_deviceid() -> str:
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
def init_sdk(dict_path: str, online_key: str) -> int:
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
def init_sdk_offline(dict_path: str, offline_key_path: str) -> int:
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
def detect_face_rgb(image: np.ndarray, width: int, height: int, face_bbox: np.ndarray, liveness_score: np.ndarray, angles: np.ndarray) -> int:
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.5)
Last updated