Verify face

This method is available on following paths:
  • POST /v1/verify/

This method verifies that two faces belong to the same person, or, alternatively, measures the similarity between the two faces. You can choose between these two modes by setting the threshold parameter.

In the case, when a binary decision is required, the user can pass a value for the threshold parameter. We provide 3 preset values for the threshold: strict, medium and low, with the former aimed at minimizing the false accept rates and the latter being somewhat more permissive. The client can also override these preset values by a fixed threshold.

Please feel free to contact us if you need to tune the threshold value for your specific use-case and/or dataset.

Parameters

Parameter Description Type Accepted in
photo1

The first uploaded image or an external URL

Example:
http://static.findface.pro/sample.jpg
url file json body multipart query
photo2

The second uploaded image or an external URL

Example:
http://static.findface.pro/sample2.jpg
url file json body multipart query
bbox1

Array of bounding boxes for the faces on the first photo.

Examples:
[[225, 345, 307, 428]]
[{"x1": 225,"y1": 345,"x2": 307,"y2": 428}]
bboxes.lists bboxes.dicts json body multipart query
bbox2

Array of bounding boxes for the faces on the second photo.

Examples:
[[225, 345, 307, 428]]
[{"x1": 225,"y1": 345,"x2": 307,"y2": 428}]
bboxes.lists bboxes.dicts json body multipart query
mf_selector

Specifies behavior in case if multiple faces are detected on the photo; one of:

  • reject return an error and a list of faces if more than one face is detected on the provided photo
  • biggestdefault search using the biggest face on the photo
  • all search for each face found on the photo.

Example:
all
string json body multipart query
threshold

[optional]: one of "strict", "medium", "low" [default], "none" or a value between 0 and 1

Example:
0.75
float json body multipart query

Responses

Status code Description
200

Results of comparing each pair of faces found on photos

Example:
{
  "results": [
    {
      "bbox1": {
        "x1": 610,
        "x2": 796,
        "y1": 157,
        "y2": 342
      },
      "bbox2": {
        "x1": 584,
        "x2": 807,
        "y1": 163,
        "y2": 386
      },
      "confidence": 0.9222600758075714,
      "verified": true
    }
  ],
  "verified": true
}