This project utilizes computer vision and machine learning to detect driver drowsiness in real-time using a webcam. The system can alert the driver if drowsiness is detected, potentially preventing accidents caused by fatigue.
Dataset: http://mrl.cs.vsb.cz/eyedataset
- Install OpenCV:
pip install opencv-python
- Install Pygame:
pip install pygame
- Ensure you have TensorFlow installed:
pip install tensorflow
- Run the
drowsiness_detection.py
script. - The webcam will capture the driver's face and eyes.
- The system will analyze the driver's eyes to detect drowsiness.
- If drowsiness is detected, an alarm sound will be played to alert the driver.
- OpenCV
- Pygame
- TensorFlow