Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eyeStateDetector.IsOpen #57

Open
zoekatakuzinos opened this issue Nov 12, 2024 · 1 comment
Open

eyeStateDetector.IsOpen #57

zoekatakuzinos opened this issue Nov 12, 2024 · 1 comment

Comments

@zoekatakuzinos
Copy link

Thank you Georg for a great project!

I am calling eyeStateDetector.IsOpen(faceImage) on various of my images as I am looking into adding liveness checks. Ultimately I will be detecting and recognizing frames from a webcam. I'm experimenting with the possibility of looking for blinking.

The call to eyeStateDetector.IsOpen(faceImage) seems to return true even on an image where I have closed my eyes, and then calls false on an image where my head is tilted and looking away with eyes open. I am not sure why?
When I ran through your demo on the website and tried your "count open eyes" it worked with those same images so I am not sure what I am doing wrong. I am not cropping the image with only the eye part when I call eyeStateDetector.IsOpen(faceImage).

Could that be the problem?

Thank you

@georg-jung
Copy link
Owner

Yes, the eyeStateDetector.IsOpen method does expect an image that mostly contains only the eye. Take a look at

public static (int Faces, int OpenEyes, int ClosedEyes) CountEyeStates(this IFaceDetectorWithLandmarks detector, IEyeStateDetector eyeStateDetector, Image<Rgb24> input, float eyeDistanceDivisor = 3)
for a working example (= what the website does) or simply use FaceAiSharp.Applications.CountEyeStates yourself. Also see https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/open-closed-eye-0001/README.md for details about the model used, open-closed-eye-0001. The model page contains sample images too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants