A Desktop based application that can automatically detect driver fatigue in a real-time video stream
and generate an alarm if the eye Aspect ratio is less than 0.25.
To start using Fatigue_Detection application:
Clone repo via git
https://github.com/fahadfiaz/Fatigue-Detection
- OpenCV
- immutils
- dlib
- scipy
- Python 2.7 or higher
- Open Drowsiness_Detection.py file and update the path where Shape_predictor_68_face_landmarks.dat file is located
Each eye is represented by 6 (x, y)-coordinates, starting at the left-corner of the eye (as if you were looking at the person), and then working clockwise around the eye:
It checks 20 consecutive frames and if the Eye Aspect ratio is lesst than 0.25, Alert is generated.
To run the code, type Fatigue_Detection.py