Detects fatigue driving using OpenCV, dlib (face recognition and facial landmark detection), imutils (image processing).
- Slow blinking or struggles to keep eyes open
- Nodding off or struggles to keep head up
- Yawning
- Python 3.9.10
- CMake 3.22.1
- Install requirements:
pip install -r requirements.txt
python monitor.py
-p / --face_landmark_predictor [path to shape_predictor_68_face_landmarks.dat]
-v / --verbose [turns on verbose mode]
-i / --input [optional path to input video file]
Note: By providing an optional input video, the app will run detection on the provided video instead of a live camera feed.
Press 'p' to pause or continue. Press 'q' to exit the app.
- Real-Time Eye Blink Detection using Facial Landmarks by Tereza Soukupová and Jan Cech
- 68-point facial landmarks model by Davis E. King.