> For the complete documentation index, see [llms.txt](https://docs.vida.id/vida-identity-platform/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/vida-identity-platform/product-overview/liveness-detection/recommendations-for-successful-liveness-detection.md).

# Recommendations for Successful 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.

| Characteristic             | Specification                                                                                                                                                                  |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Image Resolution           | <ul><li>Minimum: 480*640 pixels</li><li>Maximum: 3000*4000 pixels</li></ul>                                                                                                    |
| Image Size                 | <ul><li>Minimum : 50KB </li><li>Maximum : 1MB</li></ul>                                                                                                                        |
| Image Type                 | JPEG or JPG                                                                                                                                                                    |
| Compression recommendation | Bicubic compression or resize the image resolution without affecting the image quality.                                                                                        |
| JPEG quality               | No less than 70%                                                                                                                                                               |
| Image aspect ratio         | <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>                                              |
| Selfie Orientation         | Frontal face, portrait straight to the camera and not rotated                                                                                                                  |
| Face area size             | <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> |

{% hint style="info" %}
The selfie image captured for liveness verification must be taken from the front camera of the device
{% endhint %}

## Quality Check of Captured Selfie

The quality of the image captured for liveness detection can impact the accuracy of the result.

A well-lit, clearly visible image with a neutral background is necessary for the system to accurately analyse the face.

* User should ensure that the image is well-lit and not too dark or too bright
* User should avoid taking the selfie in front of a bright light source
* User should ensure that the background is plain and neutral, without any distracting elements
* User should avoid taking selfie which produces glare
* User should avoid taking the blur selfie

#### Guidelines for Optimal Images

| Image Condition    | Acceptance/Rejection                                                                  |
| ------------------ | ------------------------------------------------------------------------------------- |
| Ideal Condition    | **Highly recommended** for optimal liveness detection accuracy                        |
| Relatively Safe    | **Acceptable**, but may impact liveness detection accuracy                            |
| Warn to be Avoided | **Potential to be rejected** due to significant impact on liveness detection accuracy |

#### Guidelines for Defective Images

<table><thead><tr><th width="157">Image Condition</th><th width="176">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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2F5VsZjDiEjnjhw6eqZV19%2Flow-light.jpg?alt=media&amp;token=615a2f8b-bfc9-41d3-b58c-660a4d20ee4d" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FiR0wJXrNxKGN6yua9Jli%2Fblur.jpg?alt=media&amp;token=48f46b90-f661-4891-a43f-80e8473f7d4d" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FkEpUl6xN2XY3ZieZDHKH%2Fdefect.png?alt=media&amp;token=aef61eed-ad7d-4326-bc16-15be83810b1c" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2Ff64MWbpA7YeJh7TmIiJh%2Fover-exposure.jpg?alt=media&amp;token=05c74790-1043-43b3-b052-4ef8bd336d00" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FeOWa2uqDdB4z4gelkYZa%2Flow-contrast.jpg?alt=media&amp;token=738da31b-c31d-4e79-aeb8-d24c8f1d95fd" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FsavLCvVwUZvmKlydQl04%2Fglare.jpg?alt=media&amp;token=aa4576f7-98dd-4034-9b1f-fb342a5cd224" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FT2805IpJo8HpcYnsXACc%2Fenahnced-selfie.jpg?alt=media&amp;token=fb7eaf35-2acc-4a24-ad3a-bd4d0a3ac227" 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>

## Face Appearance Guidelines

The appearance of the face in the image captured for liveness detection can impact the accuracy of the result.

* User should make sure that their entire face is visible and not partially obscured by hair, glasses, mask, or any other objects (occlusion)
* Keep a neutral expression, avoiding smiling, frowning, or making any other exaggerated facial expressions
* User should ensure that their face is straight-on and positioned in the center of the frame.
* User should avoid selfie-holding KTP. When holding a KTP/ID card, the condition may be detected as spoof activity.

<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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FRM91VttrhDSYoA3x7bKD%2Fideal-selfie-frontal.jpeg?alt=media&amp;token=5693f417-210c-4aba-9ab9-85504243a9ea" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FTj1SWNzoqY2xID0uKUzN%2Fhijab.png?alt=media&amp;token=7490aa6f-4af8-447c-803f-753af081412f" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FsO4qhRqOzsPe8uzq0Zn5%2Fideal-selfie-rotated.jpeg?alt=media&amp;token=b1e01ab4-387d-46c8-8e6c-2dd82c5bef08" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FRUgJeHwQ7hTPSboJG1IS%2Fideal-hair-bangs.png?alt=media&amp;token=219072cd-2428-468b-b1f1-ff8ee94659c1" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FgDMgrw4xUTQUBNGK472U%2Fclear-eyeglasses.jpg?alt=media&amp;token=dc647525-42ea-4dba-838e-0ca128b83b69" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FmCLguQf0qIT6zmAFFt9P%2Freflection-in-eyeglasses.jpg?alt=media&amp;token=1d9645cc-a75c-4a57-82fb-9d4c6be085b0" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2Fz40HICrnhi3HjvE8aDQl%2Fface%20covered%20by%20hair.jpg?alt=media&amp;token=4062f12c-ea7a-4459-9826-54b0fbd91906" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2Fr7Y3VbabygFTAUVJkFWP%2Fcropped-face.jpg?alt=media&amp;token=9f3d1aec-eb4b-4c7b-82bb-08ca222a2877" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FucscjrGOck8vnNmjQj96%2Fsunglasses.jpg?alt=media&amp;token=9daf1741-c374-42fa-a9f2-c35dc995f618" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2F83sE4AftkbOzcbhbhd1K%2F20230706_123221.jpg?alt=media&amp;token=944e7535-a75a-4a56-a9b4-9287efadea02" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FqpvW31WNAjWVAxSjJ32X%2F20230706_123001.jpg?alt=media&amp;token=1c156e63-5f40-4009-9024-0c9677d2213b" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FcDxhzc89ibUxtsR4p8OF%2Foccluded-with-hand.png?alt=media&amp;token=db022604-873a-4520-8017-311f1744c00e" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2F01TNJiGxI6r9hSk4VzXH%2Frotated.jpg?alt=media&amp;token=404cada1-e5ed-4080-878b-d054c37a24f2" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2F3xAbpvLaQAJaaABdkD7i%2Fselfie-holding-ktp.jpg?alt=media&amp;token=3b735d82-936e-44c3-92c0-5511cf5409cc" 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="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2FGBbZfhbVb8Ex4o45M4Cv%2Fmore-than-one-face.jpg?alt=media&amp;token=4a381d69-8ca4-4c39-b62e-8d1a3ff204a1" alt=""></td><td>Suggest retaking photo only one face in the frame</td></tr></tbody></table>

## **Managing Liveness Errors and Recommendations**

<figure><img src="https://1987382524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzqikP7fR7hLesltIaRUc%2Fuploads%2Fk0Q5TamoAimQw67VW5k3%2FLiveness%20Error.jpeg?alt=media&amp;token=d4e34c82-4faa-44ae-823e-c4981b70daa6" alt=""><figcaption></figcaption></figure>

### Suggested Steps for Testing VIDA Liveness SDK/API

{% hint style="info" %}
**Avoid Using Native Cameras or Third-Party Apps with AI/Beautification Modes**

* Avoid taking selfies using native camera apps or third-party apps that might include AI mode or beautification settings, as these can affect liveness detection accuracy.

**Use the VIDA SDK Demo App (For SDK Testing)**

* Test the SDK with the VIDA-provided demo app to observe its default performance. This will allow you to compare the SDK behavior with how it operates in your own application.

**Test in Your Application Environment (For API/SDK Testing)**

* Test the SDK or API using your app’s camera capture process for accurate performance evaluation. This ensures the results reflect your application’s environment, configurations, and camera behavior.

**Use the VIDA SSP Demo App**

* You can use the VIDA SSP (Self Service Platform) demo app to simulate various scenarios in liveness detection and get detailed results in the SSP dashboard.

By following these steps, you will better align liveness detection performance with real-life use cases, ensuring optimal results in your environment.
{% endhint %}
