Professional Documents
Culture Documents
Final Draft DDD
Final Draft DDD
November 2022
DEPARTMENT OF COMPUTER APPLICATIONS
PSG COLLEGE OF ARTS & SCIENCE
An Autonomous College – Affiliated to Bharathiar University
Accredited with A Grade by NAAC (4th Cycle)
College with Potential for Excellence
(Status awarded by the UGC)
Star College Status Awarded by DBT-MST
An ISO 9001:2015 Certified Institution.
Civil Aerodrome POST
Coimbatore-641014
CERTIFICATE
This is to certify that this project work entitled “Automated Driver Drowsiness
Detection System” is a Bonafide record of work done by Naren Karthikeyan R
(20BCA031) in partial Fulfillment of the requirement for the award of Degree of
Bachelor of Computer Applications of Bharathiar University.
I, Naren Karthikeyan R (20BCA031), hereby declare that this minor project work
entitled " Automated Driver Drowsiness Detection System", is submitted to
PSG College of Arts & Science (Autonomous), Coimbatore in partial Fulfillment
for the award of BACHELOR OF COMPUTER APPLICATIONS, is a record
of original work done by me under the supervision and guidance of Dr. ARUN
PRIYA C. Assistant Professor in Department of Applications PSG College of arts
& science, Coimbatore.
This project work has not yet been submitted by me for the award of any other
Degree / Diploma / Associative ship / Fellowship or any other similar degree to
any other University.
With great gratitude I would like to acknowledge the help of those who
contributed their valuable suggestions and timely assistance to complete this work.
First and foremost, I would like to extend my heartfelt gratitude and place
my sincere thanks to THIRU. L. GOPALAKRISHNAN managing Trustee, PSG
& SONS Charities,
Coimbatore for providing all sorts of support and necessary facilities throughout
the course.
Also, I would like to thank our Vice Principal, Dr. A. ANGURAJ M.Sc.,
M.Phil., PhD., for his support.
I own my deepest gratitude to Dr. R. SUDHA MCA., M.Phil., Ph.D., Head of
the Department of Computer Applications, PSG College of Arts & Science,
Coimbatore, for her consultancy, encouraging me to pursue new goals and ideas.
My sincere thanks to Dr. C. ARUN PRIYA ., Assistant professor, PSG College
of Arts & Science, Coimbatore for her valuable suggestions, support and guidance
as my internal guide, without which my work would not have reached the present
form.
Last but not the least, I am greatly indebted to my parents and friends for
their kind cooperation in each and every step I took in this project.
ABSTRACT
Abstract
The majority of accidents happen due to the drowsiness of the driver. So, to prevent these
accidents we will build a system using Java, xml and google vision API which will alert the
driver when he feels sleepy.
Drowsiness detection is a safety technology that can prevent accidents that are caused by drivers
who fell asleep while driving .If the drivers eyes remain closed for more than a certain period of
time, the driver is said to be drowsy and an alarm is sounded.
AI techniques and Google Vision API for Android are utilized to analyze data for monitoring,
detecting, predicting and controlling driver drowsiness. Finally, the android application is
prepared end-to-end for the user and applied for data collection in the future research
experiment. The objective of this intermediate Java project is to build an automated
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. detection This is a
safety technology that can prevent accidents that are caused by drivers who fell asleep while
driving. The system so designed is a non-intrusive real-time monitoring system. The priority is
on improving the safety of the driver without being obtrusive. In this project the eye blink of the
driver is detected. This project was developed inorder to improve the security senses in
roadways and also to prevent the loss of life due to reasons like fatigue or carelessness .This
provides the solution for transport companies to have a higher probability of preventing
accidents , which eventually result the company in loss . The system yet has many future
enhancements that could even result in a greater usage in other sectors as well.
TABLE OF CONTENTs
CONTENTS PAGE NO
1. INTRODUCTION 1
2. SYSTEM SPECIFICATION
1. Hardware Specification 3
2. Software Specification 4
3. Software description 5
3. SYSTEM ANALYSIS 8
1. Existing system 8
2. Proposed system 9
4. SYSTEM DESIGN 10
1.Introduction 10
2.Input Design 10
3.Flowchart Diagram 11
5. SYSTEM TESTING 12
1.Testing 12
2.Types of Testing 15
7.CONCLUSION 17
8.BIBLOGRAPHY 17
9.APPENDICES 18
1.Form Design 18
2.Sample Coding 20
1. INTRODUCTION
The main purpose of this project is to develop the methodology to detect and predict driver
drowsiness at the early stages using physical and physiological variables. A feasibility test is
conducted to evaluate the accuracy and performance of the proposed methodology. AI
techniques and Google Vision API for Android are utilized to analyze data for monitoring,
detecting, predicting and controlling driver drowsiness. Finally, the android application is
prepared end-to-end for the user and applied for data collection in the future research
experiment.Drowsiness detection is a safety technology that can prevent accidents that are caused
by drivers who fell asleep while driving. The system so designed is a non-intrusive real-time
monitoring system. The priority is on improving the safety of the driver without being obtrusive.
1) Home Module
The home module presents the user to select the time variants for the closing of eyes and
the user can start by clicking on the start button
2) Initiation Module:
In this module the user can start the application as per the user’s start time , it will be
non active and idle during times before the start of the journey .
3) Detection Module:
In this module the face is recognized and identified by the application ,and displays the
status of the recognition of the user’s face in the application
4) Analysis Module :
The user face is analyzed by the extension of google API used for face detection and it
alerts the user in the event of any drowsiness
5) Report Module:
The final module where the report of the analysis is displayed at after the end of the
session .The start time and end time are displayed. .
2. SYSTEM SPECIFICATION
Speed : 2.33 G Hz
Ram : 4 GB
Camera : 5 mp
2.2 SOFTWARE SPECIFICATION
Hardware has all of the components that make your particular device work, and
without it, the software would not be accessible. The better the hardware, the more
appealing (in theory) the experience. On other hand, we have software. It might not
be tangible, but it's what you interact with most. You need intelligent software to
achieve that. Good hardware just won't do. Software is set to change the world.
This could be because it's more malleable and faster to change than hardware The
cost of change is much higher for hardware than for software. Software products
evolve through multiple releases by adding new features and re-writing existing
logic to support the new features.
Programming language
XML
JAVA.
Operating System
Windows 10 (Eclipse)/Android
2.3 SOFTWARE DESCRIPTION
Java
Java is a high-level, class-based, object-oriented programming language that is
designed to have as few implementation dependencies as possible. It is a general-
purpose programming language intended to let programmers write once, run
anywhere (WORA), meaning that compiled Java code can run on all platforms that
support Java without the need to recompile. Java applications are typically compiled
to bytecode that can run on any Java virtual machine (JVM) regardless of the
underlying computer architecture. The syntax of Java is similar to C and C++, but
has fewer low-level facilities than either of them. The Java runtime provides dynamic
capabilities (such as reflection and runtime code modification) that are typically not
available in traditional compiled languages. As of 2019, Java was one of the
most popular programming languages in use according to GitHub, particularly
for client–server web applications, with a reported 9 million developers.
Java uses an automatic garbage collector to manage memory in the object lifecycle. The
programmer determines when objects are created, and the Java runtime is responsible for
recovering the memory once objects are no longer in use. Once no references to an object
remain, the unreachable memory becomes eligible to be freed automatically by the garbage
collector. Something similar to a memory leak may still occur if a programmer's code holds a
reference to an object that is no longer needed, typically when objects that are no longer needed
are stored in containers that are still in use. If methods for a non-existent object are called, a null
pointer exception is thrown.
One of the ideas behind Java's automatic memory management model is that programmers can
be spared the burden of having to perform manual memory management. In some languages,
memory for the creation of objects is implicitly allocated on the stack or explicitly allocated and
deallocated from the heap. In the latter case, the responsibility of managing memory resides with
the programmer. If the program does not deallocate an object, a memory leak occurs. If the
program attempts to access or deallocate memory that has already been deallocated, the result is
undefined and difficult to predict, and the program is likely to become unstable or crash. This
can be partially remedied by the use of smart pointers, but these add overhead and complexity.
Note that garbage collection does not prevent logical memory leaks, i.e. those where the memory
is still referenced but never used.
Garbage collection may happen at any time. Ideally, it will occur when a program is idle. It is
guaranteed to be triggered if there is insufficient free memory on the heap to allocate a new
object; this can cause a program to stall momentarily. Explicit memory management is not
possible in Java.
Java does not support C/C++ style pointer arithmetic, where object addresses can be
arithmetically manipulated (e.g. by adding or subtracting an offset). This allows the garbage
collector to relocate referenced objects and ensures type safety and security.
As in C++ and some other object-oriented languages, variables of Java's primitive data types are
either stored directly in fields (for objects) or on the stack (for methods) rather than on the heap,
as is commonly true for non-primitive data types (but see escape analysis). This was a conscious
decision by Java's designers for performance reasons.
Java contains multiple types of garbage collectors. Since Java 9, HotSpot uses the Garbage First
Garbage Collector (G1GC) as the default. However, there are also several other garbage
collectors that can be used to manage the heap. For most applications in Java, G1GC is
sufficient. Previously, the Parallel Garbage Collector was used in Java 8.
Having solved the memory management problem does not relieve the programmer of the burden
of handling properly other kinds of resources, like network or database connections, file handles,
etc., especially in the presence of exceptions.
XML.
The design goals of XML emphasize simplicity, generality, and usability across the Internet. It is
a textual data format with strong support via Unicode for different human languages. Although
the design of XML focuses on documents, the language is widely used for the representation of
arbitrary data structures such as those used in web services.
3 SYSTEM ANALYSIS
3.1 EXISTING SYSTEM
The pre-existing application of driver drowsiness system was developed because the
majority of accidents happen due to the drowsiness of the driver. So, to prevent these accidents a
system using Python, OpenCV, and Keras which will alert the driver when he feels sleepy is
built and exists already.
This existing system analyses the driver’s heart rate, eye movement and other inputs such as
before and while driving photo to analyse the face detection for drowsiness detection of the
driver.
Disadvantages
The driver has to wear heart rate monitoring device at all times during driving.
The user has to input more data on the system.
Any slight malfunction in the hardware may lead to false report.
Does not provide a final report.
Time limit cannot be set for closing of the eyes.
3.2 PROPOSED SYSTEM
This project “ Automated Driver Drowsiness Detection system “ , was developed to minimalize
the hardware used in the pre existing system. In this new proposed automated drowsiness
detection system the driver needn’t wear any special monitoring devices , the driver just have to
start the application in the device and place it such a way it captures the face at all times and
stays active , this project goes inactive or displays the face as missing in case the driver seems to
have moved. It alarms and alerts the driver if any drowsiness is detected by the system.
Advantages
4.1 Introduction
The user interface design is very important for any application. The interface
design describes how the software communicated within itself, to system that
interpreted with it and with humans who use it. The interface is a packing for
computer software if the interface is easy to learn, simple to use. If the interface
design is very good, the user will fall into an interactive software application.
5.1 TESTING
The Automated Driver Drowsiness Detection System was tested along the following
guidelines to prove its validity. It was tested using the following technologies of the
software testing. Testing is the process of exercising software with the intent of finding
errors. The Web-app testing is a collection of related activities with a single goal: to
uncover errors in web application content, function, usability, navigability, performance,
capacity and security.
The test-case designer not only has to consider the white and black box test
cases, but also the timing of the data and the parallelism of the tasks that handle the
data. In many situations, test data provided when a real system is in one state will
result in proper processing, while the same data provided when the system is in a
different state may lead to error. The intimate relationship that exists between real-
time software and its hardware environment can cause testing problems. Software
tests must consider the impact of hardware faults of software processing. Step
strategy for real-time systems is proposed. The first step in the testing of real-time
software is to test each task independently (i.e.) the white and black box tests are
designed and executed for each task. Each task is executed independently during
these tests. The task testing uncovers errors in logic and functions, but will not
uncover timing or behavioural errors.
Verification
Unit Testing
Integration Testing
Validation Testing
UNIT TESTING
All the modules are tested individually using this test. Developers write unit tests to
check their own code. Unit testing differs from integration testing, which confirms that
components work well together, and acceptance testing, which confirms that an
application does what the customer expects it to do. Unit tests are so named because they
test a single unit of code. Unit testing focuses verification effort on the smallest unit of
software design. Each of the modules in this project was verified individually for errors.
INTGRATION TESTING
VALIDATION TESTING
6 FUTURE ENHANCEMENTS
This project has a wide scope for future development, as the user’s
requirement is always going to be changed which is not static and these needs are
dynamic. The technology which is famous today becomes out-dated in very next day.
To keep abstract of technical improvements, the system may be further refined. And
so such type of system is improved in further future development. This enhancement
is done in an efficient and effective manner. We can thus update the same with
further modification establishment and can be integrated with minimal modification.
Hence the project is extendable and can be developed in anytime with more advanced
features.
7 Conclusion
BIBLIOGRAPHY
https://www.java.com/en/download/help/sysreq.html
https://www.w3schools.com/xml/xml_whatis.asp
http://ethesis.nitrkl.ac.in/3373/1/thesis-
https://github.com/DeltaTheWolf/app-update-tracker/blob/master/Kik%20X/
unknown/androidsupportmultidexversion.txt
Github
APPENDICS
SAMPLE CODES:
<?xml
version="1.0"e
ncoding="UTF
-8"?>
<projectDescriptio
<name>Automate
>
<comment>Projec
AutomatedDriverD
Buildship.</comm
<projects>
</projects>
<buildSpec>
<buildComm
<name>org.eclipse.buildship.core.gradleprojectbuil
der</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnat
ure</nature>
</natures>
<filteredResources>
<filter>
<id>1635143105820</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</
id>
<arguments>node_modules|.git|
__CREATED_BY_JAVA_LANGUAGE_SERVER
__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
<?xml
version="1.0"
encoding="UTF-
8"?>
<project version="4">
<component
name="VcsDirectoryMappings">
<mapping
directory="$PROJECT_DIR$" vcs="Git"
/>
</component>
</project>
.