Menu

Tree [10ff69] master /
 History

HTTPS access


File Date Author Commit
 147.png 2019-07-11 Tanay Mehta Tanay Mehta [0951da] Added Images
 148.png 2019-07-11 Tanay Mehta Tanay Mehta [0951da] Added Images
 README.md 2019-07-11 Tanay Mehta Tanay Mehta [10ff69] Update README.md
 main.py 2019-07-11 Tanay Mehta Tanay Mehta [cab552] Added all files
 shape_pr.dat 2019-07-11 Tanay Mehta Tanay Mehta [cab552] Added all files
 sound.wav 2019-07-11 Tanay Mehta Tanay Mehta [cab552] Added all files

Read Me

Drowsines Detector v1

About

This idea of this project came to me when searching throught the web and stumbling upon a random search statistic about Accidents caused by the Sleeping.

What it does

This Program works by detecting faces, finding facial landmarks on them, extracting corrdinates of both eyes, calculating the Eye-aspect-ratio and then determining whether the eye is closed on not. If the eye is closed for long enough, it will start the alarm on a seperate thread and then put an alert on screen.
Normal Mode
Drowsiness Alert Mode

Inspiration

I have implemented all of this by looking at the Amazing Code-along by Adrian at PyImageSearch. I have just understood and implemented that.

Running the Code

To run the code on your standard Python 3.6 Installation, you must install the dependencies by following this:

pip install cmake

pip install scipy numpy matplotlib scikit-learn 

pip install opencv-contrib-python

pip install imutils

pip install dlib

pip install playsound

Note: Make sure to install the libraries in above order only.

Now just, download the source code and then inside the directory, run this command:

For Windows

python main.py

For MacOS and Linux:

sudo python3 main.py
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.