Skip to content

Ishitag04/opencv-eye-closure-alert-system-python

Repository files navigation

👁️ Real-Time Eye Closure Alert System (OpenCV + Python)

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.


🚀 Features

  • 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

🛠 Tech Stack

  • Python
  • OpenCV
  • Haarcascade Classifiers
  • winsound (for audio alert - Windows)

▶️ How to Run

1. Install required dependencies

2. Run the script

Your webcam will open and start detecting eyes in real time.


📸 Demo

https://www.linkedin.com/posts/ishita-garg-7a1475327_opencv-python-computervision-activity-7404119886706454528-ScZo?utm_source=share&utm_medium=member_desktop&rcm=ACoAAFJ4_SkB1GFcDQYZ9e0my3H24gV1ZkZTqH8


📌 How It Works

  • 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

🤝 Contributions

Feel free to fork this repository and enhance it!


📬 Contact

Ishita Garg

Python | OpenCV | AI Enthusiast

About

Real-time Eye Closure Alert System using OpenCV & Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages