Driver Drowsiness Detection System

Download Full-Text PDF Cite this Publication

Text Only Version

Driver Drowsiness Detection System

Vasundhara Iyer

Department of Engineering, Science and Humanity.

Vishwakarma Institute of TechnologyPune, India

Varad Ingale

Department of Engineering, Science and Humanity.

Vishwakarma Institute of Technology Pune, India

Atharv Vanjari

Department of Engineering, Science and Humanity.

Vishwakarma Institute of TechnologyPune, India

Varun Gujarathi

Department of Engineering, Science and Humanity.

Vishwakarma Institute of Technology Pune, India

Varun Patil

Department of Engineering, Science and Humanity.

Vishwakarma Institute of Technology Pune, India

Yogeshwari Rathod

Department of Engineering, Science and Humanity.

Vishwakarma Institute of Technology Pune, India

AbstractMost of the accidents that have been reported in our country is due to lack of concentration of the driver or feeling drowsy by the driver. Fatigue and microsleeping behind the wheel are frequently the cause of major accidents. However, early indicators of weariness can be noticed before a severe scenario emerges, therefore detecting and indicating driver fatigue is still a study issue. The majority of classic sleepiness detection methods are based on behavioral factors, while some are obtrusive and may distract drivers, and others need costly sensors. In this paper, we have designed a Driver Drowsiness Detection System using Python and Dlib models. This method can reduce the number of road accidents also the proposed system does not require any physical contact with the driver, so it is easy to implement. The system can detect facial landmarks, computes Eye Aspect Ratio (EAR) to detect drivers drowsiness based on adaptive thresholding. Machine learning algorithms have been employed to test the effectiveness of the proposed approach.

Keywords:- Dlib, Eye Aspect Ratio, Face detection, facial landmarks, HOG, OpenCV.

I. INTRODUCTION

The development of technology allows us to introduce more advanced solutions in standard of living. As Per the info provided by NHTSA each year about 100,000 crashes get reported involving drowsy driving. The exact figure would be far more. Facial expressions can offer deep insights into many physiological conditions of the body. There are innumerable number of algorithms and techniques available for face detection which is the fundamental commencement within the process. Drowsiness in humans is characterized by some very specific movements and facial expressions- e.g.- the eyes begin to shut. To encounter this worldwide problem, an answer is tracking eyes to detect drowsiness and classify a driver drowsy. For real time application of the model, the input video is acquired by mounting a camera on the dashboard of the car and capturing the drivers face. The Dlib model is trained to spot 68 facial landmarks, from which the drowsiness features are extracted, and the driver is alerted if drowsiness is detected.

A lot of research is done in the field of driving safety to reduce the number of accidents. Following work was referred to for the study of the proposed system.

S. Kailasam [1] in his paper has designed a system that monitors the drivers face from when the car starts. This mainly helps us to completely monitor the drivers eye blinking and observe it continuously. They used a speed control system to check the speed of the car and the face

image of the driver was being checked using a camera which was already fixed in front of him to alert the driver if they slowed down. It contains two parts: Working of Night vision camera and Prediction of Eye Blinking rate. This research shows the drowsiness detection and controls the accidents from increasing. If the vehicle is found to be speeding, the control system successfully sends information to the speedometer and thus it reduces to the random speed.

V. Shrivastava [2] in his paper has desiged a system with the objective to process images produced by monitoring drivers passively and using it to extract facial features and detect signs of distraction. An important feature of this system is real-time analysis for alerting drivers and avoiding accidents caused by distracted driving. The parameter used for making decisions about distraction is pupil. Using PERCLOS to detect distraction. The proposed algorithm is implemented in which current and ideal position of pupil is detected. Gaze is estimated based on the difference between distance from current pupil position and ideal pupil position to eye corner. The algorithm has been implemented considering the frontal face images. The accuracy obtained for the gaze detection was around 75-80%.

B. K. Rajan [3] in his paper focuses on building a system which detects more accurately and precisely the fatigue condition of the driver. This system is based on image processing. Compared to vehicle based and physiological signal-based techniques image-based technique is more secure and easy to implement. In this method, drowsiness was detected based on two conditions. The condition is checking the duration of blink and the next is counting the eye blink. The face was detected and tracked using a combination of viola jones and KLT algorithm. Viola- Jones algorithm will detect the object if the object is not moving During driving when there occurs any variation in the posture of it will adversely affect face detection. So, the KLT feature tracker is used to record the attributes in the detected face. The proposed methodology givesa new method to determine the weak condition of the driver and alert them when they start to fall asleep. By this idea, the number of accidents can be reduced, and it will confirm a safe journey.

J. Manikandan [4] in his paper focuses on tracking the

eyes and mouth to detect drowsiness and classify a driver as drowsy. For real time application of the model, the input video was acquired by mounting a camera on the dashboard of the car and can accommodate the drivers face, hands, upper body and occlusions such as non-tinted spectacles. For real- time application of the model, the input video can be acquired by mounting a camera on the dashboard of the car and can accommodate the drivers face line the Dlib approach, the librarys pre-trained 68 facial landmark detector is used. Face detector which is based on Histogram of Oriented Gradients (HOG) was implemented. The proposed algorithm was the Eye Aspect Ratio (EAR) to monitor the drivers blinking pattern and Mouth Aspect Ratio (MAR) to determine if the driver yawned in the frames of the continuous video stream. The results of real-time detection are lower as the model currently works exceedingly well under good to perfect light conditions like those found in the dataset videos, whereas the real-time testing was performed under a variety of lighting conditions. Various real time testing can be also performed under a variety of lighting conditions.

P. Kanani, [5] in his paper focuses on a System Capable to perform various tasks such as analysing alertness of the driver, detection of the car lane changes, detection of alcohol, calculating proximity of the objects on the road, analysing sentiments of the driver. In the cases where the driver needs tobe alerted regarding the situation, an alarm is played. Theproposed solution, Drowsiness of the driver is predicted with the help of EAR (Eye Aspect Ratio). In Real Time Eye Blinking Using Facial Landmarks A pre- trained Histogram of Oriented Gradients + Linear Support Vector Machine Object Detector for Facial Detection is utilized. The prototype accurately detected various cars, a person as well as a stop sign. Th system prevents the engine from starting if the alcohol sensor detects the alcohol level to be higher than the permitted levels. The prototype accurately detected various cars, a person as well as a stop sign shows the detection of a car.

V. Nagarajan [6] in his paper focuses on building a system based on Viola and Jones' method. It detects faces of humans in three ways vertically, horizontally and rectangular. The system is used to design the camera and thus the points are directed towards the driver's face and monitor the eye closure of the driver to distinguish the fatigue or drowsiness of the driver. The Viola- jones method is used to segment the face and eye of the person from the camera. Then PERCLOS is used to detect the eye closure. The ADA Boost and Viola- jones are used for rejection cascading. The present study states the drowsiness in drivers while travelling and which is the major cause for the accidents. In this paper the concept of Viola- Jones method is used. The eye closure is having three states open, closed, partially closed. If the drivers eyes are closed means the alarm/warning signal is given to the driver.

  1. METHODOLOGY

    The suggested method for detecting tiredness in drivers operates on two levels. The procedure begins with the camera recording live video frames, which are then transferred to a local server. The Dlib library is utilised on the server to identify facial landmarks, and a threshold value is used to determine whether or not the driver is sleepy. The EAR (Eye Aspect Ratio) is then computed using these face landmarks and given to the driver. The EAR value obtained at the application's end is compared to a threshold value of 0.25 in our system. The driver is regarded to be sleepy if the EAR value is less than the threshold value. An alarm would then sound, alerting the driver and passengers.

    1. Components

      For drowsiness detection we have used OpenCV and Python. The Dlib library is used to detect and isolate the facial landmarks using Dlib pre-trained facial landmark detector. In this approach, 68 facial landmarks have been used.

    2. Facial landmark marking

      Dlib library is imported and used for the extraction of facial landmarks. Dlib uses a pre-trained face detector, that is an improvement of the histogram of oriented gradients . It consists of two shape predictor models trained on the i-Bug 300-W dataset, that each localize 68 and 5 landmark points respectively within a face image [4]. In this approach, 68 facial landmarks have been used.

      In this method, frequencies of gradient direction of an image in localized regions are used to form histograms. It is especially suitable for face detection; it can describe contour and edge features exceptionally in various objects.

      For recording the Facial Landmarks ,the Facial Landmark Predictor was used by the system to calculate lengths for the EAR values.

      The following figure represents the facial landmark points of the Dlib library, which are used to compute EAR.

      Fig. 1 Facial Landmarks

    3. Algorithm

      Input video (real-time) is fed into the model.

      Input video (real-time) is fed into the model.

      Fig. 2 Eye Coordinates

      Here P1, P2, P3, P4, P5, P6 are the pupil coordinates EAR is generally a constant when eyes are open and is near about

      0.25. When EAR is less than 0.25 It is concluded that Person is drowsy.

      Eye Aspect Ratio(EAR) is calculated for both the eyes,

      IF

      FACE DETECTION USING DLIB

      FACE DETECTION USING DLIB

      EAR>0.25

      (|P2 P6| + |P3 P5|) 2(|P1 P4|)

      DETECT EYES FROM FACIAL LANDMARKS

      DETECT EYES FROM FACIAL LANDMARKS

      (1)

      ALARM WILL RING AND

      The numerator determines the distance between the upper and lower eyelids using equation 1. The horizontal distance of the eye is represented by the denominator. EAR values are utilised to identify driver sleepiness in this framework. The average of the EAR values of the left and right eyes is obtained. The Eye Aspect Ratio is watched in our sleepiness detection system to see whether the value falls below the threshold value and does not climb over the threshold value in the following frame. The individual has closed their eyes and is sleepy, as indicated by the aforementioned circumstance. In contrast, if the EAR value rises again, it means that the person is simply blinking his eyes and is not drowsy. The block design of our suggested technique to identify driver sleepiness is shown in Figure 3(Block diagram)..

    4. Testing

    Following is the table representing the three test cases that are to be encountered while doing this project that concerns with the drowsiness of the driver.

    TEST CASES

    EYES DETECTED

    EYES CLOSURE

    RESULT

    CASE 1

    NO

    NO

    NO RESULT

    CASE 2

    YES

    NO

    NO ALARM

    CASE 3

    YES

    YES

    ALARM

    TEST CASES

    EYES DETECTED

    EYES CLOSURE

    RESULT

    CASE 1

    NO

    NO

    NO RESULT

    CASE 2

    YES

    NO

    NO ALARM

    CASE 3

    YES

    YES

    ALARM

    Table. I Test Cases

    EXTRACT EYES INFORMATION USING DLIB

    CALCULATE EAR (EYE ASPECT RATIO)

    IF EAR<0.25 THEN,

    ALERT THE DRIVER

    At the point when the eyes are shut for more than certain measure of edges then we find that the driver is feeling tired. Henceforth these cases are distinguished is and a caution sounded.

    Fig. 3 Block Diagram of Proposed Method

  2. RESULTS AND DISCUSSION

    For this venture we utilized a webcam associated with the laptop. Inbuilt speaker in the system is utilized to deliver sound output to awaken the driver when drowsiness is detected. The framework was tried for different individuals in various surrounding lighting conditions (daytime and evening time).

    Table. II Result Table

    Serial No.

    Eye Detection accuracy

    Drowsiness Accuracy

    Sample1

    83.34%

    80%

    Sample2

    80%

    62.5%

    Sample3

    75%

    83.34%

    Sample4

    75%

    66.67%

    Sample5

    87.5%

    100%

    TOTAL

    80.17%

    78.50%

    Every individual who volunteered for the test will be approached to squint multiple times and act sluggish multiple times amid the test procedure.

    Eye Detection Accuracy =

    total no. of times eyes detected (total no. of times eyes detected + total no. of times eyes not detected)

    Drowsiness Detection Accuracy =

    total no. of times alarm sounds (total no. of times alarm sounds + total no of times alarm didnt sound)

  3. LIMITATIONS

    1. Dependency on proper ambient light: –

      With poor lighting conditions occasionally, the System is unfit to perceive the eyes. So, it gives a wrong result which must be managed.

    2. An optimum range is required: –

      The Opencv can detect live images up to only certain distances up to 23.5 cm from webcam to face . So, thesecan major problem for the drivers.

    3. Orientation of face: –

      At the point when the face is tilted to a specific degree it will in general be perceived, anyway past this the framework can't identify the face.

    4. Problem with multiple faces: –

      The webcam cannot detect more thn one face at a time. So, it can give wrong results and may cause severe injuries.

  4. CONCLUSION

    The library's pre-trained 68 facial landmark detector is employed in this Dlib technique. The face detector was constructed, which is based on the Histogram of Oriented Gradients (HOG).The quantitative metric used in the proposed algorithm was the Eye Aspect Ratio (EAR) to monitor the Driver Drowsiness.

    The average real-time test accuracies obtained using Dlib for Eye Detection Accuracy was found to be 80.17% and Drowsiness Accuracy as found to be 78.50%.

    The results of real-time detection are lower as the model currently works well under good lighting conditions.

  5. REFERENCES

    1. S. Kailasam, M. Karthiga, R. M. Priyadarshini, K. Kartheeban and K. Anithadevi, "Accident Alert System for Driver Using Face Recognition," 2019 IEEE International Conference on Intelligent Techniques in Control, Optimization and Signal Processing

    2. A. Walavalkar, S. Singh, R. Salian and V. Shrivastava, "Driver Distraction Monitoring and Alerting System," 2019 1st International Conference on Advances in Information Technology (ICAIT), Chikmagalur, India, 2019,

    3. H. Joseph and B. K. Rajan, "Real Time Drowsiness Detection using Viola Jones & KLT," 2020 International Conference on Smart Electronics and Communication (ICOSEC), Trichy, India

    4. S. Mohanty, S. V. Hegde, S. Prasad and J. Manikandan, "Design of Real-time Drowsiness Detection System using Dlib," 2019 IEEE International WIE Conference on Electrical and Computer Engineering (WIECON-ECE), Bangalore, India, 2019

    5. A. Raorane, H. Rami and P. Kanani, "Driver Alertness System using Deep Learning, MQ3 and Computer Vision," 2020 4th International Conference on Intelligent Computing and Control Systems (ICICCS), Madurai, India, 2020

    6. K. S. Sankaran, N. Vasudevan and V. Nagarajan, "Driver Drowsiness Detection using Percentage Eye Closure Method," 2020 International Conference on Communication and Signal Processing (ICCSP),Chennai, India, 2020

    7. K. S. Sankaran, N. Vasudevan and V. Nagarajan, "Driver Drowsiness Detection using Percentage Eye Closure Method," 2020 International Conference on Communication and Signal Processing (ICCSP),Chennai, India, 2020

    8. Ahmed, Javed et al. Eye behaviour based drowsiness Detection System. 2015 12th International Computer Conference on Wavelet Active Media Technology and Information Processing (ICCWAMTIP) (2015): 268-272

Leave a Reply

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