Software Requirements Specification: For Vehicle Drowsiness Detection and Notification System
Software Requirements Specification: For Vehicle Drowsiness Detection and Notification System
Specification
for Vehicle Drowsiness Detection
and Notification System.
Prepared BY:
Deepanshu Dhal
Jyoti Jena
Jyotisikha Mishra
Piyus Prabhanjans
Pritam Mishra
DEPARTMENT OF
COMPUTER SCIENCE
ENGINEERING AND
APPLICATION.
IGIT, SARANG
[Cite your source here.]
DECLARATION
It is hereby declared that this report is an authentic record of our work carried
out under the supervision of Prof. Suvendu Kumar Jena , DEPT. OF Computer
Science Engineering And Application, IGIT,SARANG. We have not
submitted this report elsewhere for any other degree or diploma.
Deepanshu Dhal
Jyoti Jena
Jyotisikha Mishra
Piyus Prabhanjans
Pritam Mishra
Department of Computer
Science Engineering And
Application.
IGIT, SARANG
Signature of Guide
Signature of H.O.D
Prof. Suvendu Kumar Jena
Prof. Sasmita Mishra
INDEX
1.Introduction
1.1 Purpose
1.2 Motivation/Need.
2.Literature survey
3.Requirements.
3.1 Functional Requirements
3.2 Non- Functional Requirements
3.3 Hardware Requirements
3.4 Software Requirements
3.5 Libraries used
3.6 Iterative Waterfall Model
4. System Design
5. Design and Implementation:
5.1 Data Flow Diagram 1
5.1 Data Flow Diagram 2
5.2 Class Diagram Design
6. Implementation:
6.1 Face and eye detection by Open CV
6.2 For EAR ratio calculation
7. Snapshots of the Project:
7.1 Eyes are open
7.2 Eyes are closed
8. Conclusion and future scope.
9. Testing and Results.
10.References
Chapter 1:
INTRODUCTION
1.1 Purpose
The attention level of driver degrades because of less sleep, long continuous driving or
any other medical condition like brain disorders etc. Drowsiness is a complex
phenomenon which states that there is a decrease in alerts and conscious levels of the
driver. Though there is no direct measure to detect the drowsiness, but several indirect
methods can be used for this purpose. In initial sections different types of methods for
measuring the drowsiness of the driver are mentioned which includes Vehicle based
measures, Physiological measures, Behavioural measures. Using those methods an
intelligence system can be developed which would alert the driver in case drowsy
condition and prevent accidents. Advantages and disadvantages corresponding to each,
and every system is explained. Depending on advantages and disadvantages the most
suitable method is chosen and proposed. Then the approach for entire system
development is explained using a flow chart which includes capturing the image in real
time continuously, then dividing it into frames. Then each frame is analysed to find face
first. If a face is detected, then next task is to locate the eyes. After the positive result of
detecting eye the amount of closure of eye is determined and compared with the
reference values for the drowsy state eye. If drowsy condition is found out, then driver is
alarmed else repeatedly the loop of finding face and detecting drowsy condition is carried
out. In latter sections object detection, face detection and eye detection and eye detection
is explained in detailed manner. Because face is a type of object hence a few studies on
object detection is done. In face detection and eye detection different approaches for both
are proposed and explained.
1.2 Need/Motivation
Drowsiness detection is a safety technology that can prevent accidents that are caused by
drivers who fell asleep while driving. Several surveys on road accidents says that around
30 percent of accidents are caused by fatigue of the driver. When driver drives for more
than normal period for human then excessive fatigue is caused and results in tiredness
which drives the driver to sleepy condition or loss of consciousness. Physical fatigue, or
muscle weariness, is the temporary physical failure of a muscle to perform ideally.
Mental fatigue is a temporary failure to keep up ideal psychological execution. The onset
of mental exhaustion amid any intellectual action is progressive, and relies on an
individual's psychological capacity, furthermore upon different elements, for example,
lack of sleep and general well-being. Mental exhaustion has additionally been appeared
to diminish physical performance. It can show as sleepiness, dormancy, or coordinated
consideration weakness. The objective of our project is to build a drowsiness detection
system that will detect that a person’s eyes are closed for a few seconds. This system will
alert the driver when drowsiness is detected.
Chapter 2:
LITERATURE SURVEY
Although the number of research have be done previously in order to distinguish the level of
fatigue as well as drowsiness state of driver based on physiological, behavioral and vehicle
characteristics. Among these techniques, Forsman et al. [2], designed a framework which
employed the various vehicle movement like current position of vehicle on lane, steering
wheel movement and movement involve in brake as well as acceleration pedal and so on, in
investigation of drowsiness level of driver’s. These characteristics are mainly related with
vehicle model, driving proficiency as well as intimacy of driver. These procedures are not
performing well in case of micro-sleeps (driver fall asleep on wheel for a moment) because it
requires bulk amount of data as well as time and effort for measuring these parameters.
Including this problem, these techniques are sometimes intrusive in nature means external
equipment are mounted on the body of driver to capture these parameters which deviates the
driver from their normal driving. Few earlier research works have also evaluated the
physiological characteristic such as brain signal, heart rate and nerve impulses etc. in order to
recognize the drowsiness state of driver. Simon et al. [3], explore the fact that state of
drowsiness in driver identified through the various electric signal such as electromyography
(EMG) for muscle tone electroencephalogram (EEG) [4] for brain activity,
electrocardiography (ECG) for heart rate, electrooculogram (EOG) [5] for ocular activity.
Here, the analysis involves in deciding the level of drowsiness based on the physiological
characteristics is intrusive in nature. Due to this intrusive nature, number of equipment which
having the many sensors, have attached on the different portion of driver’s body that can
learn the brain signals as well nerve impulses and so on. Thus, this equipment produces the
extra burden to driver which hindered them from their smooth driving. Therefore, it is
necessary that there should not physical attachment between identification system and driver.
So, after giving phenomenal result, these techniques
are not commercially feasible. In order to resolve the problem shown by physiological a
well as vehicle characteristics-based drowsiness detection techniques as discussed in above
paragraphs, the computer vision techniques came into the existence. In present era, this
technique has become more popular due to low cost of execution and easy to configure with
the vehicle as well as its non-intrusive nature. From the survey of literatures, we found
that computer vision technique mostly employed the facial expression in determination of
state of drowsiness because it becomes easy to identify the driver is sleepy or alert through
the facial expression [16, 18]. According to Bergasa et al. [6], reveal that the frequency,
amplitude, duration related to opening and closing of mouth as well as eye play a significant
function in identification of driver’s drowsiness state. The framework based on this
technique, mainly inspect the surrounding area and condition of iris in a particular time slot
to compute these variables i.e. frequency, amplitude, duration,etc.
Chapter 3:
Requirements
3.1 Functional Requirements
A Functional prerequisite is described as one portion or an element of a
product, in the entire methodology of programming building that the end user
specifically demands as basic facilities that the system should offer.
Recording the driver’s behaviour, the moment the trip begins.
Continuous evaluation of driver’s facial features over the course of long
Trip.
Raising an alarm if driver feels drowsy.
3.2 Non- Functional Requirements
Non-functional requirements are basically the quality constraints that the
system must satisfy according to the project contract. These are also called
nonbehavioral requirements
3.2.1 Essential Requirements
• Camera capturing the video should be of high resolution.
• System should work even in low light conditions.
• Alarm raised should be of high volume to wake the driver up
3.2.2 Software Quality Attributes
ACCURACY: It is important to have a fast Alert system for the Drowsy driver.
CORRECTNESS: The system should generate an appropriate alarm when it finds the
drowsy up-to a particular level.
USABILITY: The system should satisfy the maximum number of users needs, which
is, it must satisfy the functional and non-functional requirements of the system.
3.3 Hardware Requirements
• Processor: 64-bit, quad-core, 2.5 GHz minimum per core
• RAM: 4 GB or more
• Display:1024 x 768 or higher resolution monitors
• Camera: A webcam
3.4 Software Requirements
• Operating system: Windows 10/8 (incl. 64-bit), Mac OS, Linux
• Language: Python 3
• IDE: Visual Studio Code
Chapter 6:
Implementation
EAR ratio
• The deep learning model will also be trained for detecting blink and its
output will be ensembled with EAR for detecting blink.
• If person is detected as yawning and blinking less than a threshold value, then the
alarm is sounded and user is warned.
Chapter 7:
Snapshots of the Project
Here in the project, we have two scenarios:
1) When eyes are open:
o We don’t hear any alarm.
o We don’t see any flash on the screen.
When eyes are open, usually don’t hear any kind of alarm. We don’t see any flash on the
screen stating that eyes are open, or the driver is not feeling drowsy.
When eyes are open, we hear an alarm set while creating the drowsiness detection system.
We see a red coloured flash on the screen around the window stating that eyes are closed, or
the driver is feeling drowsy.
Chapter 8:
CONCLUSION
Our current project develops a system for detecting drowsiness of the driver. This project is
built using Python, OpenCV, ML model, Pygame and other open-source libraries. The system
uses eye aspect ratio and mouth aspect ratio to detect blinks and yawning respectively and a
ML model is trained to draw the result based on them to achieve the main objective of project
i.e., Driver’s Drowsiness. The framework has reached a stable state in which all bugs have
been eliminated. The results are discussed in testing section and are found satisfactory. Our
project provides a way through which several road accidents might be avoided if an alert is
sent to a driver that is deemed drowsy. Our model is not only useful to the person who will
installs it in their vehicle but also for the other cars, trucks, buses and humans moving around
it.
Future Scope:
● The system can be made more accurate using various other parameters such as State of the
Car, Detecting Foreign Substances on Face etc.
● An application can be developed where it can alert or prevent the user from sleeping.
● It can be used to develop an IOT device that can be installed in the car to detect driver’s
drowsiness.
● Similar models and techniques can be used for various other uses such as Netflix, Hotstar
and other streaming service platforms can detect whether the person is sleeping and stop the
video accordingly.
Chapter 9:
TESTING AND RESULT
Test ID Test Condition System Behaviour Expected Result
REFERENCES:
1.B. Alshaqaqi, A. S. Baquhaizel, M. E. Amine Ouis, M. Boumehed, A. Ouamri and M.
Keche,” Driver drowsiness detection system,” 2013 8th International Workshop on Systems,
Signal Processing and their Applications (WoSSPA), Algiers, 2013, pp. 151-155. doi:
10.1109/WoSSPA.2013.6602353
2.R. Grace et al.,” A drowsy driver detection system for heavy vehicles,” 17th DASC.
AIAA/IEEE/SAE. Digital Avionics Systems Conference. Proceedings (Cat. No.98CH36267),
Bellevue, WA, 1998, pp. I36/1-I36/8 vol.2. doi: 10.1109/DASC.1998.739878
4.http://ncrb.gov.in/StatPublications/ADSI/ADSI2015/chapter1A%20traffic
%20accidents.pdf
5.http://cse.anits.edu.in/projects/projects1920A12.pdf
6.https://en.wikipedia.org/wiki/Driver_drowsiness_detection