Open Eye Detection

#1
by Numerator - opened

Here are two open eyed images that are reporting closed eyes.

RightEyeOpen
LeftEyeOpen

(.venv) PS C:\Users\Roger\source\repos\Projects\Master\QtEyeOpenDetector\process> python .\detectEyes.py
C:\Users\Roger\source\repos\Projects\Master\QtEyeOpenDetector\process.venv\lib\site-packages\huggingface_hub\file_download.py:942: FutureWarning: resume_download is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use force_download=True.
warnings.warn(
🖼️ Image Classification Results 🖼️

📄 File name: LeftEyeClosed.jpg
❌ Prediction: Closed
🎯 Confidence: 90.06% 🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜

📄 File name: LeftEyeOpen.jpg
❌ Prediction: Closed
🎯 Confidence: 90.38% 🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜

📄 File name: RightEyeClosed.jpg
❌ Prediction: Closed
🎯 Confidence: 89.06% 🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜

📄 File name: RightEyeOpen.jpg
❌ Prediction: Closed
🎯 Confidence: 90.84% 🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜

🏁 Classification completed! 🎉

this model is not designed to detect or analyze standalone eye images (such as close-ups showing only one or both eyes). It is specifically trained to detect human faces — including both open and closed eyes — within the broader context of a person’s face.Uploading an image containing only an eye will not yield the expected results, as this type of input falls outside the model’s intended scope. Tests conducted using similar images that include full faces confirmed correct detection and functioning of the model under those conditions.

Good to know. If I have a group of people in a photo, can I give it the face sub rects to check eye state?

open4
This image shows as closed eyes.

📄 File name: open4.jpg
❌ Prediction: Closed
🎯 Confidence: 97.55% 🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜

I iterated each face and on a photograph and drew a box with the state. red closed, yellow partial and green eyes open. A lot of eyes open were marked as closed.

182C_overlay

For the input to the eye state classifier, the rectangles were twice the displayed size.

Sign up or log in to comment