amplify-ui: Multiple faces error not triggering with FaceDetectorLivenessCore component in React
Before creating a new issue, please confirm:
- I have searched for duplicate or closed issues and discussions.
- I have tried disabling all browser extensions or using a different browser
- I have tried deleting the node_modules folder and reinstalling my dependencies
- I have read the guide for submitting bug reports.
On which framework/platform are you having an issue?
React
Which UI component?
Liveness
How is your app built?
Webpack 5
What browsers are you seeing the problem on?
No response
Which region are you seeing the problem in?
No response
Please describe your bug.
When executing a liveness check using FaceDetectorLivenessCore and present the scene with more than one person, the liveness check proceeds without giving the error specific here
What’s the expected behaviour?
It should initiate an error state transition on multiple face detection for the liveness check as the strings of the component for that scenario are present.
Help us reproduce the bug!
- Initiate a liveness check using
FaceDetectorLivenessCore. - Have two faces in front of the camera feed that is shown.
Code Snippet
// Put your code below this line.
Console log output
No response
Additional information and screenshots
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (8 by maintainers)
Got it, I just wanted more details on how and when this error occurs, thank you for providing me that.
@bard-fauz, If you want more clarity here i can link you to our code, but this error is near impossible to trigger. Unless you can give a screenshot of multiple faces in screen we can say for sure if that will trigger the error or not.
But to take a closer look into what is happening here, we rely on
@tensorflow-models/face-detection. This is our implementation of detectFaces, so you will see, tensorflow-models here gives us faces and which we try to get full facial landmarks(like eyes, ears, nose,etc) so unless within the oval overlay you can have two full faces at the same time the faces array will become empty. This faces array is used internally to understand number of faces at that time and throw an error.hope this helps clarify the inner workings of this error. Unless you can provide a screenshot we can not comment if your expectation on the error is right
Hey @HuiSF, the part “the check was cancelled” means that I didn’t proceed ahead with the test. The Liveness component was displaying next set of instruction to be followed and I exited the program as I was expecting the multiple face error message to be shown,. My bad, the response that I gave was kind of confusing and it might mean like the check got cancelled by the component itself.