The Sleep Detection System is a Python-based computer vision project that detects whether a person is feeling sleepy by analyzing eye movement using a webcam. If the system detects that the eyes remain closed for a certain period, it triggers an alarm sound to alert the user.
This project is useful for driver drowsiness detection, study monitoring, and fatigue detection systems.
- Python
- OpenCV
- Pygame
- Haar Cascade Classifier
- Computer Vision
- Real-time face detection
- Real-time eye detection
- Detects if eyes remain closed for a long duration
- Plays an alarm sound when sleep is detected
- Works using a webcam
sleep_detector
│
├── SleepDetection.py
├── buzz.mp3
└── README.md
- Clone the repository
git clone https://github.com/komalkhatod1105/Sleep_Detector.git- Install required libraries
pip install opencv-python
pip install pygameRun the Python file:
python SleepDetection.pyPress ESC to exit the program.
- The webcam captures video frames.
- OpenCV detects the face and eyes using Haar Cascade classifiers.
- If eyes remain closed for a specific duration, the system assumes the user is sleepy.
- The program plays an alarm sound to alert the user.
- Driver drowsiness detection
- Student focus monitoring
- Safety systems in vehicles
- Workplace fatigue monitoring
- Use Deep Learning models for higher accuracy
- Add GUI using Tkinter
- Implement Eye Aspect Ratio (EAR) algorithm
- Send mobile notifications
Komal Khatod