Face Compare
Last updated
Last updated
Face Compare API allows you to compare two face images to determine if they correspond to the same person. A score higher than 0.7 is a good indicator that the two images belong to the same person.
You can also use a score of 0.67 or higher if the images are of the same person but taken at different times (years apart). The score is a number between 0 and 1, where 1 is a perfect match and 0 is a perfect mismatch. The score is calculated using a deep learning model trained on millions of face images.
If the liveness check is enabled in the provided server, you can check the liveness with the face compare feature in a single API call.
POST
/compare
This endpoint is for 1:1 face compare, no person enrollment needed
Headers
Body
check_liveness
Required: yes
Type: boolean Default value: false Accepted values: false, true
Example:
face_base_64
Required: Yes
Type: string Example:
The image should contain a single face. Liveness will be checked on this face if enabled.
min_similarity_score
Required: Yes
Type: float Default value: 0.7 Example:
The default value is a good indicator to confirm the match. You can also use a score of 0.67 or higher if the images are of the same person but taken at different times (years apart).
ref_face_base_64
Required: Yes
Type: string Example:
Each reference image should contain a single face.
Response
If set to true, the liveness check is performed during 1:N face search if the face is found. If no face is found, liveness is not checked. Check
Content-Type
application/json
x-api-key
<your-api-key>