Skip to main content

Liveness Check

1.0 Authorization​

This API requires an access token. To get more info on how to generate this access token, click on Generating Access Token

2.0 Base Url​

All requests to the Liveness check API must be done using the web API URL below.

Test Environment: https://api-devapps.vfdbank.systems/vtech-wallet/api/v2/wallet2

Live Environment: https://api-apps.vfdbank.systems/vtech-wallet/api/v2/wallet2 in the live environment

3.0 How To Use The Liveness Check API​

  1. The developer should call the LIVENESS CHECK api to get the liveness probability of an image

3.1 Liveness Check​

API Context : /checkliveness

This endpoint returns the liveness probability of an image.

API METHOD: POST

REQUEST HEADERS

KeyValue
AccessToken{{token}}

Sample Request

{
"base64Image":"/9j/4AAQSkZJRgABAQEASABIAAD/4S/SRXhpZgAATU0AKgAAAAgACwALAAIAAAAmAAAIngESA....."
}

Request Field Description

FieldDescriptionStatus
base64ImageImage to evaluate, encoded in base64Mandatory

Sample Response

{
"status": "00",
"message": "Successful",
"data": {
"probability": "0.13133287",
"score": "-1.8892249",
"quality": "0.30681747"
}
}

Response Fields Description

FieldDescription
probabilityThe main response of the system, and it should always be used to make a liveness check decision. The image is accepted as "live" when probability is greater than 0.5. Probability value range is from 0 to 1
scoreThis can be used for BPCER / APCER tuning and is provided mostly for calibration purposes. The range of score value is unbound.
qualityThis is a mark of image "goodness". High values indicate that the image is quality enough for liveness checking.

4.0 Image Requirements​

To run the processing, the Liveness Check API requires an image to match the set of conditions below.

4.1 Image Format​

The Liveness Check API supports JPEG, PNG, and BMP in Base64 formats. Lossless formats are preferred, as lossy compression can have a negative effect on accuracy. If you use lossy formats, make sure the compression is at a minimal level. For example, for JPEG, 70 is the lowest practical compression level.

4.2 Image Resolution​

The Liveness Check API processes the area around the face, so the optimal resolution will depend on the image composition. Assuming a portrait orientation, with the face centered and taking at least 1/4 of the image area, the recommended image resolution range is from 600x800 to 960x1280.

4.3 Image Composition​

  • There should only be one main face on the image. It should be fully visible within a frame and fully open without any occlusions. No crop is allowed. Small faces in the background are not taken into account.
  • The minimum size of a face box that can be processed is 150x150 pixels.
  • The padding between the face box and the image's borders should be at least 15 pixels.
  • The distance between the pupils on the face should be at least 50 pixels.
  • The out-of-plane rotation angle (face pitch and yaw) should be no more than ±30 degrees.

Images that do not match these conditions will be rejected. Other conditions can affect accuracy:

  • Motion blur effect can significantly increase BPCER (the rate of errors classifying a genuine person as a spoof).
  • Texture filtering can significantly increase APCER (the rate of errors allowing impostors through).
  • Spotlights on the faces and nearest surroundings can significantly increase BPCER.
  • Ill-lighted environments and colored light can significantly increase BPCER.
  • Fish-eye lenses are not supported.
  • Sunglasses may be confusing.