Driver Drowsiness Detection System: Neil Gogte Institute of Technology
Driver Drowsiness Detection System: Neil Gogte Institute of Technology
• Our current statistics reveal that just in 2015 in India alone, 148,707 people died due to car
related accidents. Of these, at least 21 percent were caused due to fatigue causing drivers to
make mistakes. This can be a relatively smaller number still, as among the multiple causes that
can lead to an accident, the involvement of fatigue as a cause is generally grossly
underestimated.
• Fatigue combined with bad infrastructure in developing countries like India is a recipe for
disaster. Fatigue, in general, is very difficult to measure or observe unlike alcohol and drugs,
which have clear key indicators and tests that are available easily. Probably, the best solutions
to this problem are awareness about fatigue-related accidents and promoting drivers to admit
fatigue when needed.
• The former is hard and much more expensive to achieve, and the latter is not possible without
the former as driving for long hours is very lucrative. When there is an increased need for a job,
the wages associated with it increases leading to more and more people adopting it. Such is the
case for driving transport vehicles at night. Money motivates drivers to make unwise decisions
like driving all night even with fatigue.
• This is mainly because the drivers are not themselves aware of the huge risk associated with
driving when fatigued. Some countries have imposed restrictions on the number of hours a
driver can drive at a stretch, but it is still not enough to solve this problem as its implementation
is very difficult and costly.
Literature Survey
• In 2008, Hong Su et. al. described ‘A Partial Least Squares Regression-Based Fusion Model for
Predicting the Trend in Drowsiness’. They proposed a new technique of modeling driver drowsiness with
multiple eyelid movement features based on an information fusion technique—partial least squares
regression (PLSR), with which to cope with the problem of strong collinear relations among eyelid
movement features and, thus, predicting the tendency of the drowsiness.
• In June, 2010, Bin Yang et. al. described ‘Camera based Drowsiness Reference for Driver State
Classification under Real Driving Conditions’. They proposed that measures of the driver’s eyes are
capable to detect drowsiness under simulator or experiment conditions. The performance of the latest
eye tracking based in-vehicle fatigue prediction measures are evaluated. These measures are assessed
statistically and by a classification method based on a large dataset of 90 hours of real road drives.
• In August 2014, García et. al. described ‘Driver Monitoring Based on Low-Cost 3-D Sensors’. They
proposed a solution for driver monitoring and event detection based on 3-D information from a range
camera is presented. The system combines 2-D and 3-D techniques to provide head pose estimation
and regions-of-interest identification. Based on the captured cloud of 3-D points from the sensor and
analyzing the 2-D projection, the points corresponding to the head are determined and extracted for
further analysis.
Existing System
• Here we are used SVM(support vector machine) to classify the components in
the input video. While cropping the region of interest components in the video
is not accurate. Sometimes it will show regions wrong. To sense the eyes first
we have to create boundary boxes for that and a classification algorithm. The
algorithm of SVM will not support.
MOTIVATION FOR THE WORK
• Now-a-days, there is huge increase in private transportation day by day in this modernize world. It will be
tedious and bored for driving when it is for long time distance.
• One of the main causes behind the driver’s lack of alertness is due to long time travelling without sleep
and rest. Tired driver can get drowsy while driving.
• Every fraction of seconds drowsiness can turn into dangerous and life-threatening accidents may lead to
death also. To prevent this type of incidents, it is required to monitor driver’s alertness continuously and
when it detects drowsiness, the driver should be alerted. Through this we can reduce significant number
of accidents and can save lives of people.
Proposed System
• A spectacle with eye blink sensor is used to detect the driver drowsiness and alerts the driver with
buzzer, if driver is affected by drowsiness.
PROBLEM STATEMENT
• Many of the road accidents will occur due to drowsiness of the driver. Drowsiness can be detected by
monitoring the driver through continuous video stream with a mobile or camera.
• The general objective is to create a model that will indicate whether a person is feeling drowsy or not.
• The model takes image for every second and check for eye blinking and calculate the time for eye
closed by Deep learning. If the blinking is high and eye is closed for certain amount of time then it will
indicate driver through a sound.
Project Aim
• The aim is to make the driver wake with that sound.The algorithm calculates the distance between two
eyelids and if it found the distance less than a threshold value then it raises the alarm.
Software and Hardware Requirements
• Software Requirements:
• Platform: Python.
• Libraries: Open CV, TensorFlow, Keras, pygame.
• Operating System: Windows
• Hardware Requirements:
• Laptop with basic hardware
• Web cam
UML diagrams
Use case diagram
Class diagram
Sequence diagram
Activity diagram
Model Architecture
• The model we used is built with Keras using Convolutional Neural Networks (CNN). A convolutional
neural network is a special type of deep neural network which performs extremely well for image
classification purposes. A CNN basically consists of an input layer, an output layer and a hidden layer
which can have multiple layers. A convolution operation is performed on these layers using a filter that
performs 2D matrix multiplication on the layer and filter.
• The CNN model architecture consists of the following layers:
• Convolutional layer; 32 nodes, kernel size 3
• Convolutional layer; 32 nodes, kernel size 3
• Convolutional layer; 64 nodes, kernel size 3
• Fully connected layer; 128 nodes
• The final layer is also a fully connected layer with 2 nodes. A Relu activation function is used in all the
layers except the output layer in which we used Softmax.
Methodology
• Configure the Raspberry Pi camera and assign the video properties.
• Obtain the live feed using the start function.
• Convert the video into individual frames.
• Detect the face using Haar Cascade Algorithm.
• Crop frames such that only the face is retained.
• Compare the face with trained data and recognize the face.
• Send an SMS to employer if face does not match and exit program. If face matches,
continue.
• Detect the eye region and using edge detection procedure, separate left and right eyes.
• Perform EAR Algorithm to detect if the eye is close or open.
• If EAR is below 0.3, wait for 16 more frames and conclude if it’s a blink or drowsiness.
• If the status is found drowsy, initiate an alarm.
• Send an alert of drowsy driver to concerned authority through SMS and continue monitoring.
Testing
• The purpose of testing is to discover errors. Testing is the process of trying to discover every conceivable
fault or weakness in a work product.
• It provides a way to check the functionality of components, subassemblies, assemblies and or/a finished
product.
• It is the process of exercising software with the intent of ensuring that the software system meets its
requirements and user expectations does not fail in unacceptable manner.
• There are various types of test. Each test type addresses a specific requirement.
Type Of Testing
• Unit Testing
• Unit testing involves the design of test cases that validate the internal program
logic is functioning properly, and that program inputs procedure valid outputs.
• All decision branches and internal code flow should be validated. It is the
testing of individual software units of the application. It is done after the
completion of an individual unit before integration.
• This is structural testing that relies on knowledge of its construction and is
invasive. Unit test perform basic test at component level and and test a specific
business, application and/or system configuration Unit test ensures that each
unique path of princess performs accurately to the documented specifications
and contains clearly defined inputs and expected results.
Integration Testing
• lntegration tests are designed to test integrated software components to determine if
they actually run as one program.
• Testing in event driven and more concerened with the basic outcome of screens or
fields.
• Integration test demonstrate that although the components were individually
satisfaction, as shown successfully by unit testing the combination of components is
correct and consistent.
• Integration testing is specifically aimed at exposing the problems that arise from the
combination, of components.
Functional Testing
• Functional test provide systematic demonstrations that function tests are available as
specified by the business and technical requirement, system documentation and
user manuals.
• Functional testing is centered on the following items: Valid input: identify classes of
valid input must be accepted, Invalid Input: Identify classes of invalid inputs must be
rejected,
• Functions: Identified be exercised identities function must be exercised, Output:
identify classes of application outputs must be exercised, Procedures: interfacing
systems or procedures must be invoked. Organization and preparation of functions
test is focused on requirements, key functions or special test cases. In addition,
systematic coverage pertaining to identify business process flow; data fields,
predefined process and successive processmust be considered for testing. Before
functional testing is complete, additional tests are identified and the effective value of
current test is determined.
Result
Conclusion
The driver abnormality monitoring system developed is capable of detecting drowsiness,
drunken and reckless behaviours of driver in a short time. The Drowsiness Detection
System developed based on eye closure of the driver can differentiate normal eye blink
and drowsiness and detect the drowsiness while driving. The proposed system can prevent
the accidents due to the sleepiness while driving. The system works well even in case of
drivers wearing spectacles and even under low light conditions if the camera delivers
better output.
Information about the head and eyes position is obtained through various self-developed
image a warning signal is issued. processing judges the driver’s alertness level on the basis
of continuous eye closures. processing algorithms. During the monitoring, the system is
able to decide if the eyes .re opened or closed. When the eyes have been closed for too Long.
Reference
• Hong Su and Gangtie Zheng, “A Partial Least Squares Regression-Based Fusion Model for Predicting
the Trend in Drowsiness” IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART A:
SYSTEMS AND HUMANS, VOL. 38, NO. 5, SEPTEMBER 2008.
• Fabian Friedrichs and Bin Yang, “Camera-based Drowsiness Reference for Driver State Classification
under Real Driving Conditions” 2010 IEEE Intelligent Vehicles Symposium University of California, San
Diego, CA, USA June 21-24, 2010.
• Gustavo A. Peláez C., Fernando García, Arturo de la Escalera, and José María Armingol,” Driver
Monitoring Based on Low-Cost 3-D Sensors.” IEEE TRANSACTIONS ON INTELLIGENT
TRANSPORTATION SYSTEMS, VOL. 15, NO. 4, Page(s): 1855 - 1860 AUGUST 2014.