.. _api_compare: Compare Two Faces =============================== FindFace Multi allows you to compare two faces and verify that they belong to the same individual. You may compare two objects from different sources or object with an object within the same card and return the similarity between them. Do the following: #. Perform :ref:`face (car, body) detection ` on the attached photo and copy ``id`` of the necessary object. #. Use the ``GET /verify`` method. .. code:: GET /verify The REQUEST contains QUERY-STRING PARAMETERS: .. list-table:: :widths: 14 8 45 :header-rows: 1 * - Name - Schema - Description * - ``card_id`` - string - Min 1 chars. This field accepts the id of the card that holds object to compare. * - ``*object1`` - string - Min 1 chars. This field can contain one of the following references: - detection: – use a Detection object - faceevent: – use FaceEvent - carevent: – use CarEvent - bodyevent: – use BodyEvent - faceobject: – use FaceObject - carobject: – use CarObject - bodyobject: – use BodyObject * - ``object2`` - string - Min 1 chars. Same as object1. .. rubric:: CURL example .. code:: curl -X GET "http:///verify?card_id=1&object1=detection%3Acf58e4uv54rotim9jtd0&object2=detection%3Acf58g1mv54rotim9jtdg" \ -H "Accept: application/json" \ -H "Content-Language: ru" \ -H "Accept-Language: ru" \ -H "Authorization: Token " \ If the response is successful (OK: 200), it returns an object that contains confidence. +----------------------------+---------------------------+--------------------------------------------------------------------------------+ | Name | Schema | Description | +============================+===========================+================================================================================+ | ``confidence*`` | number | Face similarity score. Constraints: Min 0┃Max 1. | +----------------------------+---------------------------+--------------------------------------------------------------------------------+ .. rubric:: Response example .. code:: { "confidence": { "face_objects": { "4493493039043981648": 0.7896046 }, "average_conf": 0.7896046 } }