This project detects driver drowsiness in real-time using computer vision. It monitors the Eye Aspect Ratio (EAR) to determine whether the driver's eyes are closed and triggers an alert if drowsiness is detected.
- Real-time webcam monitoring
- Eye Aspect Ratio (EAR) calculation
- Drowsiness alert using sound
- Face landmark detection
- Real-world safety application
- Python
- OpenCV
- dlib
- NumPy
- imutils
- scipy
Download the shape predictor file from: https://github.com/davisking/dlib-models
After downloading, place the file: shape_predictor_68_face_landmarks.dat
inside the project folder.
Install dependencies using: pip install -r requirements.txt
This project requires the facial landmark predictor file.
Download it from the official dlib model repository: https://github.com/davisking/dlib-models
Download: shape_predictor_68_face_landmarks.dat.bz2
Extract it and place: shape_predictor_68_face_landmarks.dat
inside the project folder before running the code.
Run the project using: python main.py
This project helps detect driver fatigue and can be used to improve road safety.