Need help with Drowsiness_Detection?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

akshaybahadur21
248 Stars 154 Forks MIT License 14 Commits 7 Opened issues

Services available

!
?

Need anything else?

Contributors list

# 75,637
Python
OpenCV
hand-tr...
Raspber...
4 commits
# 264,904
Compute...
Raspber...
OpenCV
Python
1 commit
# 263,903
Compute...
Raspber...
OpenCV
Python
1 commit
# 131,335
PHP
landmar...
Raspber...
OpenCV
1 commit
# 238,299
Raspber...
OpenCV
python3
cv2
1 commit
# 191,430
Python
Compute...
Raspber...
OpenCV
1 commit

Drowsiness Detection OpenCV

This code can detect your eyes and alert when the user is drowsy.

Sourcerer

Applications

This can be used by riders who tend to drive for a longer period of time that may lead to accidents

Code Requirements

The example code is in Python (version 2.7 or higher will work).

Dependencies

1) import cv2 2) import imutils 3) import dlib 4) import scipy

Description

A computer vision system that can automatically detect driver drowsiness in a real-time video stream and then play an alarm if the driver appears to be drowsy.

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:.

Condition

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

Relationship

Summing up

For more information, see

Working Example

Execution

To run the code, type

python Drowsiness_Detection.py
python Drowsiness_Detection.py

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.