Face Compare

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.

1:1 Face Compare

POST /compare

This endpoint is for 1:1 face compare, no person enrollment needed

Headers

Name
Value

Content-Type

application/json

x-api-key

<your-api-key>

Body

Name
Description

check_liveness

Required: yes

Type: boolean Default value: false Accepted values: false, true

Example:

"check_liveness": false,

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 liveness image requirement here

face_base_64

Required: Yes

Type: string Example:

"face_base_64": "U2Vjb25kIGltYWdl",

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:

"min_similarity_score": 0.7

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:

"ref_face_base_64": "Rmlyc3QgaW1hZ2U="

Each reference image should contain a single face.

Response

{
  "is_match": true
}

Last updated