Skip to content

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.

Notifications You must be signed in to change notification settings

fahadfiaz/Fatigue-Detection

Repository files navigation

Fatigue Detection

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.

Quick Start

To start using Fatigue_Detection application:

Get code

Clone repo via git
https://github.com/fahadfiaz/Fatigue-Detection

Install Dependencies

  1. OpenCV
  2. immutils
  3. dlib
  4. scipy
  5. Python 2.7 or higher
  6. Open Drowsiness_Detection.py file and update the path where Shape_predictor_68_face_landmarks.dat file is located

Algorithm

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:
enter image description here

Condition for fatigueness

It checks 20 consecutive frames and if the Eye Aspect ratio is lesst than 0.25, Alert is generated.

Relationship

enter image description here

Conclusion

enter image description here

Execution

To run the code, type Fatigue_Detection.py

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages