Compare & Liveness detection

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

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

Overview

This response represents the results of both a facial comparison (compareLive) and a liveness check (liveness) to ensure that the image provided comes from a live person and matches against a gallery.

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.

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.

compare_min_score

number

Percentage for the minimum comparison between gallery and probe. (liveness will not be tested if the score is less than the minimum) [min 0.67 - max 0.95]

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.7,
    "compare_min_score": 0.80
  }

Response Structure

Comparison

  • client (String): The unique identifier of the client making the comparison request.

  • type (String): Describes the type of comparison. In this case, it is compareLive for live image comparison.

  • search_mode (String): Specifies the mode of search used. Options include ACCURATE for precise comparisons.

  • status (String): Indicates the success or failure of the comparison request. Expected value: success.

  • result (Object): Contains the comparison results:

    • score (Number): The score of the comparison. A value of 1 indicates a perfect match.

  • comparedAt (DateTime): Timestamp of when the comparison was performed.

  • updatedAt (DateTime): Timestamp of the last update.

  • createdAt (DateTime): Timestamp of the creation of this record.

liveness Section

  • client (String): The unique identifier of the client making the liveness check request.

  • type (String): Specifies the type of test. In this case, it is liveness.

  • status (String): Indicates the success or failure of the liveness check. Expected value: success.

  • search_mode (String): The mode of search used for liveness detection. In this case, FAST mode is used.

  • os (String): Operating system used during the check, e.g., DESKTOP.

  • liveness_min_score (Number): The minimum score needed for the liveness check to pass. In this case, the threshold is 0.6.

  • result (Object): The result of the liveness check:

    • liveness_score (Number): The score achieved in the liveness test. A score of 0.77 was achieved.

    • passed (Boolean): Whether the liveness test passed. In this case, true indicates success.

    • min_score (Number): The minimum score needed for passing. For this check, it is 0.6.

  • updatedAt (DateTime): Timestamp of the last update.

  • createdAt (DateTime): Timestamp of the creation of this record.

Signature Section

  • dateTime (String): Timestamp when the results were certified, in human-readable format.

  • message (String): Certification message confirming that the results were generated and certified by Verifik.co.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Response

`
{
    "data": {
        "comparison": {
            "client": "613375a1eab2fe08527f81e2",
            "type": "compareLive",
            "search_mode": "ACCURATE",
            "gallery": [],
            "probe": [],
            "status": "success",
            "_id": "66e650d6b71ae4d43a76d95d",
            "comparedAt": "2024-09-15T03:13:26.392Z",
            "result": {
                "score": 1
            },
            "updatedAt": "2024-09-15T03:13:29.652Z",
            "createdAt": "2024-09-15T03:13:29.652Z",
            "__v": 0
        },
        "liveness": {
            "client": "613375a1eab2fe08527f81e2",
            "type": "liveness",
            "status": "success",
            "search_mode": "FAST",
            "os": "DESKTOP",
            "liveness_min_score": 0.7,
            "_id": "66e650d9b71ae4d43a76d95f",
            "result": {
                "liveness_score": 0.77,
                "passed": true,
                "min_score": 0.7
            },
            "updatedAt": "2024-09-15T03:13:31.675Z",
            "createdAt": "2024-09-15T03:13:31.675Z",
            "__v": 0
        }
    },
    "signature": {
        "dateTime": "September 15, 2024 3:13 AM",
        "message": "Certified by Verifik.co"
    },
    "id": "ABRCB"
}

Last updated