Automated Detection of Drowsiness using Machine Learning Approach

. Nowadays, there is a steady rise in the number of traffic accidents. The primary causes of these accidents are impaired driving due to alcohol consumption and driver fatigue. The primary goal is to create a system capable of measuring a driver's degree of sleepiness. If drowsiness is identified, a warning will be sent out via integration with an alert warning system and text message system. Drowsiness detection is built using OpenCV, Python, and Machine Learning. A significant number of annotated driver images depicting different levels of drowsiness, alongside images of diverse driving scenarios and lighting conditions, were utilized in the research to enhance the dataset. The system for detecting driver drowsiness provides a viable method to avert car accidents resulting from driver tiredness. It examines the driver's eye and alerts them when necessary. Further improvements could increase the alarm system's accuracy by minimizing the number of false warnings.


Introduction
Drunk driving is a major contributor to traffic accidents all over the world.Statistics show that many injuries and fatalities caused by incidents each year are due to driver drowsiness.As a result, an automated system that can identify sleepiness and act to prevent accidents is absolutely necessary.The main goal is to increase road safety by utilizing technology breakthroughs.The following major issues will be addressed by the development of a drowsiness detection system.The technology for detecting drowsiness will be essential in preventing accidents brought on by drowsy driving.The system can send out timely notifications, enabling the driver to take the appropriate action and prevent potential accidents, by observing the driver's behaviour and identifying indicators of drowsiness.
Machine learning (ML)-based drowsiness detection gauges a person's degree of alertness by examining a variety of physiological and behavioural markers.Datasets including characteristics like eye movement patterns, blink frequency, head attitude, and maybe additional information from sensors like EEG or steering wheel sensors are used to train machine learning algorithms.These algorithms can categorize levels of alertness in real time since they are trained to recognize patterns that indicate tiredness.The system continually tracks these indications while it is in use and inputs them into the ML model, which subsequently outputs whether the user is awake or asleep.This method makes it possible to identify tiredness automatically and quickly, making it useful for applications like driver safety systems and other situations when remaining aware is important.
Machine learning (ML)-based drowsiness detection finds a variety of uses across sectors to improve safety and stop mishaps brought on by poor attention.To monitor driver attention and issue prompt warnings, ML-based drowsiness detection systems are integrated into autonomous cars and advanced driver assistance systems (ADAS) in the automobile industry.This increases road safety.Such devices aid pilots in maintaining attention during lengthy flights in aviation.They aid healthcare personnel in determining the level of awareness of patients.These devices are also used in sectors with heavy machinery and crucial processes to guarantee operator focus.By proactively recognizing and reducing the hazards posed by sleepiness-induced impairment, ML-driven drowsiness detection systems play a crucial role in protecting lives and productivity.
Utilizing machine learning for driver's drowsiness detection presents drawbacks, encompassing the potential for both false positives and negatives, challenges in accommodating individual drowsiness variations, intricacies in capturing diverse drowsiness cues, reliance on robust training data and specialized hardware, privacy apprehensions stemming from facial surveillance, and constraints in adapting to dynamic road conditions and unforeseen scenarios.They aid healthcare personnel in determining the level of awareness of patients.Nonetheless, ongoing advancements in machine learning hold promise for mitigating these concerns and enhancing the precision and viability of such detection systems.It might be difficult to comprehend the causes behind model predictions due to the interpretability of ML models employed for sleepiness detection.

Existing Methods
This paper involves developing a driver drowsiness detection system using machine learning techniques.Analysing facial expressions, eye movement, and driving behaviour, the system is designed to issue alerts when signs of drowsiness are identified.The paper aims to enhance road safety by preventing accidents linked to driver fatigue.Challenges like accommodating individual variability and integrating a text message system will be addressed to ensure the accuracy and effectiveness of the system.Authors [10] highlighted the significance of ML in prediction, pattern recognition and error reduction across diverse fields, emphasizing the impact of AI in broad domain.Authors [11] addressed the serious issue of drowsy driving, which causes accidents and fatalities.It proposes a real-time system using Computer Vision, Deep Learning, and IoT tools to detect drowsiness and alert drivers through various methods like alarms, vibration, and water sprinklers.Authors [12] focused on early detection and classification of skin cancer types, including melanoma, using machine learning and image processing.It employs pre-processing techniques, colorbased clustering, and statistical feature extraction, achieving an accuracy of approximately 96.25% with Multi-class Support Vector Machine (MSVM).Authors [13] explored methods for identifying the source camera or mobile device from digital images.It highlights challenges with certain techniques, such as lens aberration-based methods being less accurate for different cameras from the same brand, and color filter array-based methods being sensitive to image compression.Authors [14] discussed the use of Scanning Electron Microscopy (SEM) for material characterization and how Python programming is employed to process SEM images, including histogram equalization and morphological operations for accurate analysis.EEG data quality, individual variability, data availability, computational complexity, interpretability, and ethical considerations impact model accuracy, requiring proper consent and anonymization.[5] IoT technology enables real-time monitoring, ubiquitous sensing, data fusion, large-scale data collection, and scalability for detecting drowsiness in vehicles, preventing accidents, and improving overall drowsiness assessment.
IoT data collection raises privacy, security, quality, model complexity, and ethical concerns, affecting drowsiness detection, user autonomy, and machine learning models. [6] Visual behaviour analysis offers rich information, non-intrusive monitoring, real-time detection, and user-friendly interaction for detecting drowsiness and improving safety.
Data collection challenges include diverse datasets, subject variability, noise, ambiguity, model complexity, ethical concerns, validation, environmental factors, and interpretability issues in driver visual behaviour analysis.[7] Advanced systems use sophisticated machine learning techniques, a holistic approach, personalization, real-time detection, adaptive learning, robustness, multi-modal fusion, and transferability to improve drowsiness detection.
Advanced systems may face complexity, data requirements, computational resources, interpretability, biases, fairness, ethical concerns, validation, and integration challenges, impacting implementation, maintenance, and compatibility in various environments.[

Problem Statement
This paper tackles the issue of refining a drowsiness detection system by amalgamating a text message notification system with an established alarm warning setup.The central challenge revolves around guaranteeing the joint system's accuracy in identifying drowsiness, employing machine learning modalities such as assessing facial expressions and monitoring eye movements.Concurrently, seamless integration with a text message platform becomes pivotal to ensure swift alerts for drivers regarding their drowsy condition.This integration demands addressing technical harmonization, real-time communication logistics, and optimizing user interface dynamics.

Objective
The objective of a driver drowsiness automated detection system is to identify signs of driver fatigue and alert the driver to take appropriate action.Driver fatigue is a major cause of road accidents and can be caused by various factors such as lack of sleep, long hours of driving, medication, and alcohol consumption.The driver's drowsiness detection system monitors the driver's behaviour, including facial expressions, eye movements, and body posture.When the system detects signs of drowsiness, it alerts the driver through visual or auditory warnings to take necessary measures, such as stopping the vehicle, taking a break.

Proposed method
This paper aims to develop a driver drowsiness automated detection system using machine learning methods.By examining facial expressions, eye movements, and driving behaviour, the system's purpose is to generate alerts upon detecting signs of drowsiness.The ultimate goal is to improve road safety by mitigating accidents associated with driver fatigue.The manuscript will address challenges such as accounting for individual differences and adapting to diverse real-world situations to ensure the system's precision and efficacy in practical settings.
Raw Dataset This element represents the set of information used to develop and evaluate the sleepiness detection algorithm.The dataset includes a variety of samples of driver behaviour recorded under various driving circumstances and tiredness levels, including eye movements, facial expressions, and head posture.
• Cleaning and preparing the dataset for future analysis is part of the preprocessing process.To improve the quality and dependability of the data, it could comprise procedures like data filtering, noise reduction, normalization, and data augmentation techniques.• Data transformation in this step, the extracted features is converted into a format or representation that can be used as input by the sleepiness detection algorithm.It could involve activities like feature scaling, dimensionality reduction, or any other adjustments required to make the data compatible with the algorithm.• Evaluation The evaluation part rates how well the drowsiness detection system is working.Applying the modified data to the detection algorithm and assessing its precision, recall, and other performance measures are all part of this process.
Techniques for evaluation could include cross-validation or employing different test datasets.• Results: The evaluation's measurements and findings, as well as information about how well the system performed in spotting sleepiness, are presented in this component.The outcomes can shed light on the system's efficiency and dependability.

Description of dataset
The Drowsiness Detection Dataset is generated using MRL and Closed Eyes in Wild (CEW) dataset.This large-scale dataset comprising both closed and open human eye images can be majorly used for eye detection and further extended for drowsiness detection.Images from the dataset were taken under a variety of conditions, including diverse lighting conditions, distance, resolution, face angle, and eye angle.These parameters aid in obtaining good outcomes with minimal chances of getting low accuracy.
There are various versions of this dataset, with Version 1 having 10,000 images split into 5,000 images for closed eyes and 5,000 images for open eyes.The 5,000 images in Version 2 are split into 2,500 images for closed eyes and 2,500 images for open eyes.Another collection of 10,000 images, divided into 5,000 images for each of the closed and open eyes, may be found in Version 3. 2,000 images of closed eyes and 2,000 images of open eyes make up the 4th version of the dataset i.e., Version 4 with 4,000 images in total.Driver drowsiness detection system is a computer vision-based software application that continuously monitors the driver's facial features, head position, and eye movements to detect any signs of drowsiness or fatigue.The dataset typically contains images of both awake and drowsy drivers in various driving scenarios and lighting conditions.Finally, this dataset is divided into training, validation, and testing subsets so that ML models may train on a variety of instances, verify their methods, and finally test their correctness on new data.The underlying goal is to develop effective real-time drowsiness detection systems for use in applications like transportation safety, workplace monitoring, and healthcare by teaching ML models to accurately distinguish between alert and drowsy states by identifying patterns within the supplied features.

Significance of the proposed method
The proposed method for driver drowsiness automated detection using electroencephalogram (EEG) signals offers several advantages over existing methods.Firstly, EEG signals provide direct measurements of brain activity, which are highly sensitive indicators of the driver's level of alertness and cognitive performance.This allows for more accurate and reliable detection of driver drowsiness compared to other Secondly, the proposed method uses a machine learning algorithm to analyze the EEG signals and classify them into different levels of drowsiness.This allows for a more personalized and adaptive detection system, as the algorithm can learn and adapt to the driver's unique EEG patterns over time.
Thirdly, the use of wireless EEG sensors allows for non-intrusive and comfortable monitoring of the driver's brain activity without the need for cumbersome and restrictive equipment.This can increase the acceptance and compliance of drivers to use the system.Driver drowsiness detection systems are highly significant in ensuring road safety and preventing accidents caused due to driver fatigue.According to the National Highway Traffic Safety Administration (NHTSA), drowsy driving is responsible for around 100,000 crashes annually, resulting in over 1,500 deaths and thousands of injuries.

Conclusion
The paper aims to develop a system that can monitor the driver's drowsiness level in realtime and provide timely alerts to prevent accidents caused by driver fatigue.The system utilizes eye state detection technology to analyse the driver's eye behaviour and identify signs of drowsiness.It incorporates various modules, including data acquisition, preprocessing, eye detection, feature extraction, machine learning, alert sound, emergency text messaging, and real-time monitoring.By combining these modules, the paper seeks to improve driver safety and reduce the risk of drowsiness-related accidents.The approach adopted for the automated drowsiness detection system, while integrating a text message system with an existing alarm warning mechanism, showcases a strategic adaptation.This modified methodology entails the amalgamation of machine learning techniques to accurately identify drowsiness indicators, encompassing elements such as facial expressions and eye movements.By seamlessly blending this analysis with real-time text message alerts, the system evolves into a holistic safety framework.
The future potential of a drowsiness detection system, enriched by the fusion of a text message system into an existing alarm warning framework, opens up promising horizons for advancement.This integration has the capacity to usher in more sophisticated and context-sensitive alerts, where the system not only detects drowsiness but also factors in variables like road conditions and driver preferences to tailor its notifications.

•
/doi.org/10.1051/e3sconf/20234300104242 430 Feature Extraction From the preprocessed data, pertinent features are extracted in this component.The length of eye closure, the frequency of blinks, the position of the head, and any other traits that may help identify sleepiness are examples of these aspects.

Table 1 .
Summary of existing approaches.
physiological measures such as eye blink rate or head movement, which can be affected by external factors such as lighting conditions or medication.