Skip to content

Vishal1999-33/Drowsiness-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

About

This can be used by riders who tend to drive for a longer period of time that may lead to accidents. This code can detect your eyes and alert when the user is drowsy. There's a minimum amount of time for which one can keep his/her eyes shut. If that time is exceeded an alert will start.

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:

blink_detection_plot

Above image shows a visualization of eye landmarks when then the eye is open.

blink_detection_plot

Above image shows eye landmarks when the eye is closed.

Condition

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

Relationship

To find the Eye Aspect Ratio(EAR), we have a relationship between EAR and the 6 coordinates mentioned above. It is given be:-

blink_detection_equation

Below image shows a plot between Eye Aspect Ratio and Time:-

blink_detection_plot-1

Releases

No releases published

Packages

No packages published