Skip to content

A simple Drowsiness Detection module for humans. 😴 🚫 πŸš—

License

Notifications You must be signed in to change notification settings

akshaybahadur21/Drowsiness_Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Drowsiness Detection OpenCV 😴 🚫 πŸš—

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

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.

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

Results πŸ“Š

Execution πŸ‰

To run the code, type python Drowsiness_Detection.py

python Drowsiness_Detection.py
Made with ❀️ and πŸ¦™ by Akshay Bahadur

References πŸ”±