Drowsy Driver Detection System Using Computer Vision and Transfer Learning For Preventing Road Accidents
Drowsy Driver Detection System Using Computer Vision and Transfer Learning For Preventing Road Accidents
Ritesh Alkunte
Department of Computer Science and
Engineering – Artificial Intelligence
Vishwakarma Institute of Information
Technology
Pune, India
Abstract— Major traffic accidents are attributed to driver increase in traffic accidents these days is tiredness. According
fatigue, according to study on the topic. Driver drowsiness is a to the report by “Ministry of Road Transport & Highways”
state in which the driver of a car is on the verge of falling asleep there were 4,552 accidents reported every year in India, that
or losing consciousness. It can be brought on by a number of took lives of thousands of people because of sleepy drivers.
variables, including biological, physical, psychological, and There are two effective methods for determining a person's
other factors, all of which can impede and inhibit safe driving. level of sleepiness. The driver's face is first photographed,
The several methods that can be applied to the implementation after which the blinking values are computed, the eye retina
of a system for the detection of driver sleepiness will be reviewed detection, facial feature extraction, and threshold values are
in this paper. Improving the ability to identify drowsiness in real
set. Second, the driver hand pressure on the car steering wheel
time through computer vision is the main objective of all
technologies. Thus, our work also pertains to the identification
is calculated in real-time and the threshold value is set using
of driver drowsiness, whereby a motorist's tiredness can be the Aurdino module, which is integrated with elastomeric
ascertained by first recognizing their face, followed by eye sensors. However, in this paper we are focusing on the first
tracking. The system compares the extracted eye image with the method only. The goal of this project is to create a real-time
dataset. The system used the dataset and predicts using transfer system for detecting driver drowsiness that can recognize
learning with our base model as InceptonV3 to identify that it symptoms of inattention in drivers and notify them to take
could alert the driver with an alarm if the driver's eyes were appropriate safety measures. The technology analyzes eye
closed for a predetermined amount of time, and it could resume movements and facial expressions using computer vision
monitoring if the driver's eyes were open following the alarm algorithms to find patterns that suggest tiredness. Various deep
alert. We established a score that grew if the eyes were closed learning models have been utilized in previous research to
and dropped if they were open. This study aims to reduce traffic achieve this goal. Our goal is to lower the number of incidents
accidents by solving the sleepiness detection problem with caused by sleepy driving and improve road safety by
InceptionV3 with an accuracy of 95.46% compare to 92.11% of incorporating this technology into cars or driver assistance.
VGG16.Thus, driving drowsiness detection—which assesses a The face detection technology breaks down a continuous
driver's degree of fatigue using facial recognition and eye video feed into individual frames while also recognizing the
tracking becomes the main focus of our research. eye condition. Preprocessing is applied to every frame to
guarantee uniform analysis. This could entail normalizing
Keywords— fatigue, computer vision, face recognition, eye
tracking, transfer learning, InceptionV3, VGG16, alarm alert,
pixel values for best processing, switching to grayscale for
score. improved contrast, or scaling for uniformity. Subsequently,
each frame is scanned by a pre-trained Haar cascade classifier,
I. INTRODUCTION which is renowned for its effectiveness in object detection, to
identify faces. The technology focuses on the ocular region of
Sleepiness when driving is a major contributing cause to
the recognized face if face detection is accomplished. This
major traffic accidents, according to studies on the topic.
process is made easier by the robust computer vision library
These days, it's been observed that the main reason for
OpenCV.
drowsiness when driving is weariness. The main cause of the
2
Authorized licensed use limited to: MIT-World Peace University. Downloaded on February 19,2025 at 18:19:08 UTC from IEEE Xplore. Restrictions apply.
Fig 1. Working of the detection system
3
Authorized licensed use limited to: MIT-World Peace University. Downloaded on February 19,2025 at 18:19:08 UTC from IEEE Xplore. Restrictions apply.
IV. MODEL ARCHITECTURE computer vision library, is used to manage video capture and
Approaches used in the proposed model are explained as frame extraction, providing continuous monitoring. Detection
follows: of Faces and Eyes Using Haar Cascade Classifiers: After a
frame is captured, Haar Cascade Classifiers are used to detect
A. InceptionV3 faces and eyes. These classifiers are computationally efficient,
A number of essential elements are combined in the model enabling rapid identification of facial regions that are then
architecture of a drowsiness driver detection system that uses isolated for further processing.
InceptionV3 to ensure accurate and effective real-time driver D. Transfer learning with VGG16:
alertness monitoring. The system leverages Haar cascade
classifiers for initial facial and eye state recognition and After isolating the face and eye region, the system uses a
integrates OpenCV for real-time picture capture. These two pre-trained VGG16 model that uses transfer learning to tune
methods provide crucial input to the InceptionV3-based the model to detect drowsiness. This approach allows rapid
model. With this configuration, the system may focus on the adaptation of the basic model to identify fatigue-related
driver's face and eyes, which are the main signs of drowsiness, properties. The VGG16 architecture with stacked
and isolate crucial regions of interest (ROIs). We have used convolutions and pooling layers provides an easy way to
transfer Learning with InceptionV3 as illustrated in Fig 2. The extract important features from limited regions.
system employs a pre-trained InceptionV3 model, utilizing E. Feature extraction and classification using VGG16:
transfer learning to refine the model for sleepiness detection
A fine-tuned model, VGG16, processes the removed face
after separating the pertinent ROIs. This method extracts fine-
and eye regions to detect patterns that indicate sleepiness, such
grained features from the eye and face regions by utilizing as the degree of eye closure or facial muscle relaxation.
InceptionV3's deep architecture and inception modules. The Through consistent sequential convolutions and fusion,
cropped ROIs are processed by the improved InceptionV3 VGG16 can efficiently process these ROIs and create
model to extract important characteristics that point to meaningful map objects.
symptoms of fatigue. These characteristics include the tired-
looking state of the eyes (open or closed). A classification F. Classification with Keras and TensorFlow:
layer constructed using Keras, a high-level neural network The final classification layer is implemented with Keras,
toolkit coupled with TensorFlow, is a final component of the an advanced neural network framework integrated with
model design. This layer classifies the driver's state (e.g., alert TensorFlow. This layer uses extracted features from VGG16
or tired) using the characteristics extracted by InceptionV3. to classify the state of the driver as alert or sleepy. The
The final classification is usually produced using a softmax structure usually involves global averaging, which simplifies
activation function and global average pooling. Based on the feature maps for dense representation, and a softmax
classification results, the system triggers an audible activation function for multiclass classification.
alert(alarm), if drowsiness is detected. The real-time nature of
the system ensures that these alerts are issued promptly to G. Real-time alerts for drowsiness detection:
reduce the risk of accidents due to driver fatigue. The system output will trigger an alarm or other alarm
when drowsiness is detected. The linear structure and
controllable computing requirements of the VGG16 enable
the system to operate in real time and provide quick warnings
to reduce the risk of accidents due to driver fatigue.This model
architecture using the VGG16 to detect drowsiness provides a
simplified solution but a powerful alternative to InceptionV3.
It retains the critical features of real-time imaging, face and
eye state detection, and efficient transfer learning using
VGG16's uniform and simple convolutional layers for driver
attention classification.
H. Comparison of InceptionV3 and VGG16:
The unique requirements and limits will choose which of
the two sleepiness detection algorithms, InceptionV3 or
Fig 2. Transfer learning using InceptionV3 as basemodel VGG16, to use. The design of InceptionV3 is more intricate
and adaptable, including Inception modules that enable
B. VGG16 dimensionality reduction and parallel processing, which could
In order to create a driver detection system with VGG16, result in increased accuracy and computing efficiency. This
the model architecture must maintain similar properties while makes it appropriate for applications that require the
taking advantage of the simpler and more linear structure of acquisition of a wider variety of visual features and have
VGG16. This architecture replaces the InceptionV3 model access to computing resources. However, VGG16 offers a
with VGG16, another popular Convolutional Neural Network more straightforward, linear design that may require more
known for its deep but understandable design characterized by processing power due to its consecutive layers of 3x3
sequential 3x3 convolutional layers and 2x2 convergence convolutions and pooling. This makes it easier to understand
layers. The following describes an alternative model and change. VGG16 works best in situations where resource
architecture for sleep detection with VGG16: restrictions and simplicity are key considerations. While
VGG16 works well in settings that favor clarity and
C. Real-time image capture with OpenCV: adaptability, InceptionV3 may be a better option if you need
The system starts by capturing real-time video feeds from to strike a compromise between efficiency and accuracy.
a camera pointed at the driver's face. OpenCV, an open source
4
Authorized licensed use limited to: MIT-World Peace University. Downloaded on February 19,2025 at 18:19:08 UTC from IEEE Xplore. Restrictions apply.
V. RESULTS
The exploratory data analysis, results of the proposed
model and comparative analysis are shown in following
section.
>ŽƐƐĂŶĚĐĐƵƌĂĐLJĨŽƌ/ŶĐĞƉƟŽŶs ϯ
ϭ Ϭ͘ϵϭϯϯ Ϭ͘ϵϰϴϵ
Ϭ͘ϴϵϲϯ Fig 8. Open eye state
Ϭ͘ϵ
Ϭ͘ϴ
Ϭ͘ϳ
Ϭ͘ϲ
Ϭ͘ϱ
Ϭ͘ϰ
Ϭ͘ϯ Ϭ͘Ϯϲϳϲ
Ϭ͘ϮϬϱϮ
Ϭ͘Ϯ Ϭ͘ϭϯϯϳϰ
Ϭ͘ϭ
Ϭ
dƌĂŝŶŝŶŐ sĂůŝĚĂƟŽŶ dĞƐƚ
>ŽƐƐ ĐĐƵƌĂĐLJ
Fig 5. Comparison of accuracy and validation loss for VGG16 and Ref.no. Dataset Used Accuracy
InceptionV3 [2] MRL eye 91.56%
[3] dataset of 87.4%
84923 images
[5] 86.05%
[7] 92.5%
Our proposed 95.46%
model
5
Authorized licensed use limited to: MIT-World Peace University. Downloaded on February 19,2025 at 18:19:08 UTC from IEEE Xplore. Restrictions apply.
VI. CONCLUSION [10] D. R. S. Victoria and D. G. R. Mary, “Driver Drowsiness Monitoring
using Convolutional Neural Networks,” IEEE Xplore,Feb.01,2021.
In conclusion, the use of TensorFlow and OpenCV for https://ieeexplore.ieee.org/document/9397070/
drowsiness detection demonstrates how computer vision and [11] Ioana-Raluca Adochiei et al., “Drivers’ Drowsiness Detection and
machine learning may be applied to real-world safety issues. Warning Systems for Critical Infrastructures,” Oct.2020,doi:
These technologies offer an essential additional level of https://doi.org/10.1109/ehb50910.2020.9280165.
security in sectors like transportation and healthcare since they [12] M. Dua, Shakshi, R. Singla, S. Raj, and A. Jangra, “Deep CNN models-
can identify early indicators of sleepiness in real time. Future based ensemble approach to driver drowsiness detection,” Neural
Computing and Applications, Jul. 2020, doi:
advancements in drowsiness detection for drivers will focus https://doi.org/10.1007/s00521-020-05209-7.
on improving real-time processing with faster algorithms, [13] M. Ahmed, S. Masood, M. Ahmad, and A. A. A. El-Latif, “Intelligent
reducing false positives and negatives. Privacy concerns will Driver Drowsiness Detection for Traffic Safety Based on Multi CNN
be addressed with secure handling of facial data. Adaptive Deep Model and Facial Subsampling,” IEEE Transactions on
systems will enhance accuracy by accommodating individual Intelligent Transportation Systems, pp. 1–10, 2021, doi:
differences. Innovative neural network architectures will https://doi.org/10.1109/tits.2021.3134222.
improve understanding of video data. Data augmentation and [14] W. AlKishri, A. Abualkishik, and M. Al-Bahri, “Enhanced Image
Processing and Fuzzy Logic Approach for Optimizing Driver
transfer learning from large datasets will boost accuracy. Drowsiness Detection,” Applied Computational Intelligence and Soft
Human factors research will optimize systems for various Computing, vol. 2022, pp. 1–14, Mar. 2022, doi:
lighting, demographics, and environmental factors. https://doi.org/10.1155/2022/9551203.
Integrating drowsiness detection with Advanced Driver
Assistance Systems (ADAS) could lead to proactive alerts and
interventions, enhancing road safety. Through the use of
sophisticated neural network topologies and adaptive
algorithms, these technologies provide a reliable and effective
method of lowering the likelihood of accidents brought on by
driver weariness. Drowsiness detection systems can reduce
false positives and negatives by emphasizing efficiency and
precision, which increases their dependability for daily use.
Ultimately, these innovations represent a significant step
forward in promoting safety and reducing the risks associated
with drowsiness, creating a safer experience for drivers and
other stakeholders.
REFERENCES
[1] S. Ramesh, R. Jain, and Sanjay Tippannavar, “RTD3 – Real Time
Driver Drowsiness Detection System Using CNN on Inception V3
Model,” International journal of innovative research in advanced
engineering, vol. 10, no. 03, pp. 106–111, Mar.2023, doi:
https://doi.org/10.26562/ijirae.2023.v1003.09.
[2] N. Gupta, F. Khan, and B. Saini, “Real Time Driver Drowsiness
Detecion using Transfer learning,” Jan. 2023, doi:
https://doi.org/10.1109/icct56969.2023.10075913.
[3] Sasi Preetham Ch, Shanmanth Guduru, Vinay Ronagala, Harisudha
Kuresan, and Samiappan Dhanalakshmi, “Automatic System for
Driver Drowsiness Detection System using Deep Learning,” Jan.2023,
doi: https://doi.org/10.1109/iconat57137.2023.10080067.
[4] J. R and C. Jacob, “Deep CNN Based Approach for Driver Drowsiness
Detection,” IEEE Xplore, Dec. 01, 2022.
https://ieeexplore.ieee.org/document/10059547
[5] Y. Suresh, R. Khandelwal, M. Nikitha, M. Fayaz, and V. Soudhri,
“Driver Drowsiness Detection using Deep Learning,” 2021 2nd
International Conference on Smart Electronics and Communication
(ICOSEC), Oct. 2021, doi:
https://doi.org/10.1109/icosec51865.2021.9591957.
[6] Mohammad Elham Walizad, Mehreen Hurroo, and Divyashikha
Sethia, “Driver Drowsiness Detection System using Convolutional
Neural Network,” Apr. 2022, doi:
https://doi.org/10.1109/icoei53556.2022.9777182.
[7] P. Kumar and S. A. M, “Driver Behavior Analysis Using Deep
Learning,” 2022 International Conference on Computer
Communication and Informatics (ICCCI), Jan. 2022, doi:
https://doi.org/10.1109/iccci54379.2022.9740778.
[8] Farshad Farahnakian, Janika Leoste, and Fahimeh Farahnakian,
“Driver Drowsiness Detection Using Deep Convolutional Neural
Network,” 2021 International Conference on Electrical, Computer,
Communications and Mechatronics Engineering (ICECCME), Oct.
2021, doi: https://doi.org/10.1109/iceccme52200.2021.9591029.
[9] P. D. Purnamasari, A. Kriswoyo, A. A. P. Ratna, and D. Sudiana, “Eye
Based Drowsiness Detection System for Driver,” Journal of Electrical
Engineering & Technology, vol.17,no.1,pp.697–705,Oct.2021,doi:
https://doi.org/10.1007/s42835-021-00925-z.
6
Authorized licensed use limited to: MIT-World Peace University. Downloaded on February 19,2025 at 18:19:08 UTC from IEEE Xplore. Restrictions apply.