This project uses facial landmarks to monitor drowsiness in real-time using the Eye Aspect Ratio (EAR) to prompts/alertss whether a person is awake or drowsy.
- Real-time video feed processing using OpenCV
- DLib facial landmark detection (68 points)
- EAR-based thresholding to detect eye closure
- Works on a customizable thresholding.
-
Install dependencies
pip install -r requirements.txt
-
Run the application
python main.py
The system will open your camera feed and begin monitoring for drowsiness immediately.
The shape predictor file shape_predictor_68_face_landmarks.dat can be fetched from Dlib's official site too.
This implementation is inspired by the concepts presented in:
- Soukupovรก, T., & ฤech, J. (2016). Real-Time Eye Blink Detection using Facial Landmarks Read paper (PDF)