> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/verify/liveness/guidelines-for-liveness-detection.md).

# Guidelines for Liveness Detection

## Image Type and Resolution&#x20;

The size, type, and resolution of the image captured for liveness detection are important factors that affect its ability to be processed and analyzed accurately by the system.

Ensuring that the image is in the correct format and has sufficient resolution is necessary to obtain an accurate liveness detection result.

{% hint style="info" %}
**Note:** Passive liveness supports two capture modes: **single image and video input** (Video Liveness). The specifications below differ by capture mode, but the face appearance and image quality guidance applies to both. See [Passive Liveness](/identity-stack/verify/liveness/overview/passive-liveness.md) for how the two modes differ.
{% endhint %}

### Specifications - Single Image

<table><thead><tr><th width="270.8828125">Characteristic</th><th>Specification</th></tr></thead><tbody><tr><td>Camera</td><td>Front camera of the device</td></tr><tr><td>Image Resolution </td><td><ul><li>Minimum: 480*640 pixels</li><li>Maximum: 3000*4000 pixels</li></ul></td></tr><tr><td>Image Size</td><td><ul><li>Minimum : 50KB </li><li>Maximum : 1MB</li></ul></td></tr><tr><td>Image Type</td><td>JPEG or JPG</td></tr><tr><td>Compression recommendation</td><td>Bicubic compression or resize the image resolution without affecting the image quality. </td></tr><tr><td>JPEG quality</td><td>No less than 70%</td></tr><tr><td>Image aspect ratio</td><td><p>Use the similarity of the initial ratio to reduce the size.</p><ul><li>Minimum ratio 9:16</li><li>Maximum ratio 16:9</li></ul></td></tr><tr><td>Selfie Orientation</td><td>Frontal face, portrait, straight to the camera and not rotated</td></tr><tr><td>Face area size</td><td><ul><li>Minimum face area 200 x 200 pixels</li><li>Maximum face area respective to the maximum allowed image file size</li><li>Minimum Inter Eye Distance 160 pixels</li></ul></td></tr></tbody></table>

### Specifications - Video Liveness

The SDK produces a video that meets these limits automatically. They apply to any video submitted to the endpoint.

<table><thead><tr><th width="225.79296875">Characterisctic</th><th>Specification</th></tr></thead><tbody><tr><td>Camera</td><td>Front camera of the device</td></tr><tr><td>Duration</td><td>5 seconds or less</td></tr><tr><td>File size</td><td>Under 50 MB</td></tr><tr><td>Resolution</td><td>Longest side under 4096 pixels</td></tr><tr><td>Orientation</td><td>Frontal face, portrait straight to the camera and not rotated</td></tr></tbody></table>

#### What Changes with Video Input

Video input does not remove the need for a good capture. It gives the system more than one frame to choose from, so a brief blur or a blink during the recording is less likely to cause a rejection.

The face appearance requirements are the same as for single image. The selected frame must contain one clearly visible, unobstructed, front-facing face. A video in which the face is never fully visible is still rejected.

| Guideline                                      | Single image                                    | Video input                                                                                                        |
| ---------------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Blur and motion                                | Rejected if the image is blurred                | More tolerant. A sharper frame elsewhere in the video can be selected instead                                      |
| Blinking and momentary expression              | Rejected if the eyes are closed in that image   | More tolerant. A frame with open eyes can be selected instead                                                      |
| Lighting and exposure                          | Rejected if the image is too dark or too bright | More tolerant, but only if lighting varies during the recording. Consistently poor lighting still causes rejection |
| Face occluded (mask, hat, glasses, hand, hair) | Rejected                                        | No change                                                                                                          |
| Multiple faces in frame                        | Rejected                                        | No change. See Multiple faces in the frame                                                                         |
| Face orientation and distance                  | Rejected if not front-facing or too small       | No change if the condition persists for the whole recording                                                        |
| Enhanced or filtered capture                   | Rejected                                        | No change                                                                                                          |

{% hint style="info" %}
**Important:** All guidance on this page still applies to video input. Video input reduces rejections caused by momentary problems. It does not compensate for a poor environment, an obstructed face, or an incorrect capture position.
{% endhint %}

## Capture Checklist

#### Image quality

* Make sure the capture is well-lit, and not too dark or too bright
* Avoid capturing in front of a bright light source
* Use a plain, neutral background with no distracting elements
* Avoid glare and reflections
* Avoid a blurred capture
* Use the original capture from the camera. Do not apply re-touch, beautification, or colour filters

#### Face appearance

* The entire face must be visible and not partially obscured by hair, glasses, a mask, a hat, a hand, or any other object
* Keep a neutral expression. Avoid smiling, frowning, or exaggerated expressions
* Keep the face straight-on and centred in the frame
* Keep only one face in the frame
* Do not hold a KTP or ID card in the selfie. This may be detected as spoof activity

### Guidelines for Optimal Images

<table><thead><tr><th width="159.140625">Image Condition</th><th>Acceptance/Rejection</th></tr></thead><tbody><tr><td>Ideal </td><td><strong>Highly recommended</strong> for optimal liveness detection accuracy</td></tr><tr><td>Relatively Safe</td><td><strong>Acceptable</strong>, but may impact liveness detection accuracy</td></tr><tr><td>Avoid</td><td>Likely to be rejected. Significant impact on liveness detection accuracy</td></tr></tbody></table>

## Guidelines for Image Quality

<table><thead><tr><th width="157">Image Condition</th><th width="193.876953125">Acceptance/Rejection</th><th>Defective Image</th><th>Recommendation</th></tr></thead><tbody><tr><td>Low Light</td><td><strong>Warn be avoided</strong> as it can significantly impact liveness detection accuracy</td><td><img src="/files/BxIed6MqtxeDVnF5g65o" alt=""></td><td>The image should be well-lit and properly exposed</td></tr><tr><td>Blur</td><td><strong>Warn be avoided</strong> as it can significantly impact liveness detection accuracy</td><td><img src="/files/LPVPaerZlamtVkCOOfpi" alt=""></td><td>The image should be sharp and in focus</td></tr><tr><td>Defect / Corrupt</td><td><strong>Warn be avoided</strong> as it can significantly impact liveness detection accuracy</td><td><img src="/files/jcvPezFhLO7DFnuxoXSO" alt=""></td><td>The image should be clean and undamaged</td></tr><tr><td>Over-exposure</td><td><strong>Warn be avoided</strong> as it can significantly impact liveness detection accuracy</td><td><img src="/files/TdltL4I93gTCEI4qOkmq" alt=""></td><td>The image should be properly exposed with no blown-out highlights</td></tr><tr><td>Low Contrast</td><td><strong>Warn be avoided</strong> as it can significantly impact liveness detection accuracy</td><td><img src="/files/ct2QQptbYMJ45Bih5iXe" alt=""></td><td>The image should have good contrast with clearly defined edges</td></tr><tr><td>Glare</td><td><strong>Warn be avoided</strong> as it can significantly impact liveness detection accuracy</td><td><img src="/files/jmbGD9T4iPaXmFhrx4BZ" alt=""></td><td>The image should be free of glare and reflections</td></tr><tr><td>Enhanced Selfie</td><td><strong>Warn be avoided</strong> as it can significantly impact liveness detection accuracy</td><td><img src="/files/smn5CWzgBkxJNaoopH8M" alt=""></td><td>The image should be original image taken from direct camera. Avoid applying any re-touch, beautification, color filter etc</td></tr></tbody></table>

## Guidelines for Face Appearance

<table><thead><tr><th width="147">Condition</th><th>Reason</th><th>Selfie should be avoid</th><th>Recommendation</th></tr></thead><tbody><tr><td>Ideal Condition</td><td>Taking a selfie in proper lighting conditions to ensure the face is clear</td><td><img src="/files/GwS76LdpTHPIHZj492kZ" alt=""></td><td>NA</td></tr><tr><td>Ideal Condition</td><td>Using a hijab that is not covering the facial area</td><td><img src="/files/Y5dS572yenAnmpDeTx0D" alt=""></td><td>NA</td></tr><tr><td>Warn to be Avoided</td><td>Rotated Selfie in 90, 180, 270 degree</td><td><img src="/files/aOQLv2HmMRLjFkFAmljP" alt=""></td><td>Suggest to take selfie in well tilt and in normal orientation</td></tr><tr><td>Relatively Safe</td><td>Head covered by hair bangs</td><td><img src="/files/QC42jMF4f4tvzu3FHZvj" alt=""></td><td>Suggest to take selfie with no object covering the head/face</td></tr><tr><td>Relatively Safe</td><td>Wearing clear eyeglasses</td><td><img src="/files/pIcd7FqOVDcNoAUO6B5t" alt=""></td><td>Suggest to avoid the reflection in eyeglasses</td></tr><tr><td>Warn to be Avoided</td><td>Reflection in eyeglasses</td><td><img src="/files/3hTzyipjMSUudP7KhJUy" alt=""></td><td>Suggest to avoid the reflection in eyeglasses</td></tr><tr><td>Warn to be Avoided</td><td>Hair obstructing part of the face and eyes</td><td><img src="/files/XJ1Y2BJz5Xv0wWNbctcD" alt=""></td><td>Suggest retaking photo with hair pulled back</td></tr><tr><td>Warn to be Avoided</td><td>Face partially cut off in the image</td><td><img src="/files/o8hDWSZWJkjweSMJ6xX7" alt=""></td><td>Suggest retaking photo with entire face visible</td></tr><tr><td>Warn to be Avoided</td><td>Wearing colored cooling glasses that obscure the eyes</td><td><img src="/files/M5dcl1DnkIv4Qhjcx7Y4" alt=""></td><td>Suggest retaking photo without glasses or clear glasses</td></tr><tr><td>Warn to be Avoided</td><td>Wearing a mask that covers a significant portion of the face</td><td><img src="/files/Z12CFbStdf80ueT0xXdW" alt=""></td><td>Suggest retaking photo without a mask</td></tr><tr><td>Warn to be Avoided</td><td>Wearing a hat that obstructs the view of the eyes</td><td><img src="/files/bziRc0IuDWtL0gn3VIzv" alt=""></td><td>Suggest retaking photo without a hat</td></tr><tr><td>Warn to be Avoided</td><td>Hand covering part of the face</td><td><img src="/files/zWa6gsZzNFf5GAMExN7R" alt=""></td><td>Suggest retaking photo with hands away from face</td></tr><tr><td>Warn to be Avoided</td><td>Face not oriented properly or at an angle</td><td><img src="/files/cDbfciFjzcM9lq9kMVRk" alt=""></td><td>Suggest retaking photo with face oriented straight ahead</td></tr><tr><td>Warn to be avoided</td><td>User holding KTP in the selfie</td><td><img src="/files/fI0Lhz59aKMam7yuiGyz" alt=""></td><td>Suggest retaking photo without holding KTP </td></tr><tr><td>Warn to be Avoided</td><td>Multiple faces in the selfie</td><td><img src="/files/Oub4S8T4GYEu1bgxuVE7" alt=""></td><td>Suggest retaking photo only one face in the frame</td></tr></tbody></table>

## Multiple Faces in the Frame

The liveness check accepts one face per capture. If a second face is detected, the capture is rejected with an image quality error and the user is asked to keep only one face in the frame.

Only a clearly visible face counts as a second face. A person standing far from the camera, or a face only partly inside the frame, is normally not counted. This reduces failed captures in busy places such as a branch office, a kiosk, or a public area, where other people may pass behind the user.

**Recommendations**

* Capture in a position where no other person is inside the camera frame
* Move away from crowded areas, or turn so that other people are behind the camera instead of behind you
* If the error still appears, ask the user to check the camera preview before capturing

{% hint style="info" %}
**Note:** Available from Android SDK 1.9.6+. This behaviour applies to both capture modes. With video input, the whole video is still rejected if a second face is present — video input does not make this check more tolerant.
{% endhint %}

If your use case requires strict one-person enforcement (for example, supervised onboarding where no other person may appear at all), contact the [**VIDA team**](mailto:support@vida.id).

## **Managing Liveness Errors & Recommendations**

<figure><img src="/files/8zdMxss7mAUBJyAShn93" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
A person far behind the user is normally not counted as a second face from Android SDK 1.9.6.
{% endhint %}
