Face Comparison
Header | Value |
Content-Type | application/json |
Authorization |
Kredibel provide two different option of model for face recognition. Every model has its own advantages and disadvantages. We recommend you to try both of the model before deciding which model is the best fit for your case.
Version | Description | Threshold |
---|---|---|
1 | Model version 1 is the default model used for face recognition task. The model extract 512 facial features (landmarks). | < 0.80: not match
>= 0.80: match |
2 | Model version 2 is the another model option for face recognition task. The model extract 128 facial features (landmarks). | < 0.80: not match
>= 0.80: match |
Method | URL |
POST | $vision /v1/face/verification |
Description
Example
Field | Type | Description |
image1 | <base64:image> | Image binary encoded in base64 without <data:image/png;>.
- Supports: JPG, JPEG, PNG
- Max Size: 2MB |
image2 | <base64:image> | Image binary encoded in base64 without <data:image/png;>.
- Supports: JPG, JPEG, PNG
- Max Size: 2MB |
Integer | Model version used to recognize the faces. Default version is 1. | |
threshold | Float (0-1) | Threshold of the matched faces. |
{
"image1": "<base64:image>",
"image2": "<base64:image>"
}
Description
Example
Field | Type | Description |
similarity | Float (0-1) | Similarity value between the two images |
matched | Boolean | Matched |
{
"message": "face verification succeded",
"data": {
"id": "8f9efedc-d5bf-11eb-9953-5517feb46cc4",
"similarity": 0.7396538793680758,
"matched": true
}
}
Method | URL |
POST | $vision /v1/face/verification/handheld |
Description
Example
Field | Type | Description |
image | <base64:image> | Image binary encoded in base64 without <data:image/png;>.
- Supports: JPG, JPEG, PNG
- Max Size: 2MB |
Integer | Model version used to recognize the faces. Default version is 1. | |
threshold | Float (0-1) | Threshold of the matched faces. |
{
"image": "<base64:image>"
}
Description
Example
Field | Type | Description |
similarity | Float (0-1) | Similarity value between the two images |
matched | Boolean | Matched |
{
"message": "face verification succeded",
"data": {
"id": "8f9efedc-d5bf-11eb-9953-5517feb46cc4",
"similarity": 0.7396538793680758,
"matched": true
}
}
Error 4XX
Error Type
Structure
Error Type | Description | Is charged? |
---|---|---|
invalid_base64_encoding | Invalid base64 encoding. | false |
no_face_detected | No face was detected from one of the images or both images. | true |
{
"errors":{
"errorId": <log_id:uuid>,
"errorType": <error_type:str>
},
"message": <message:str>
}
Error 5XX
For every 5XX http code response, there will be no charge.
Last modified 17d ago