Drowsiness and Emotion Detector for Safety Driving is based on Deep Learning and Computer Vision Concepts to help aid in avoiding car accidents will driving under sleepiness.
31/100 healthLoading repository data…
Loading repository data…
AnshumanSrivastava108 / repository
A car safety technology that can auto-detect driver drowsiness in real-time. This system can prevent road accidents that are caused by drivers who fell asleep while driving.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Drowsiness detection is a safety technology that can prevent accidents that are caused by drivers who fell asleep while driving. The objective of this project is to build a drowsiness detection system that will detect drowsiness through the implementation of computer vision system that automatically detects drowsiness in real-time from a live video stream and then alert the user with an alarm notification.
According to the National Highway Traffic Safety Administration, every year about 100,000 police-reported crashes involve drowsy driving. These crashes result in more than 1,550 fatalities and 71,000 injuries. The real number may be much higher, however, as it is difficult to determine whether a driver was drowsy at the time of a crash. So, we tried to build a system, that detects whether a person is drowsy and alert him.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Clone the repository.
git clone https://github.com/AnshumanSrivastava108/Real-Time-Drowsiness-Detection-System
Move into the project directory.
cd Real-Time-Drowsiness-Detection-System
(Optional) Running it in a virtual environment.
Selected from shared topics, language and repository description—not editorial ratings.
Drowsiness and Emotion Detector for Safety Driving is based on Deep Learning and Computer Vision Concepts to help aid in avoiding car accidents will driving under sleepiness.
31/100 healthpip install virtualenv
virtualenv -p C:\Python37\python.exe test_env
Activate the test environment.
test_env\Scripts\Activate
source test_env/bin/activate
Install all the required libraries, by installing the requirements.txt file.
pip install -r requirements.txt
Installing the dlib library.
If you are using a Unix machine, and are facing some issues while trying to install the dlib library, follow this guide.
If you are using a Windows machine, install cmake and restart your terminal.
Run the application.
python Real-Time-Drowsiness-Detection-System.py --shape-predictor shape_predictor_68_face_landmarks.dat --alarm Alert.wav
For a more detailed explanation of this project check Real_Time_Drowsiness_Detection_System.pdf.
The tests were conducted in various conditions including:
Test case 1: When there is ambient light
Result: As shown above, when there is ambient amount of light, the automobile driver's face and eyes are successfully detected.
Test case 2: Position of the automobile drivers face
Result: As shown in above, When the automobile driver's face is positioned at the Centre, the face, eyes, eye blinks, and drowsiness was successfully detected.
Result: As shown in above, When the automobile driver's face is positioned at the Right, the face, eyes, eye blinks, and drowsiness was successfully detected.
Result: As shown in screen snapshot in above, when the automobile driver's face is positioned at the Left, the face, eyes, eye blinks, and drowsiness was successfully detected.
Test case 3: When the automobile driver is wearing spectacles
Result: As shown in screen snapshot in above, When the automobile driver is wearing spectacles, the face, eyes, eye blinks, and drowsiness was successfully detected.
Test case 4: When the automobile driver’s head s tilted
Result: As shown in screen snapshot in above, when the automobile driver's face is tilted for more than 30 degrees from vertical plane, it was observed that the detection of face and eyes failed.
The system was extensively tested even in real world scenarios, this was achieved by placing the camera on the visor of the car, focusing on the automobile driver. It was found that the system gave positive output unless there was any direct light falling on the camera.
Smart phone application: It can be implemented as a smart phone application, which can be installed on smart phones. And the automobile driver can start the application after placing it at a position where the camera is focused on the driver.
IEEE standard Journal Paper,
[1] Facial Features Monitoring for Real Time Drowsiness Detection by Manu B.N, 2016 12th International Conference on Innovations in Information Technology (IIT) [Pg. 78-81] (https://ieeexplore.ieee.org/document/7880030)
[2] Real Time Drowsiness Detection using Eye Blink Monitoring by Amna Rahman Department of Software Engineering Fatima Jinnah Women University 2015 National Software Engineering Conference (NSEC 2015) (https://ieeexplore.ieee.org/document/7396336)
Websites referred:
Anshuman Srivastava