API Reference
Last updated
Last updated
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.
Name
get_device_id
Description
Retrieves the Hardware ID from a library.
Input
None
Output
The Hardware ID is returned as a standard Python string.
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
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
Name
extract_template
Description
Extracts a template from an image
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
template (numpy.ndarray): Template buffer. Extracted template will be stored
template_len (numpy.ndarray): Length of the extracted template
Output
Status code indicating the result of the template extraction.
>0: Success
0: No Face
-1: SDK Activation Error
-2: SDK Initialization Error
Name
calculate_similarity
Description
Calculates the similarity between two features
Input
feature_1 (numpy.ndarray): 1st feature
feature_2 (numpy.ndarray): 2nd feature
Output
Similarity score between the two features
The score ranges from 0.0 to 1.0 Default Threshold is 0.67