0% found this document useful (0 votes)
11 views7 pages

Driver Drowsiness Detection with CNN

The document presents a driver alert system utilizing Convolutional Neural Networks (CNN) to detect driver drowsiness through real-time facial analysis. The system employs a non-intrusive approach using a webcam to monitor eye and mouth states, issuing alerts when fatigue is detected, thereby enhancing road safety. Future enhancements may include integration with other vehicle safety systems and adaptation to individual driver patterns for improved accuracy.

Uploaded by

shlok
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views7 pages

Driver Drowsiness Detection with CNN

The document presents a driver alert system utilizing Convolutional Neural Networks (CNN) to detect driver drowsiness through real-time facial analysis. The system employs a non-intrusive approach using a webcam to monitor eye and mouth states, issuing alerts when fatigue is detected, thereby enhancing road safety. Future enhancements may include integration with other vehicle safety systems and adaptation to individual driver patterns for improved accuracy.

Uploaded by

shlok
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

INTERNATIONAL JOURNAL OF LATEST TECHNOLOGY IN ENGINEERING,

MANAGEMENT & APPLIED SCIENCE (IJLTEMAS)


ISSN 2278-2540 | DOI: 10.51583/IJLTEMAS | Volume XIV, Issue IV, April 2025
Driver Alert System Using Convolutional Neural Network
Karthick. A, Dr. V. SUMALATHA
Department of Computer Applications – PG, VISTAS
DOI: [Link]
Received: 05 May 2025; Accepted: 07 May 2025; Published: 16 May 2025
Abstract: Driver alert system is a project to detect the drowsiness of the driver with help of CNN—Convolutional Neural Network.
In recent years, deep learning methods, particularly convolutional neural networks (CNNs), have shown promising results in
detecting driver drowsiness. In this detection system, we are going to build a non-contact technique for judging different levels of
driver alertness and facilitate early detection of a decline in alertness during driving. In such a case when drowsiness or yawning is
detected, a warning alarm is issued to alert the driver. In our project, we will employ a convolutional neural network which detects
the states of the eyes and mouth from the ROI images, and also we will be using OpenCV for gathering the images from the webcam
and feeding them into the deep learning model which will classify whether the person’s eyes are ‘Opened’ or ‘Closed’. The model
is trained on a large dataset of facial expressions representing different drowsiness levels to improve its accuracy and performance.
By continuously monitoring the driver’s facial landmarks in real time, the system can ensure proactive intervention. The use of
non-invasive techniques also ensures that the driver remains comfortable and undistracted. The alert mechanism can include both
sound and visual cues to effectively bring the driver’s attention back to the road. Furthermore, the system is designed to operate
efficiently even under varying lighting conditions and with different facial features. The CNN model is optimized for low-latency
predictions to make sure alerts are timely. In conclusion, the proposed driver alert system using CNN shows great potential in
improving road safety by detecting and alerting drivers. In the future, this system can be integrated with other vehicle safety
mechanisms like automatic braking or steering control. It can also be enhanced with infrared sensors to work accurately during
nighttime or in low-light environments. Additional features like tracking head movement or blink duration can further strengthen
the model’s reliability. The project can be extended to support multi-driver environments, such as public transport systems. We can
also deploy the system on edge devices like Raspberry Pi for real-time, on-board processing. With continuous advancements in AI
and hardware, the scope for such smart safety systems is vast. This system not only ensures driver safety but also safeguards
passengers and pedestrians by minimizing the chances of road accidents caused due to fatigue. The implementation of such
technologies reflects the growing importance of AI in real-world safety-critical applications. Moreover, the system can be further
enhanced by incorporating machine learning algorithms that adapt to individual driver patterns, offering personalized alerts based
on their driving behavior.
Keywords—Drowsiness detection, Convolutional Neural Networks, OpenCV

I. Introduction
Every year, thousands of lives are tragically lost worldwide due to vehicle accidents, with drowsiness being one of the leading
causes. Drowsiness in drivers is a serious issue that not only increases the risk of accidents but also jeopardizes the safety of other
road users. As a result, it is crucial to develop and implement effective systems to detect driver fatigue and alert them before it leads
to dangerous situations. A robust drowsiness detection system can help mitigate the number of accidents caused by driver fatigue,
ultimately saving lives.
To address this critical issue, we propose an advanced solution based on Convolutional Neural Networks (CNN), which have proven
to be highly effective in image recognition and classification tasks. In this methodology, we treat the task of drowsiness detection
as an object detection problem, where the system focuses on identifying and localizing key features that can indicate signs of
drowsiness, such as the state of the driver's eyes and facial expressions. By continuously monitoring the real-time video stream
from a driver’s face, the system is capable of assessing whether the eyes are open or closed, which is a strong indicator of alertness.
The CNN model is trained on a large dataset consisting of various facial expressions and states associated with different levels of
drowsiness. This training enables the system to accurately detect even subtle changes in the driver’s facial features, allowing for
early intervention when drowsiness or fatigue is detected. The real-time processing of video streams ensures that the system can
provide immediate alerts to the driver, helping them to regain focus and avoid potential accidents.
This detection system is designed to be non-intrusive, utilizing standard webcam technology to capture images without distracting
the driver. Furthermore, it can be integrated into existing vehicle safety systems and enhanced with additional features, such as
monitoring blink duration or detecting yawning. With its ability to work efficiently under varying lighting conditions and with
different facial structures, this drowsiness detection system has the potential to significantly improve road safety and reduce the
number of fatalities caused by driver fatigue.
In addition to detecting the basic signs of drowsiness, such as eye closure, the proposed system can be further enhanced by
incorporating other factors such as head movements and the rate of eye blinking. These additional parameters can provide a more
comprehensive understanding of the driver’s alertness and improve the accuracy of the system’s predictions. By analyzing these

[Link] Page 778


INTERNATIONAL JOURNAL OF LATEST TECHNOLOGY IN ENGINEERING,
MANAGEMENT & APPLIED SCIENCE (IJLTEMAS)
ISSN 2278-2540 | DOI: 10.51583/IJLTEMAS | Volume XIV, Issue IV, April 2025
factors in conjunction with eye closure, the system can better differentiate between temporary distractions and genuine fatigue.
Moreover, the system can be integrated with other in-vehicle safety mechanisms, such as lane departure warnings, automatic
braking, or steering assistance, to take immediate corrective actions when drowsiness is detected. These interventions can
potentially prevent accidents and reduce the severity of collisions. Additionally, the system can be designed to alert both the driver
and the vehicle’s control system in cases where the driver’s alertness is compromised, ensuring timely intervention.
II. Literature Survey
There have been numerous studies and research papers focused on developing driver drowsiness detection systems, which can be
referenced to create real-time solutions aimed at reducing accidents caused by driver fatigue. Eyelid closing is considered one of
the most reliable predictors of drowsiness. Many existing systems have primarily relied on monitoring eyelid closure to detect
drowsiness, despite other behaviors also serving as potential indicators. These include faster blinking times, sneezing, slow eyelid
movements, repeated blinking, fixed eyes, and a sagging posture. In addition to this, various research has proposed solutions using
different types of cameras, such as normal cameras, infrared (IR) cameras, and stereo cameras, to accurately detect signs of driver
drowsiness. A comprehensive literature review summarizes the various approaches used in drowsiness detection systems. One such
method was developed by Dwivedi et al., who created a model that utilized Convolutional Neural Networks (CNN) to detect
drowsiness. This approach leveraged CNN-based representation feature learning and achieved an accuracy of 78%. This is a
significant improvement over traditional methods and demonstrates the effectiveness of deep learning techniques in detecting driver
drowsiness. Another noteworthy contribution to the field is from Alshaqaqi et al., who proposed a Specialized Driver Assistance
System aimed at reducing traffic injuries caused by driver drowsiness. They introduced an algorithm to locate, map, and evaluate
the face and eyes of the driver, using PERCLOS (Percentage of Eyelid Closure Over Tim)
Said et al. further advanced the field with their eye-tracking-based driver drowsiness detection system. This method involves
detecting the drowsiness level of a driver through eye-tracking and issuing a warning alarm when drowsiness is detected. In this
work, they used the Viola-Jones model to detect the face and eyes. In indoor settings, this system achieved an accuracy of 72.8%,
but the accuracy dropped in outdoor settings due to varying lighting conditions. Another important contribution came from Mandal
et al.,
Conventional who proposed a vision-based method for detecting fatigue in bus drivers. In their work, they employed AHOG
(Adaptive Histogram of Oriented Gradients) and SVM (Support Vector Machine) for head-shoulder detection and driver detection,
respectively. OpenCV’s face and eye detectors were used for face and eye detection, while Spectral Regression Embedding was
utilized to learn the eye structure and calculate the openness of the eyes.
They also introduced a fusion approach, which combined the features generated by two eye detectors—namely, I2R-ED (Image to
Region Eye Detection) and CV-ED (Computer Vision-based Eye Detection). For drowsiness identification, they used PERCLOS
as the key feature for detecting signs of fatigue. All these systems have been significant in shaping current drowsiness detection
technologies. By leveraging various methodologies such as CNNs, PERCLOS, and eye-tracking, these systems have contributed
to the ongoing efforts to improve road safety. Many of the approaches mentioned above have laid the groundwork for real-time
drowsiness detection systems that can be integrated into vehicles.
These systems aim to prevent accidents caused by driver fatigue by continuously monitoring driver alertness and providing timely
warnings. Furthermore, by integrating machine learning and computer vision techniques, the systems can offer more accurate and
reliable detection in various lighting conditions. As drowsiness detection technology continues to evolve, it holds the potential to
significantly reduce traffic-related accidents and fatalities. The integration of these technologies into vehicles could play a crucial
role in enhancing road safety and ensuring that drivers remain alert. These advancements underline the importance of AI and deep
learning in the development of smart vehicle safety systems.
Existing System
The existing system employs Deep Belief Networks (DBN) and Support Vector Machines (SVM) to recognize driver drowsiness
by analyzing facial dynamics. It extracts landmarks and textures from video frames and uses DBN for classification. However, this
approach has several drawbacks. DBN models are complex and expensive to train, making them less accessible for non-experts.
Additionally, DBNs require external classifiers to interpret outputs. SVM is unsuitable for large or noisy datasets and struggles with
scalability. Overall, the system achieves only moderate accuracy, ranging between 70% and 78%, limiting its reliability in real-
world scenarios
Problem Statement
Nowadays, more and more professions require long-term concentration. Drivers must keep a close eye on the road, so they can
react to sudden events immediately. Driver drowsiness often becomes a direct cause of many traffic accidents. Therefore, there is
a need to develop the systems that will significantly reduce the number of Drowsiness
related car accident and detect the driver's drowsiness condition, which could prevent driver from accidents.

[Link] Page 779


INTERNATIONAL JOURNAL OF LATEST TECHNOLOGY IN ENGINEERING,
MANAGEMENT & APPLIED SCIENCE (IJLTEMAS)
ISSN 2278-2540 | DOI: 10.51583/IJLTEMAS | Volume XIV, Issue IV, April 2025
Proposed system
The proposed system aims to detect driver drowsiness effectively using Convolutional Neural Networks (CNN), thereby enhancing
road safety by minimizing accidents caused by fatigue and distraction. This system is designed to be non-intrusive, eliminating the
need for physical sensors or wearable devices on the driver, which ensures a more comfortable and user-friendly experience. By
leveraging deep learning, specifically CNN, the system analyzes facial features to identify signs of drowsiness. The primary
indicators observed include eye closure and yawning. These features are captured in real time using a webcam, and the video feed
is processed using OpenCV to extract Regions of Interest (ROIs), such as the eyes and mouth, for further analysis.
The flow of the implementation steps is as follows:
The extracted ROIs are passed through a trained CNN model to determine whether the eyes are open or closed and whether the
driver is yawning. If drowsiness is detected, an alarm is triggered immediately.
CNNs offer significant advantages over traditional machine learning algorithms like Deep Belief Networks (DBN) and Support
Vector Machines (SVM). While DBNs are computationally intensive and SVMs struggle with large, noisy datasets, CNNs can
learn spatial hierarchies of features and deliver more accurate image classification results. The CNN-based model used in this
system is lightweight, efficient, and capable of real-time performance, even on devices with limited processing power. This makes
it suitable for deployment in a wide range of vehicles—from commercial fleets to private automobiles. In contrast to older methods,
the CNN model is less affected by variations in lighting, facial orientation, and partial occlusions, making it robust for real-world
driving environments. OpenCV further enhances the system’s performance by providing tools for efficient image acquisition and
preprocessing, ensuring reliable ROI extraction and image clarity under dynamic conditions. These technical advantages make the
proposed system more scalable and effective for real-world implementation, improving overall road safety through timely and
intelligent driver alertness detection.
In conclusion, the proposed driver drowsiness detection system integrates computer vision and deep learning to deliver a practical,
efficient, and non-intrusive solution. By providing real-time alerts based on facial analysis, the system not only improves driver
safety but also represents a valuable application of AI in transportation technology.

Fig.1 Flowchart of implementation architecture of proposed system


The system initializes the camera and begins capturing real-time video frames, which are converted to grayscale for efficient facial
feature detection.
III. Methodology
The drowsiness detection system involves the use of hardware and software to produce the different outputs in different use cases.
The methodology of the proposed system is centered on detecting driver drowsiness using Convolutional Neural Networks (CNN),
a powerful deep learning technique that is well-suited for image classification tasks. The primary objective is to identify signs of
fatigue or sleepiness in drivers based on visual cues from the face, such as eye closure and yawning. The entire model is built using
Python as the programming framework, utilizing libraries like TensorFlow, Keras, and OpenCV for different aspects of model
training and real-time video processing.
The dataset used to train the model has been sourced from Kaggle and contains images categorized into four distinct classes: closed
eyes, opened eyes, yawn, and no yawn. This labeled dataset helps in training the CNN model to perform multi-class classification
and accurately distinguish between states of alertness and drowsiness. The CNN architecture consists of several convolutional

[Link] Page 780


INTERNATIONAL JOURNAL OF LATEST TECHNOLOGY IN ENGINEERING,
MANAGEMENT & APPLIED SCIENCE (IJLTEMAS)
ISSN 2278-2540 | DOI: 10.51583/IJLTEMAS | Volume XIV, Issue IV, April 2025
layers, pooling layers, and dense layers that work together to extract features from the input images and make predictions.
To enable real-time detection, the system integrates OpenCV for capturing video streams from a webcam. Each video frame is
converted to grayscale to reduce computational complexity and then processed using Haar Cascade classifiers to detect the face and
eye regions. Haar cascades are pre-trained classifiers that are efficient in object detection and are particularly effective in identifying
facial features.
Data Preprocessing
This module demonstrates a typical data preparation pipeline for image classification using deep learning with Keras and
TensorFlow in Python. It covers steps such as importing libraries, loading image data, preparing target variables, splitting the data,
applying data augmentation, and using generators for training and testing. Finally, it showcases building and evaluating a deep
learning model for image classification

Fig 2. Data Preprocessing


Eye and Yawn Detection Using Image
This module, we use a sequential neural network with convolutional layers, max pooling, and dropout to identify emotions in
images. The model is trained on a balanced dataset of closed eyes, open eyes, yawn, and no yawn images. By leveraging pre-trained
weights from Mobile Netv2, our model achieves a remarkable 97% accuracy after 50 epochs. We preprocess the RGB images,
apply activation functions, and utilize dropout for regularization. The flattened output is passed through fully connected layers and
a activation for classification. Visualizations aid in monitoring training and validation performance, and the trained model is saved
for future use. Our approach combines these techniques to effectively identify emotions in images

Fig 3. Eye and Yawn Detection Using Image


Drowsiness Detection in Real Time
This module presents a Python script for a drowsiness detector using computer vision and machine learning. The script aims to
identify if a person's eyes are closed for an extended period, indicating drowsiness, and triggers an alarm as a warning. Libraries
such as OpenCV, Keras, NumPy, playsound and threading are utilized. The script defines classes for the model, employs Haar
Cascade classifiers to detect faces and eyes, and captures video frames from the webcam. Each frame is processed, cropped, resized,

[Link] Page 781


INTERNATIONAL JOURNAL OF LATEST TECHNOLOGY IN ENGINEERING,
MANAGEMENT & APPLIED SCIENCE (IJLTEMAS)
ISSN 2278-2540 | DOI: 10.51583/IJLTEMAS | Volume XIV, Issue IV, April 2025
and input into the machine learning model. The highest probability class determines the eye status (open or closed). If both eyes
are closed for a duration, an alarm sounds and a warning message is displayed. The frame count of closed eyes is tracked, and the
alarm stops when the eyes open. The script displays the video frame and terminates upon pressing 'q'. This application showcases
the integration of computer vision and machine learning to enhance safety by preventing accidents caused by drowsiness or fatigue.

Fig 4. Drowsiness Detection in Real-Time


Technology stack
Resource Requirements The hardware and software requirements
for this system were analyzed and the required configuration is
given below.
Minimum Hardware Requirements:
Processor: Intel Core i5
Processor Speed: 2.8 GHz
Memory: 4 GB RAM
Display: 15” Color Monitor
Storage: 160 GB
Graphics: CPU & GPU
Camera: 720p HD Webcam
Minimum Software Requirements:
Operating System: Windows 10
Development Tool: Anaconda Navigator
Programming Language: Python
RESULT & ANALYSIS

Table 1. Test cases and expected results


In Table 1. we see the different test conditions producing the corresponding results.
The first condition is tested with open eyes with and without glasses in which the driver passed the test for drowsiness

[Link] Page 782


INTERNATIONAL JOURNAL OF LATEST TECHNOLOGY IN ENGINEERING,
MANAGEMENT & APPLIED SCIENCE (IJLTEMAS)
ISSN 2278-2540 | DOI: 10.51583/IJLTEMAS | Volume XIV, Issue IV, April 2025
In the second test condition, the driver’s eyes were partially closed (sleepy) with and without glasses. The driver was found to be
“Drowsy
Thus, we see how the different test cases produce different outputs.
Below are some results generated by our project team member

Fig 5. Output with open eyes drowsiness detection (non drowsy)


In Fig 5., the driver has open eyes hence the score is at zero.
Fig 6. Output with closed eyes drowsiness detection (drowsy).

Fig 5. Output with closed eyes drowsiness detection (drowsy)


In Fig 5. The driver has closed his eyes beyond the threshold. Hence the score is increasing and the alarm has also been triggered.
Future Scope of The Project
This model has great scalability and many additional parameters like blink rate, yawning, state of the car, etc can be used for
enhanced accuracy of drowsiness. As part of the future scope, we plan to further work on the project by adding a sensor to track the
heart rate of the driver in order to prevent accidents caused due to sudden heart attacks or strokes of the driver. Same model and
techniques can be used for various other uses like introducing this model under many streaming brands such as Netflix can detect
when the user is asleep and stop the video accordingly. It can also be used in applications that require the users to be focused.
IV. Conclusion
This project is a powerful application of deep learning that has shown promising results in detecting drowsiness accurately and
quickly. CNN-based drowsiness detection systems use images or video frames of the driver's face as input to the neural network,
which then analyzes the features of the face and predicts the driver's drowsiness [Link]-based drowsiness detection systems
have several advantages over traditional drowsiness detection methods. They are more accurate, reliable, and can detect subtle
changes in the driver's facial expressions, eye movements, and other behaviors that indicate drowsiness. Moreover, CNN-based
drowsiness detection systems can operate in real-time, allowing them to alert the driver and prevent accidents before they happen.
However, there are some limitations to CNN-based drowsiness detection systems. They require a large dataset of labeled images
or video frames to train the neural network effectively. Additionally, they may be affected by environmental factors such as lighting
conditions, changes in the driver's appearance, or occlusion of facial features

[Link] Page 783


INTERNATIONAL JOURNAL OF LATEST TECHNOLOGY IN ENGINEERING,
MANAGEMENT & APPLIED SCIENCE (IJLTEMAS)
ISSN 2278-2540 | DOI: 10.51583/IJLTEMAS | Volume XIV, Issue IV, April 2025
Reference
1. S. T. Lin, Y. Y. Tan, P. Y. Chua, L. K. Tey, and C. H. Ang,"PERCLOS Threshold for Drowsiness Detection during Real
Driving,"Journal of Vision, vol. 12, pp. 546-546,2012..
2. D. Liu, P. Sun, Y. Xiao, and Y. Yin, "Drowsiness Detection Based on Eyelid Movement," in Education [1]Technology
and Computer Science (ETCS), 2010 Second InternationalWorkshop on, 2010, pp. 49-52.
3. Danghui Liu, Peng Sun, YanQing Xiao, Yunxia Yin , Drowsiness Detection Based on Eyelid Movement , 2010, Wuhan ,
China.
4. Md. Yousuf Hossain, Fabian Parsia George, “IoT Based real time drowsy driving detection, 2018, Bangkok , Thailand.
5. Hitendra Garg , Drowsiness Detection of driver using CV application, 2020, Mathura , India.
6. B. N. Manu , Facial Features monitoring for real time Drowsiness Detection , 2019, Al In, United Arab Emirates.
7. Belal Alshaqaqi, Abdullah Salem Baquhaizel ,Mohamed El Amin Ouis, Meriem Boumehed, Abdelaziz Ouamri ,Mokhtar
Keche , Driver Drowsiness Detection System , 2013 , Algiers , Algeria.
8. Wisaroot Tipprasert, Theekapun Charoenpong, A Method of Driver’s Eyes Closure and Yawning Detection for
Drowsiness Analysis by Infrared Camera, 2019, Bangkok, Thailand.
9. K. Satish; A. Lalitesh; K. Bhargavi; [Link] Prem; T Anjali, Driver Drowsiness Detection , 2020, Batu Pahat , Malaysia.

[Link] Page 784

You might also like