{'fraction_non_alphanumeric': 0.025063439390981847, 'fraction_numerical': 0.007144251415186414, 'mean_word_length': 4.961368396555737, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Comparative Analysis of using Various Machine learning Techniques based on Drowsy Driver Detection

In image processing or computer vision, image segmentation is a vital issue for applications such as scene understanding, medical image evaluation, robotic perception, video surveillance, increased reality or compression, etc. Every year in road accidents caused because of human mistake, the numbers of dead and injured are rising. Drowsiness and driving are particularly risky and difficult to recognize. The second leading cause of road crashes in drowsiness after alcohol. Detecting driver drowsiness is a technology of safety for vehicles that helps placed an end to driver injuries that are dozy. One of the main causes of road accidents is driver drowsiness. It is a very serious issue for road safety. We have presented various methods for detecting the drowsiness of the driverin this paper and the comparisons among such methods are extremely challenging. For this purpose, we have compared machine learning methods based on facial expression, especially on eye state. Apart from eye detection, it performed experiments on mouth detection and face detection as well. This paper explores several methods for machine learning, like SVM, CNN, or HMM. From the analysis, we have found that the HMM model achieved more accurate results in comparisonto others.


Introduction
Drowsiness or fatigue is one of the key risks to road safety which causes serious injury, death, and expense. The increased drowsinessworsens driving performance. The unconscious shift from waking to sleep leads to a lack of alerting which leads to many major road injuries. Drowsy driving has resultedin over 100,000 road injuries and over 1,500 death rates each year, documented in U.S. National Highway Traffic Safety Administration (NHTSA). Fatigue of driver can have many factors, including sleep loss, long journey, restlessness, alcohol consumption & mental pressure. Each will lead to a severe disaster. Today, road rage has been in many parts of the past, causing drivers strain. The previous transport system is therefore not adequate to deal with these threats on the roads. Therefore, most deadly injuries can be avoided by embedding automatic fatigue detection systems in vehicles. The drowsiness detection system (DDS) analyzes drivers' attention and alerts the drivers before reaching the serious road safety threat [1].
In our life, emotions play a crucial role. During our lives and interactions with others, there are many types of emotions. Recent research is done on emotion recognition. If this is applied in the IOP Publishing doi: 10.1088/1757-899X/1119/1/012017 2 social networking setting, it can be an important way to understand how individuals and social circles, neighborhoods, and towns feel about recent or different events [2,3].
Machine learning has become one of the major stays of IT. There is a strong purpose to assume that intelligent data processing will become much more widespread as an essential factor for technical purposes, considering the growing amount of information available. Most of the science of ML is about solving these needs and providing the solution [4].
The organization of this paper as follows Section II introduces image segmentation including image classification techniques. In Section III we describe the drowsy driver detection system in this paper. We present a detailed description of numerous Computer vision methods to detect driver drowsiness in Section V. Next Machine learning techniques are described in Section VI. After this, we provide a detailed study of related work. Conclusions are presented in the last section.

Classification of Segmentation Algorithms
Segmentation algorithms havebeen created to segment imagesfrom segmentation; its dependent on 2 key characteristics, discontinuity & similarity. Division and subdivision are predicated on discontinuity depending on the abrupt intensity or gray picture levels. Our interest in this approach is primarily to define individual points, lines, and boundaries. The predicted pixel community in heterogeneous attributes contains approaches such as thresholds, regional expansion, and regionsplitting as well as merging.

Segmentation by Edge Detection
Edge detection is a fundamental step in the segmentation process. The image splits into the object as well as its context. Divide the image by the edge detectionprocess to detecting the change in intensity or image pixels. Two key methods for edge detection embedded in the segmentation are found in the Gray histogram and Gradient. The canny edge detector is a second-order derivative operator that is split into two types of edge detection operators, as first-order derivative & secondorder derivative operators. The operators with a second-order derivative provide reliable results.

Segmentation by Thresholding
Image segmentation is one of the easiest methods for the image which is dependent on levels of intensity named as a threshold. Thresholding can be implemented either globally or locally. Global threshold differentiates object & context pixels by comparing them to the selected threshold value and by using a binary partition in the image section. An oftencalled adaptive threshold is the local thresholding strategy. Adaptive thresholding strategyis threshold value varies according to the

Segmentation by Region-based
The segmentation region observed should be closed. Also, the region-based segmentation is called the similarity primary based segmentation. Due to the lack of edge pixels, there is no difference in the region primarily based on segmentation the boundaries are known for segmentation. The sting flow is regenerated into a vector after distinctive alteration in the color and texture. The sides are detected for further segmentation.

Segmentation by Feature
• Based Clustering • Segmenting by K Means Clustering [5]

Driver Drowsiness
Drowsiness is simply referred to as "fatigue-related near-sleep." It's technically distinct from fatigue, distinct as a "refusal to carry out the task at hand". There are the same effects of sleepiness and fatigue. Fatigue has an effect on mental alertness, reduces the ability of the person to drive a vehicle safely & raises the risk of human error, which can lead to damage and injury. Sleepiness slows down the time of response, decreases awareness, and undermines judgment. Both transport operators, such as pilots, truck drivers, and railway engineers, have been impacted byfatigue and sleep deprivation. In these cases, the driver cannot focus on the main driving task, which will increase the risk of an accident. This problem would deteriorate further with ever-growing traffic conditions [6].

Drowsy Driver
Drowsy driving is the riskiest groupings of sleepiness or fatigue. Usually, driving sleep deprivation has become a growing risk of an accident; because the driver was not properly asleep, often owing to sleep syndromes, alcohol effects, few medicines, and even day & night activities. If the driver is drowsy it increases the risk of a collision more often than normal driving. Nowadays it is very difficult to know the exact moment when sleep comes over. Also, the risk is raised during the night.

Factors Cause Driving Drowsiness
Drowsiness driver affects driving greatly and raises the risk of crashes. More than 30% of driver sleepiness or fatigue is responsible for road accidents.There are 2 key reasons for driver fatigue: • If sleep quality &quantity are insufficient.
• Start driving when sleeping is usually finished [7].

Drowsy Driver Detection System
Many different methods can be used to assess the drowsiness of the driver. These methods are image recognition-based techniques, Electroencephalograph techniques, and techniques based on artificial neural networks. Image processing techniquesmay be split intothree types. These are the technique of matching the template, the technique of eye blinking and yawning. These methods are focused on the interpretation of images through computer vision. In computer vision technology the driver uses facial features e.g. blindness of the eyes and head movements to detect driver drowsiness. Very efficient in health care Electrodes outside of the skull can detect very few electric signals from the brain 2.
Geometry based [9] Small database, recognition rate 95% A large number of features are used.

4.
Color-based [11] Simple and small database Limited performance 5. Support vector machine [12] Flexible Lack of transparency in result 6. Iris recognition [13] Produce high accuracy result in less time Expensive

Image processing-based Techniques
Drivers face images are used for the analysis of IP techniques so that their states are detected. From the face image, one can see that driver is awake or sleeping. The driver is asleep or drowsiness with the same images because the eyes of the driver are closed in the face image. And the facial image can also detect other signs of drowsiness. These strategies can be divided into three sub-categories:

1) Eye Blinking Based Technique
The blink rate andduration of the eye closure are measured to detect the drowsiness of the driver. Since eye blinkers and gaze between the eyelids differs from normal situations when the driver is sleepy at the time, so they detect drowsiness easily. The position of iris and eye conditions in this system is tracked over time to measure the duration of blink and the near life of the eye. And a remotely placed camera uses this sort of system to achieve video and computer vision techniques, such that visual, eyes, and eyes are sequentially located in the closure ratio. The driver's drowsiness can be identified by this eye closing and blinking ratio.

2) Template Matching Technique
In this technique, the eye state should be used for some particular timei.e. when the driver closes the eye/s then the system produces an alert. And, there is a driverthat has both open and closed eyestemplatein this system. It can also be used to open and close eye templates of the drivers.

3) PERCLOS Technique
PERCLOS is a fixed parameter for drowsiness detection level. The PERCLOS score is intended to determine if the driver is in a drowsy condition or not (the percentage of time an eye is closed at a certain time).

4) Yawning Based Technique
Yawn is drowsiness symptoms. yawn is ostensibly shown on a big vertical opening of the mouth. The mouth is wide openis wider than in the yawncompared to the speech. They can detect yawn by using face tracking and mouth tracking [14,15].

Computer Vision Method to Detect Driver Drowsiness
Computer vision techniques for identification of changes in facial expressions of the driver. Computer vision approach to detect driver drowsiness using machine learning algorithms to detect the closure and opening of the eyes. There was no fully automatic model previously built. Second, a Low-cost solution has not been existingdriver drowsiness detection. Thirdly, no model worked for different luminance conditions (produced by sunlight & during dim light conditions similar to bad weather). Thus,there is an enormous need for a low costfor the fully automated driver drowsiness detection model, which operates in different luminance conditions.

Facial Expression
Three facial detection approaches are available. They are focused on features, templates, and appearance. The feature-based approach detects invariantface features but it is difficult to extract the featurein complex contexts. A predefined standard face pattern is used in the template-based approach and the correlation is used to identify the face. But it is difficult to expand different scales with this method. Face and non-face are observed in appearance-basedapproaches. But only with a simple background, this approach will produce reliable results. Facial expression characteristics are retrieved using the LG expression system. Six simple facial expressions are happiness, surprise, sadness, anger, hate, and fear.

Facial Tracking
The face tracking system must be robust for head movements, rotation, changes in illumination, and variation. For this purpose, a method has been suggestedfor the simultaneous use of face recognition & object tracking systems. This grouping provides us the chance to take advantage of 2 different programs together.

Eye Detection
It is difficult to find an eye because of various variables such as lighting, posture, facial shadow, etc. Different measures could be measured with the eyelid closure percentage, maximal closing time, blink frequency, average eye-opening level, eye-opening speed, and eye closing speeds, and an efficient driver drowsiness detecting model that can work under variedunconstraintandluminanceconditions.This condition can then be divided into distractions and the driver must alarm [6].

Machine Learning
Machine learning is a theoretical area that focuses systematically on theory, results, & properties of education systems & algorithms. It draws on several diverse areas of ideas: optimization theory, artificial intelligence, psychology, knowledge processing, optimal controls, cognitive sciences, also other branches in research, science, and mathematics. It is a strongly interdisciplinary area. The machine learning area is usually categorized into 3 sub-domains: supervised, unsupervised, & reinforcement learning [16].Let us discussed the various types of machine learning algorithms:

Supervised Learning
In supervised learning, we learn anobjective function that can be applied to predict the values of approved or not approved discrete class features. In a specific sample set, a machine learning algorithm makes predictions, whereas a supervised learning algorithm looks for designs to assign the data point labels. This algorithm is anoutcome variable from which a certain number of predictorscan be estimatedi.e. independent variables. Will create a function that maps input to desired outputs using this set of variables. The training phase continues until the model achieved accuracy in terms of training data. This whole procedure aims to reduce manual checks and coding expenses. Supervised learning examples are NNs, Regression, Decision Tree, NN, SVM, Naive Bayes, etc.

Unsupervised Learning
The learning useful structure is referred to as unsupervised learning with the labeled classes, criteria IOP Publishing doi:10.1088/1757-899X/1119/1/012017 6 for the optimization, input signal, or other knowledge beyond the raw data. We don't have any target variable in this algorithm for calculating mean and we do not have a data points label or can say the training data class label is unknown here. This algorithm is applied to collect data into cluster group to explain the configuration of the data i.e. the cluster of the data which shows essential partitions and hierarchies. Examples: K-means, Clustering Fuzzy, Clustering Hierarchy Data are not labeled as well as the result is not known.

Reinforcement Learning
The machine is trained to make specific decisions using this algorithm. Based on each data point, these algorithms choose an action and later learn how to achievea successful decision. This is an environment in which the machine trains [17].

Literature Survey
S. Hachisuka (2013) used the active Appearance model (AAM) for the three-dimensional coordinates of the feature's points on the face images. They also used the k-Nearest-Neighbor approach to divide drowsiness into 6 levels. Consequently, among 13 participants, the average root means square error (RMSE) was below the 1.0 level. The first step in emotion detection was the smile and speaking detection [18]. The study of these models shows that the maximum precision of the wavelet coefficients, form, circularity, and black ratio were obtained (91.3 percent). The findings from the methodology proposed demonstrated its promising inline usage in the cabin to assess driver drowsiness status [21].
R. Roopalakshmi et al. (2018) proposed a driver drowsiness detection system that uses blink counts to detect drowsiness. The experimental findings of the proposed method introduced with a single camera view in Open CV & Raspberry Pi settings have to demonstrate the system's good efficiency in accurate drowsiness detection and thus minimize road accidents. [22]. J. W. Baek et al. (2018) proposed for detects the face of the driver in this image and calculated the points of interest in the facialarea. To detect the face, an AdaBoost classifier based on Census Transformation features is added to the suggested algorithm. And for the face landmark recognition, the suggested algorithm used regressing local binary features. They got a dataset from the infrared camera, which uses real area, using video recordings. The proposed algorithm in the targeted board hasbeen tested (i.mx6q). Findings indicated that the proposed algorithm exceeded speed and accuracy [23].
B. Eraldo et al. (2019) Using Raspberry Pi3 in the OpenCV library, and sensors like MQ-3 that measures alcohol percentage and S9 that measures heart rate was created as part of a drowsy detection that integratedimage processing. It also has an alert system and a touch screen as an interface for displaying the data measured by the sensors. This method is therefore efficient and feasible [24].
R. K. M et al.(2019)implemented a system to detect drowsiness with the Raspberry Pi and including many sensors such as the Gas Sensor as well as the vibration sensor. A camera that captures the important sign is watched by the driver. The image of the individual is sent if the eyes are closed for a longer period. The accident is detected by a vibration sensor and notified with a latitude and longitude message to the server [25].

Problems Associate in Driver Drowsiness Detection
Security is our primary priority during travels or driving. A driver'smistake can lead to severe physical injury, death, or severe economic loss. Many systems, such as navigation systems, sensors, etc. are currently available on the market to make the driver work easy. There are many causes, in particular human mistakes that lead to road crashes. After recent years,sources show that there has been a massive increase in road injuries in our country. The main cause of traffic crashes is the driver's sleepiness and fatigue when driving. An effective technique is required to detect drowsiness as soon as the driver is sleepy. This will save a lot of accidents.
One of the major causes of road accidents is driver drowsiness. This is a major issue for road safety. If drivers have warned of these crashes before they were too drowsy to drive in safety. To detect drowsiness reliably, it relies on the timely warning of drowsiness. Drowsy is one of the main reasons behind traffic accidents which place the driver significantly at higher risk of accidents than driving alertly.

Measures and Techniques Used for Detection Drowsiness
Numerous facial features may be drawn from the face to deduce the degree of drowsiness. These compriseeye blinks, head movements & yawning. Nonetheless, it is a task to build a drowsy detection method that offers consistent & accurate results as detailed and robust algorithms are required. A variety of methods fordrowsy detection have been examined in the past time. The recent increase in deep comprehension requires revisions of such algorithms to detect drowsiness accurately. This paper explores techniques for machine learning that include SVM, CNN, and HMM in the context of the detection of drowsiness. Table 2 and the included are briefly described the approaches below.

Support Vector Machine (SVM)
SVMs have supervised classification and regression approaches to learning. Boser, Guyo&Vapnik initially introduced SVMs in 1992. SVMs aim to find a hyperplane that divides training data into predefined paths. In the field of driver drowsiness, SVMs are mainly applied to identify the various driver state from the defined data. There have been many efforts in the detection of drowsiness using the SVMs. A variety of measures were used to assess driver drowsiness rate using SVMs. Table 2 presents a comparison of these steps and briefly describes the methods below.

Hidden Markov Model (HMM)
HMMs are a mathematical model used to simulate hidden states based on detected probabilitydefined parameters. Leonard Baum and colleagues developed HMMs at the end of the 1960s and early 1970s. Today, HMMs are commonly used for applications like facial expressionrecognition, gene annotation, DNA sequence error modeling, and computer virus classification. Table 2 indicates different features and methods applied by HMM-DDs, but Zhang et al. and Choi et al. omitted details essential to compare their results. The Authors suggested a new facial feature using wrinkle changes that are detected by measuring the intensity of the local edge on the face. They have also applied an IR camera to avoid changes in light to allow including day-night operation. Fortunately, if peopleused this older system could give false results since the wrinkles are deeper. By contrast with HMM, methods for eye-tracking based on color and geometric features have been applied. Authors use a two-stage Lloyd-max calculation to extract light to ensure that changes in lighting are robust. This machine is unfortunately built for enclosed operating conditions & if the driver is not onward then fails to recognize the face.

CNN
CNN's are the same as a normal neural network and often consist of neurons for learning weights. CNN uses spatial layers that are suitable for images and that represent effective spatial correlations. CNN has proved effective in the areas of imagerecognition, video analysis, and classification. Yann LeCun and YoshuaBengio were the first to provide a computer vision in CNN.  [26].

Viola-Jones Algorithm
Viola-Jones technique is based on input image processing or extracts pixel-based information to aid in the detection of features. Optimization of this window detects image faces of different sizes. It is an invariant detector in sizes also and runs through the image with different sizes each time. The required component issimilar no. of calculations, regardless of the image size, because it is invariant in scale. Viola-Jones is a cascade detector. The first phase contains detectors that only remove those image parts that do not face. The complexity of detectors has been further extended in later phases to further analyze the characteristics. A face is only detected as the entire cascade is passed through [27]. Then,the SVM was trained to class as well as to trigger an alarm when the eyes open or closed. The developers of [30,31] suggested a method to detect drowsiness and distraction of the driver as well. So, this Viola & Jones algorithm was used with local binary patterns (LBP) to detect faces and color histograms to track faces over frames. The system produced an accuracy of 100% in face recognition, but the expected low frame rate that can lead to missing facial expressions which is potential decreases. The variety of features and approaches used by HMM drowsiness detectors are seen in Table 2 but Zhang et al. [32] omitted the details needed to compare its results and it is not part of the meta-analysis stage. Instead [33], introduced HMM eye detection methods based on color and geometric features. The authors used a 2-level Lloyd-max empirical to be stable for illumination changes [33]. This system is predictably conceived to be enclosed and fails to identify the face of the driver who doesn't look ahead. Table 2 also provides a brief overview of CNN & multi-modal fusion detection methods. As an outcome, it is difficult to compare methods by only estimating reported accuracies. An analysis of measures creating the driver's drowsiness detection system is now explored on machine learning techniques to identify various levels of drowsiness.     Table 3 shows the accuracy rate for Face detection, Eyes detection, and Mouth detection metrics on the frame numbers.

Conclusion
Many vision applications need precise and effective image segmentation methods and classification processes to analyze visual information & perform real-time decision making. Drowsy driving may be almost as fatal as drunk driving. The drivers' drowsiness doesn't only lay itself but it risks for everyone else. Tired & sleepy drivers have delayed reactions & have made poor decisions. One of the main advantages of the drowsy driver detection system is promotingsafety. Several technologies are obtainable to identify the drowsiness of the driver and every approach through its limitations. In this work, we have discussed and analyzed driver drowsiness with their approaches. There are various machine learning methods available to detect driver drowsiness. Machine learning is a paradigm that could apply to learning from previous experience to improve future success (in this case prior data). This paper consists of a support vector machine, convolution neural network, Hidden Markov model, and multi-model fusion classifiers. Such all classifiers usedseveral different methods and hybrid methods to detect drowsiness using eye state metric.It revealed that SVM technology is the most widely applied method to detect drowsiness, and recently CNN is the most suitable classifier, but HMM is performed better than the other two. It also tested face detection and mouth detection metrics with eye detection metric on the frame numbers and we found that drowsiness can detect more accurately (i.e. 99.80%) using mouth detection metric.