Compare two objects
FindFace Multi allows you to compare two objects of the same type (such as two faces, two bodies, or two vehicles) and determine their similarity.
To perform a comparison, use the following method:
GET /verify
The REQUEST contains the following QUERY-STRING PARAMETERS:
Name |
Type |
Description |
---|---|---|
|
string |
ID of the record that contains objects to be compared with the main object defined in the Constraint: Min 1 char. |
|
string |
Reference expression that identifies the main object used for comparison. One of the following expressions must be specified:
Constraint: Min 1 char. |
|
string |
Reference expression that identifies a specific object to be compared with the main object defined in the
Constraint: Min 1 char. |
CURL example
curl -X GET "http://<findface-ip:port>/verify?object1=faceobject%3A4693621634822370700&object2=detection%3Ad1rqpj4kd5qs72mq5290" \
-H "Authorization: Token <token>"
For example, to compare two faces, follow these steps:
Use the
POST /detect
method to detect a face in a photo and copy theid
of the detected face.In the
object1
parameter of theGET /verify
method, specify the copiedid
in the following format:detection:<detection_id>
.- In the
object2
parameter of theGET /verify
method, specify the event ID of the face to be compared with the face defined in theobject1
parameter. Use the following format:faceevent:<event_id>
.If the response is successful (200 OK), it returns a JSON object with theconfidence
field that holds the estimated similarity score between the two objects (in this case, faces).
Name |
Type |
Description |
---|---|---|
|
number|object |
Similarity score between two feature vectors in the database. If the If the
Constraints: Min 0┃Max 1. |
Response example (object1
and object2
specified)
{
"confidence": 0.86446184
}
Response example (object1
and card_id
specified)
{
"confidence": {
"face_objects": {
"4689934075046362827": 0.7640308,
"4693436597895149109": 0.9912036,
"4693621634822370700": 0.8532853
},
"average_conf": 0.86950657
}
}