AI Free CodeFEATURED

Driver Drowsiness Detection System – AI Project

According to surveys by the World Health Organization (WHO) on road accidents, about 1.3 million people die every year on road highways in 2018. Also, a survey report and research provided by the National Highway Traffic Safety Association (NHTS) on road accidents, about 795 people die from drowsy-driving and 91,000 people die from motor vehicle crashes involving drowsy driving in 2017. So, the drowsy driver is considered as one of the factors for road accidents. Likewise, the researchers show that after 2 to 3 hours, the driver is exhausted and the steering efficiency is also reduced. Likewise, in the early afternoon, after getting lunch and at midnight, there is a larger risk. So, in simple terms, drowsiness is defined as a disorder in which a person feels asleep during active hours. Thus, in this program i.e. Driver Drowsiness Detection System helped us to research three types of people who are suffering from drowsiness: they are categorized as awake, rapid eye movement (REM), and non-rapid eye movement (NREM). Similarly, persons suffering from non-rapid eye movement are subdivided into three stages. They are listed below:

Stage IThe transition from awake to sleep
Stage IILight Sleep
Stage IIIDeep Sleep
Table 1: NREM Stages

First stage i.e. “The transition from awake to sleep” is considered as a drowsiness state by researchers for analyzing the driver’s drowsiness. Drowsing when driving is dangerous as it can lead to some serious cases too. The driver should be monitored and alert when the driver is in the drowsy condition in order to avoid road injuries. Some of the techniques used to monitor and alert are vehicle-based, behavioral-based, and physiological-based.

Different system to detect drowsiness
Figure 1: Different system to detect drowsiness

Vehicle-Based: In this type, different mechanical parts of the vehicle are included, such as steering, the motion of the wheel, lane detection, speed of the vehicle, and many. All these mechanical components are constantly monitored and if any of the components have exceeded the threshold value, the device determines that the driver is in a drowsy state. Some of the systems like radar, GPS, infrared cameras to alert the driver and provide some instruction not to drowse. A brand like Ford, Tesla, Infiniti, Volvo, and much other company provides features to alert the driver. In this vehicle-Based system, automatic identification of lanes provides human drivers with assistance. This feature serves to alert a driver if the car is actually steering off track.

Behavioral-based: It is also one of the techniques by which the camera can detect the driver’s drowsiness. In this behavioral-based different behavior of head such as the position of the head, eye closing or blinking, yawing, etc. All of the behavior is continuously tracked and observed by a camera. Drowsiness can be measured through the distance between eyelids at three stages. The average number of blinks per minute was taken from the estimate, as long as the driver grows drowsier. The technique of detecting drowsiness tracks the mouth and yawning behaviors along with closure and opening of the eyes. The driver is alerted when any of those signs are identified and the driver wakes up. And for facial recognition, the viola-jones object detection algorithm may be used.

Physiological-based: Physiological signals such as ECG (Electrocardiogram) and EOG (Electrooculogram) are used in the physiological category. The ECG is used to monitor the heart rate and also to check the various potential conditions for drowsiness. And the EOG is used to measure the different electrical functions of the brain. So, the system observes the heart rate, pulse rate, and brain activity to detect the drowsiness and alert the driver.

Objectives

Following are some of the objectives of this android based drowsiness detection system:

  • a. Research on the various system to detect drowsiness

  • b. Understand the working flow of the system

  • c. Implementation of an accurate algorithm for the motion of eye detection and produce alert sound after detecting drowsiness

  • d. Testing performance of the system

  • e. Prepare report based on the project

Limitation of the project

While researching and building a project, fatigue is observed using image recognition and computer vision techniques.

  • a. Keeping the user’s head down causes fatigue detection inaccuracy

  • b. There is no dual user usability available

  • c. The eye-detection algorithm which plays an important role in detecting drowsiness creates a high degree of misunderstanding when tested with different positions of eyes.

  • d. It is only prevention, not a solution

Brief Detail of Artifact Produced

An android application for detecting driver drowsiness is a program that detects and alerts a user who is at a drowsy state. An android studio which is the Integrated Development Environment (IDE) is used for the app development. The camera of the android application has a clutter-free and simple interface. And the camera is used to detect the face of the user with the main features i.e. eye. A certain threshold is established by eye-tracking in order to identify the drowsy eye of a human. The alarm begins when the human is completely awakened when the eye becomes lower than the threshold as defined. Then again, it continues to train the people. Furthermore, the alert sound begins if the people are overwhelmed and are not focused on driving and unable to trace their faces. There is an end button at the end to close the camera mode.

Flow of the main system
Figure 2: Flow of the main system

Literature review

The various techniques have been developed and researched by the researcher to detect drowsiness. One of the most used techniques to detect drowsiness is based on computer vision in recent years. The most common algorithm for this approach consists of a face of the driver and estimates landmarks in the face region. 

Comparison of the similar drowsiness detection system

S.NGalarza(2018)Dwivedi(2014)Wijnands(2019)Samiee (2014)Garcia (2012)Proposed System
Based on Android OSYesNo YesNo No Yes
Create AccountNoNo No No No Yes
Detect faceYesYesYesNoYesYes
Detect EyeYesYesYes No Yes Yes
Detect ECGNoNo NoYesNoNo
Alert with text NoYesNoNoNo Yes
Alert with audio soundYesNoYesYesYesYes
Table 2: Comparison table of a proposed system with a similar system

Analysis of reviewed proposed system and similar system

  • a. The proposed system is designed for daily use

  • b. The proposed system is used to detect the drowsiness of users while driving

  • c. The proposed system can be used for the people who wear glasses

  • d. The proposed may lack incase of anti-light and dark

  • e. The proposed can be used with no internet connection

  • f. The proposed system can be used cost-free

  • g. The proposed system is easy to use and straight forward

SRS Document

SRS stands for System Requirement Specification, which defines the system’s specifications and functions that must be implemented. This paper is completely based on the system’s architecture. The table below displays the overall device characteristics and criteria that are necessary to have.

Figure 3: SRS Legend

SRS Report

Working Mechanism

 Working Mechanism
Figure 4: Working Mechanism

Use Case Diagram

Use Case Diagram of drowsiness detection program
Figure 5: Use Case Diagram

Testing

Figure 6: Testing of driver drowsiness detection system

Future Escalation 

With the advent of technologies and innovations, the proposed application could be further developed. The following are the new enhancements that can be introduced to enhance the program and the accessibility of the end-user in the future.

  • a. Both Android and IOS will be compliant with this program

  • b. The application can also be identified by mouth

  • c. The threshold can be set by users according to the size of their eyes

  • d. The user can be traced in an emergency case with the access location

  • e. More can be applied to alarm sound so that the user can select the sound

  • f. If the user does not respond for a longer time, emergency call and message will be sent automatically

!! DOWNLOAD CODE NOW !!

Academic Questions:

1. Why have you selected this project as a project for the final year?

Ans -> The identification of drowsiness is one of the fascinating topics as many people died in a traffic crash and there are many incidents of crashes triggered by a driver’s drowsiness. Therefore, using the program will serve to make users alter when driving. This can benefit users a great deal and can be further enhanced by the development of technologies in the future.

2. How does this driver drowsiness detection system detect if the person is drowsing or not?

Ans -> After the installation of the program, the user just needs to open the application and turn on the camera. The opened camera should be placed near to the steering wheel. The face of the user can be detected by using Google API. If the user is in a drowsy state then different colored boxes will appear in the face of the user and alert the user using sound. The system waits for three seconds until the user eye begins to get smaller as set threshold 0.2, so if the user’s eye does not exceed 0.2, then the alert sound starts. 

3. How does this program alert a person?

Ans -> When the user begins drowsing, the system alerts the person with the audio and displays a warning message on the top of the display. Unless the user becomes active, the alarm sounds will not end. In addition, when the user’s eye is not visible, the alarm begins. 

Thanks for your time ☺

What do you think of this Driver Drowsiness Detection System? Let us know by leaving a comment below. (Appreciation, Suggestions, and Questions are highly appreciated).

2 thoughts on “Driver Drowsiness Detection System – AI Project

Leave a Reply

Your email address will not be published. Required fields are marked *