Azure-Samples / azure-ai-vision-sdk

SDK for Microsoft's Azure AI Vision
MIT License
75 stars 46 forks source link

Encountering Errors in Liveness Verification With Verify: Request for Error List and Explanations #87

Closed LeilaYaghoobi70 closed 1 month ago

LeilaYaghoobi70 commented 2 months ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

I encounter errors when trying to check liveness with verification, and I receive various error messages such as 'action not performed' and 'environment not supported.' Is it possible for you to provide a list of errors along with explanations?

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Android Version

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

ymebrugts commented 2 months ago

I also got these errors but I couldn't find a clear definition for any of them.

Here is everything I found on ENVIRONMENT_NOT_SUPPORTED and COMPLETED_RESULT_QUERYABLE_FROM_SERVICE: https://azure.github.io/azure-sdk-for-android/azure-ai-vision-faceanalyzer/com/azure/android/ai/vision/faceanalyzer/LivenessFailureReason.html#ENVIRONMENT_NOT_SUPPORTED

https://azure.github.io/azure-sdk-for-android/azure-ai-vision-faceanalyzer/com/azure/android/ai/vision/faceanalyzer/LivenessStatus.html#COMPLETED_RESULT_QUERYABLE_FROM_SERVICE

nabilat commented 2 months ago

Hi @LeilaYaghoobi70 , thank you for your question. We are working on improving our documentation.

The full-list of errors are listed here: errors as @ymebrugts mentioned. These errors are terminal, and the liveness session will end after these errors are surfaced.

  1. ACTION_NOT_PERFORMED - This will be triggered if the application does not handle the ActionRequiredFromApplication event which should proceeded by calling setAsCompleted(). For example, the application will need to set the background color to 'black' when ActionRequiredFromApplication.DARKEN_DISPLAY even is triggered. Please check line 179 in the sample to see how this is handled.
  2. ENVIRONMENT_NOT_SUPPORTED - The "Passive" liveness technique relies on the screen providing sufficient illumination across the end-user's face to succeed. So naturally if the user is in a really bright environment, the illumination will not be sufficient to perform the liveness classification accurately, and thus this error will be triggered. The end-user should be recommended to move to a darker environment in case they would want to retry.
  3. The remaining errors should be self-explanatory, please let us know if you need more clarifications.

Additionally, if face verification is enabled, then the following verification-errors will be triggered.