A real-time Eye Closure Alert System built using Python and OpenCV.
This project continuously detects the face and eyes using Haarcascade classifiers and triggers an alert sound when the eyes remain closed for a certain duration.
- Real-time face and eye detection
- Tracks how long eyes remain closed
- Triggers a beep alert if eyes stay closed beyond the set threshold
- Displays live updates on the video frame
- Lightweight and easy to run
- Python
- OpenCV
- Haarcascade Classifiers
- winsound (for audio alert - Windows)
Your webcam will open and start detecting eyes in real time.
- Converts frames to grayscale
- Detects face using Haarcascade
- Detects eyes within the face region
- Tracks eye closure duration
- Beeps if eyes stay closed beyond the threshold
Feel free to fork this repository and enhance it!
Ishita Garg
Python | OpenCV | AI Enthusiast