Drowsiness Detection using machine learning (1).pptx

11,388 views 34 slides Nov 12, 2022
Slide 1
Slide 1 of 34
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34

About This Presentation

DROWSINESS


Slide Content

DROWSINESS DETECTION USING OPENCV AND MACHINE LEARNING Project Supervisor : Mr.,., Team Member : 1. Reg.No . XXXXX 2. Reg.No . xxxxxxx

Introduction In recent years, an increase in the demand for modern transportation necessitates a faster car- parc growth. At present, the automobile is an essential mode of transportation for people. Although the automobile has changed people’s lifestyle and improved the convenience of conducting daily activities, it is also associated with numerous negative effects, such as traffic accidents. fatigued driving is a significant and latent danger in traffic accidents. In recent years, the fatigue-driving-detection system has become a hot research topic. The detection methods are categorized as subjective and objective detection. In the subjective detection method, a driver must participate in the evaluation, which is associated with the driver’s subjective perceptions through steps such as self-questioning, The associate editor coordinating the review of this article and approving it for publication was Gustavo Olague . evaluation and filling in questionnaires. Then, these data are used to estimate the vehicles being driven by tired drivers, assisting the drivers to plan their schedules accordingly. However, drivers’ feedback is not required in the objective detection method as it monitors the driver’s physiological state and driving-behavior characteristics in real time. The collected data are used to evaluate the driver’s level of fatigue. Furthermore, objective detection is categorized into two: contact and non-contact. Compared with the contact method, non-contact is cheaper and more convenient because the system that not require Computer Vision technology or sophisticate camera allow the use of the device in more cars. Owing to easy installation and low cost, the non-contact method has been widely used for fatigue-driving detection. For instance, Attention Technologies and SmartEye employ the movement of the driver’s eyes and position of the driver’s head to determine the level of their fatigue. In this study, we propose a non-contact method to detect the level of the driver’s fatigue. Our method employs the use of only the vehicle-mounted camera, making it unnecessary for the driver to carry any on/in-body devices. Our design uses each frame image to analyze and detect the driver’s state

Objective Driver drowsiness detection is a car safety technology which helps to save the life of the driver by preventing accidents when the driver is getting drowsy. The main objective is to first design a system to detect driver’s drowsiness by continuously monitoring retina of the eye. The system works in spite of driver wearing spectacles and in various lighting conditions. To alert the driver on the detection of drowsiness by using buzzer or alarm. Speed of the vehicle can be reduced. Traffic management can be maintained by reducing the accidents

ABSTARCT: The face, an important part of the body, conveys a lot of information. When a driver is in a state of fatigue, the facial expressions, e.g., the frequency of blinking and yawning, are different from those in the normal state. In this project, we propose a system, which detects the drivers' fatigue status, such as yawning, blinking, and duration of eye closure, using video images, without equipping their bodies with devices. In this study, we propose a computer vision based method to detect driver’s drowsiness from a video taken by a camera. The method attempts to recognize the face and then detecting the eye in every frame. Further, we designed a new detection method for facial regions based on 68 key points. Then we use these facial regions to evaluate the drivers' state. By combining the features of the eyes and mouth, we can alert the driver using a fatigue warning with the alarm sound.

EXISTING SYSTEM: The paper's motive is to demonstrate the implementation of a driver’s drowsiness detection using MATLAB through image processing. Studies suggest that about one-fourth of all serious road accidents occur because of the vehicle drivers' drowsiness where they need to take, confirming that drowsiness gives rise to more road accidents than accidents occur through Drink and Drive. Drowsiness Detection System is designed by employing vision-based concepts. The system’s main component is a small camera pointing towards the driver's face scan and monitoring the driver's eyes to detect drowsiness There are various methods like detecting objects which are near to vehicle and front and rear cameras for detecting vehicles approaching near to vehicle and airbag system which can save lives after an accident is accorded.

PROBLEM STATEMENT Fatigue is a safety problem that has not yet been deeply tackled by any country in the world mainly because of its nature. Fatigue, in general, is very difficult to measure or observe unlike alcohol and drugs, which have clear key indicators and tests that are available easily. Probably, the best solutions to this problem are awareness about fatigue-related accidents and promoting drivers to admit fatigue when needed. The former is hard and much more expensive to achieve, and the latter is not possible without the former as driving for long hours is very lucrative. Most of the existing systems use external factors and inform the user about the problem and save users after an accident is accord but from research most of the accidents are due to faults in users like drowsiness, sleeping while driving . These methods can’t able to detect the facial expressions, yawning head nods, and majorly on eye blink frequencies . Accuracy of the existing method is not good when comapred to the proposed model

PROPSOED SYTEM: Visual object tracking Facial landmarks recognition Driver drowsiness detection Determination of eyes and mouth regions : The region of the eyes, Evaluation of the driver’s fatigue state Eye status recognition: (Recognition based on cnn and recognition based on angle) Mouth status recognition Alarm Sound Self Mode alert

Technology Used PYTHON - Python is an interpreted, high-level, general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects. Python is dynamically typed AND supports multiple programming paradigms, including procedural, object-oriented, and functional programming. Pycharm IDE- created to develop open-source software, open-standards, and services for interactive computing across dozens of programming languages. IMAGE PROCESSING - In computer science, digital image processing is the use of computer algorithms to perform image processing on digital images. MACHINE LEARNING - Machine learning is the scientific study of algorithms and statistical models that computer systems use in order to perform a specific task effectively without using explicit instructions, relying on patterns and inference instead. It is seen as a subset of artificial intelligence. Machine learning algorithms build a mathematical model based on sample data, known as "training data", in order to make predictions or decisions without being explicitly told.

  ADVANTAGES: This method will detect a problem before any problem accord and inform the driver and other passengers by raising an alert. In this OpenCV based machine learning techniques are used for automatic detection of drowsiness.

LITERATURE REVIEW : AUTHOR DISCRIPTION ADVANTAGE DISADVANTAGE 1 Ceerthi Bala U.K and Sarath TV This system will provide an alert to the driver in case of drowsiness detection Once it is detected with the particular sensor, the system will alert the driver Low accuracy 2 Rateb Jabbar et al. developed a drowsiness detection model using Convolutional Neural Network (CNN) for mobile application. When the developed model applies with the real time camera, the drowsiness can be detected considerably As a result, they found 88% accuracy without glass, and a glass system detects 85% accuracy 3 Dr.K.S.Tiwari et al a study to identify drowsiness detection with IoT technology A buzzer and camera placed with a microcontroller continuously monitor the drowsiness with the necessary parameters. It not detect with glass.

CON…………… S.NO AUTHOR DISCRIPTION ADVANTAGE DISADVANTAGE 4 Dr.K.S.Tiwari e The hear-beat, temperature, and alcoholic sensor are placed with the wearable device with the driver A buzzer and camera placed with a microcontroller continuously monitor the drowsiness with the necessary parameters. the buzzer will be alarmed, and a message will be sent to the driver in slow 5 Md. Yousuf Hossain and Fabian Parsia George .A Raspberry Pi controller pretends as a hub of this system. A camera module, buzzer, and IoT devices are connected with the controller The purpose of IoT in this 2021 International Conference on Information system was to get the mail services. The camera detects the driver, and based on the landmark, it will identify the drowsiness Mail sent to other person

What is open cv ? OpenCV Python is nothing but a wrapper class for the original C++ library to be used with Python.  Using this, all of the OpenCV array structures  gets converted to/from NumPy arrays .  This makes it easier to integrate it with other libraries which use NumPy . For example, libraries such as SciPy and Matplotlib .  It can process images and videos to identify objects, faces, or even the handwriting of a human.

Block diagram: camera

Flow diagram:

H og algorithm: initially , the faces are detected using a Haar Cascade Classifier on an image in conjunction with the cropping of the cardinal section of the face. ... The H.O.G(Histogram of Oriented Gradients) is  a feature descriptor used in computer vision for image processing for the purpose of object detection. HOG, or Histogram of Oriented Gradients, is  a feature descriptor that is often used to extract features from image data . It is widely used in computer vision tasks for object detection. ... This is done by extracting the gradient and orientation (or you can say magnitude and direction) of the edges.

CON………………. The eye aspect  Ratio is  an estimate of the eye opening state . Based on Figure 2, the eye aspect ratio can be defined by the below equation. ... A program can determine if a person's eyes are closed if the Eye Aspect Ratio falls below a certain threshold. Clmtrackr is another facial landmark plotter.

SOFTWARE REQUIREMENTS Operating system: Windows 7. Coding Language: python Libraries Used Numpy Scipy Playsound Dlib Imutils opencv , etc. Tool: pycham

HARDWARE REQUIREMENTS Processor: Pentium processer of 400 MHz or higher. RAM: minimum 64MB primary memory Hard disk: minimum 1 GB hard disk space. Monitor : preferable color monitor (16 bit color) and above. Web camara Compact disk drive A keybord and mouse.

EYE ASPECT RATIO: The Eye Aspect Ratio is  an estimate of the eye opening state . the eye aspect ratio can be defined by the below equation. ... A program can determine if a person's eyes are closed if the Eye Aspect Ratio falls below a certain threshold. Clmtrackr is another facial landmark plotter FORMULA ||P2-P6||+||P3-P5|| EAR= 2||P1-P4||

CON………..

Facial Landmark: Facial Landmark- It is a inbuilt HOG SVM classifier used to determine the position of 68(x, y) coordinates that map to facial structures on the face It is mainly used for image or video processing and also analysis including object detection, face detection, etc. Facial landmarks are  used to localize  and represent important regions of the face, such as: · Mouth. · Eyes. · Eyebrows.

Facial Landmark:

MAR (MOUTH ASPECT RATIO) Using this concept, we have calculated the Mouth Aspect Ratio: Representing the face with 68-( x,y ) coordinates. As we see that the mouth is represented by a set of 20-( x,y ) coordinates. So, we have used coordinates 62, 64, 66, and 68 to calculate the distance  between then in  the same way as EAR Calculation . MAR = |CD| + |EF| + |GH | 3 * |AB|

CON………..

RESULTS AND DISCUSSION The driver anomaly observing framework created is able of identifying laziness, intoxicated and careless practices of driver in a brief time . The Laziness Detecting Framework created based on eye closure of the driver can separate ordinary eye flicker and tiredness and distinguish the laziness while driving . The suggested device is able to avoid the incidents when driving due to sleepiness. The system works properly even in case of drivers sporting spectacles and even below low light stipulations if the digital camera offers higher output . Information about the head and eyes position is obtained through a range of self-developed photograph processing algorithms. During the monitoring, the system is able to figure out if the eyes are opened or closed . When the eyes have been closed for too long, a warning sign is issued. processing judges the driver’s alertness level on the groundwork of continuous eye closures

Result(Attached your own output)

Result(Attached your own output)

Result(Attached your own output )

Result As a result beep sound is heard when the driver yawn and closes the eye lid. This helps to alert the driver. Also self driving mode starts when the driver eye is closed for more than 60 seconds.

CONCLUSION: The driver anomaly observing framework created is able of identifying laziness, intoxicated and careless practices of driver in a brief time. The Laziness Detecting Framework created based on eye closure of the driver can separate ordinary eye flicker and tiredness and distinguish the laziness while driving . The suggested device is able to avoid the incidents when driving due to sleepiness. The system works properly even in case of drivers sporting spectacles and even below low light stipulations if the digital camera offers higher output . Information about the head and eyes position is obtained through a range of self-developed photograph processing algorithms. During the monitoring, the system is able to figure out if the eyes are opened or closed. When the eyes have been closed for too long, a warning sign is issued. processing judges the driver’s alertness level on the groundwork of continuous eye closures

Limitation Dependence on ambient light:- With helpless lighting conditions despite the fact that face is effectively identified, now and again the framework can't identify the eyes. So it gives an erroneous result which must be dealt with. Continuously situation infrared backlights ought to be utilized to maintain a strategic distance from helpless lighting conditions. Optimum range required When the separation among face and webcam isn't at ideal range then certain issues are emerging. At the point when face is away from the webcam (more than 70cm) at that point the backlight is deficient to light up the face appropriately. So eyes are not identified with high exactness which shows mistake in detection of laziness. Orientation of face Problem with multiple faces Delay in sounding alarm

Future scope: The model can be improved incrementally by using other parameter blinking rate ,state of the cars , etc. If all these parameter are used it can improve the accuracy by lot. We plan to future work on the project by adding a sensor to o track the heart rate in order to prevent the accident caused due to sudden heart attack to driver. Same model and techniques can be used for various other uses like Netflix and other streaming services can detect when is asleep and stop the video accordingly . It can also be used in application that prevent user from sleeping

REFERENCE PAPERS: [1] World Health Organization, “Global Status Report on Road Safety 2015,” 2015. [Online]. Available: http://www.who.int/violence_injury_prevention/road_safety_status/ 2013/en/index.html. [Accessed: 29-May-2017]. [2] Z. Ngcobo , “Over 1,700 people died on SA roads this festive season,” 2017. [Online]. Available: http://ewn.co.za/2017/01/10/over-1-700-people-died-on-sa-roadsthis- festive-season. [Accessed: 20-May-2017]. [3] M. Lindeque , “RTMC report reveals shocking SA road death stats,” 2015. [Online]. Available: http://ewn.co.za/2015/09/11/RTMCreport- reveals-shocking-SA-road-death-stats. [Accessed: 20-May- 2017]. [4] Lowveld , “The top 3 causes of accidents?,” 2017. [Online]. Available: http://lowveld.getitonline.co.za/2017/04/12/top-3-causesaccidents/# . WS0X6WiGPIU. [Accessed: 20-May-2017]. [5] “Drowsy Driving.” [Online]. Available: http://sleepcenter.ucla.edu/drowsy-driving. [Accessed: 22-Jun- 2017]. [6] “Detection and Prevention : Drowsy Driving – Stay Alert, Arrive Alive.” [Online]. Available: