Compare 1:1 | Live

Service for Comparing Two Images and Performing a Liveness Detection Process on One of Them.

POST - https://api.verifik.co/v2/face-recognition/compare-live

The Compare with Liveness Detection API is designed to perform liveness detection on an image provided in the "probe" parameter. Once liveness detection is performed, it proceeds to perform a 1:1 comparison with the image sent in the "gallery" parameter. This API helps verify the authenticity of a face by checking for signs of life, ensuring that the face in the "probe" image comes from a real person and not a static image or video.

You can use the liveness score to determine whether the face in the probe image is live (above a specified threshold) or not. This API is valuable for improving security and ensuring that only live faces are allowed access to systems or services.

Compare 1:1 Vs Face verify

If you have read all the guides in this documentation, you may have noticed that these services perform very similar processes, so what sets them apart?

The differentiating factor between these services is how the comparison process is performed:

  • Face Verify: Performs the comparison between an image and a person already created within a collection.

  • Compare 1:1: Performs the comparison between two images. Unlike Face Verify, there is no restriction on where these images come from, making this service more versatile in how it performs the 1:1 comparison.

  • Compare 1:1 Live: Same operation as the Compare 1:1 service, with the added value of conducting a Liveness check on one of the supplied images.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Body

NameTypeDescription

os

string

OS from where you are doing the operation. [DESKTOP, IOS, ANDROID]

probe

string

Face encoded in base64

gallery

Array

Array of images to compare with the face inside probe.

search_mode

string

search mode, it could be FAST, ACCURATE.

liveness_min_score

number

Percentage for the minimum value of the liveness test [ min 0.52 - max 1]

Body Example

{
    "os": "DESKTOP",
    "probe": "base64_encoded_string",
    "gallery": ["base64_encoded_string"],
    "search_mode": "FAST/ACCURATE choose one, default FAST",
    "liveness_min_score": 0.5
  }

Response

{
  "id": "N60Q4",
  "data": {
    "__v": 0,
    "_id": "65a6a2726cb7649867795954",
    "type": "compareLive",
    "probe": [
      "Image URL"
    ],
    "client": "64404b1f9856cc8cebd762e7",
    "result": {
      "score": 1,
      "liveness_score": "0.98"
    },
    "gallery": [
      "Image URL"
    ],
    "createdAt": "2024-01-16T15:36:24.754Z",
    "updatedAt": "2024-01-16T15:36:24.754Z",
    "comparedAt": "2024-01-16T15:36:18.443Z",
    "search_mode": "FAST"
  },
  "signature": {
    "message": "Certified by Verifik.co",
    "dateTime": "January 16, 2024 3:36 PM"
  }
}

Last updated