SlideShare a Scribd company logo
1 of 8
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Driver Drowsiness Monitoring System using Visual Behaviour and Machine
Learning And Lane Detection
In this project by monitoring Visual Behaviour of a driver with webcam and machine
learning SVM (support vector machine) algorithm we are detecting Drowsiness in a driver.
This application will use inbuilt webcam to read pictures of a driver and then using OPENCV
SVM algorithm extract facial features from the picture and then check whether driver in
picture is blinking his eyes for consecutive 20 frames or yawning mouth then application will
alert driver with Drowsiness messages. We are using SVM pre-trained drowsiness model and
then using Euclidean distance function we are continuously checking or predicting EYES and
MOUTH distance closer to drowsiness, if distance is closer to drowsiness then application
will alert driver.In this project, I used Python and OpenCV to detect lane lines on the road. I
developed a processing pipeline that works on a series of individual images, and applied the
result to a video stream.
To implement above concept we are using following modules
Video Recording: Using this module we will connect application to webcam using OPENCV
built-in function called VideoCapture.
Frame Extraction: Using this module we will grab frames from webcam and then extract each
picture frame by frame and convert image into 2 dimensional array.
Face Detection & Facial Landmark Detection: Using SVM algorithm we will detect faces
from images and then extract facial expression from the frames.
Detection: Using this module we will detect eyes and mouth from the face
Calculate: Using this module we will calculate distance with Euclidean Distance formula to
check whether given face distance closer to eye blinks or yawning, if eyes blink for 20 frames
continuously and mouth open as yawn then it will alert driver.
OpenCV is an artificial intelligence API available in python to perform various operation on
images such as image recognition, face detection, and convert images to gray or coloured
images etc. This API written in C++ languages and then make C++ functions available to call
from python using native language programming. Steps involved in face detection using
OpenCV.
Face Detection Using OpenCV
This seems complex at first but it is very easy. Let me walk you through the entire process
and you will feel the same.
Step 1: Considering our prerequisites, we will require an image, to begin with. Later we need
to create a cascade classifier which will eventually give us the features of the face.
Step 2: This step involves making use of OpenCV which will read the image and the features
file. So at this point, there are NumPy arrays at the primary data points.
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
All we need to do is to search for the row and column values of the face NumPy N
dimensional array. This is the array with the face rectangle coordinates.
Step 3: This final step involves displaying the image with the rectangular face box.
SVM Description
Machine learning involves predicting and classifying data and to do so we employ various
machine learning algorithms according to the dataset. SVM or Support Vector Machine is a
linear model for classification and regression problems. It can solve linear and non-linear
problems and work well for many practical problems. The idea of SVM is simple: The
algorithm creates a line or a hyperplane which separates the data into classes. In machine
learning, the radial basis function kernel, or RBF kernel, is a popular kernel function used in
various kernelized learning algorithms. In particular, it is commonly used in support vector
machine classification. As a simple example, for a classification task with only two features
(like the image above), you can think of a hyperplane as a line that linearly separates and
classifies a set of data.
Intuitively, the further from the hyperplane our data points lie, the more confident we are that
they have been correctly classified. We therefore want our data points to be as far away from
the hyperplane as possible, while still being on the correct side of it.
So when new testing data is added, whatever side of the hyperplane it lands will decide the
class that we assign to it.
How do we find the right hyperplane?
Or, in other words, how do we best segregate the two classes within the data?
The distance between the hyperplane and the nearest data point from either set is known as
the margin. The goal is to choose a hyperplane with the greatest possible margin between the
hyperplane and any point within the training set, giving a greater chance of new data being
classified correctly.
Project Description
Drowsy driving is one of the major causes of road accidents and death. Hence, detection of
driver’s fatigue and its indication is an active research area. Most of the conventional
methods are either vehicle based, or behavioural based or physiological based. Few methods
are intrusive and distract the driver, some require expensive sensors and data handling.
Therefore, in this study, a low cost, real time driver’s drowsiness detection system is
developed with acceptable accuracy. In the developed system, a webcam records the video
and driver’s face is
detected in each frame employing image processing techniques. Facial landmarks on the
detected face are pointed and subsequently the eye aspect ratio, mouth opening ratio and nose
length ratio are computed and depending on their values, drowsiness is detected based on
developed adaptive thresholding.
Lane Detection Module:
Pipeline architecture:
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
---
1. Load test images.
2. Apply Color Selection
Lane lines in the test images are in white and yellow. We need to choose the most suitable
color space, that clearly highlights the lane lines.
I applied color selection to the original RGB images, HSV images, and HSL images, and
found out that using HSL will be the best color space to use.
3. Apply Canny edge detection.
- We need to detect edges in the images to be able to correctly detect lane lines.
The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to
detect a wide range of edges in images.
The Canny algorithm involves the following steps:
- Gray scaling the images: The Canny edge detection algorithm measures the intensity
gradients of each pixel. So, we need to convert the images into gray scale in order to detect
edges.
- Gaussian smoothing: Since all edge detection results are easily affected by image noise, it is
essential to filter out the noise to prevent false detection caused by noise. To smooth the
image, a Gaussian filter is applied to convolve with the image. This step will slightly smooth
the image to reduce the effects of obvious noise on the edge detector.
- Find the intensity gradients of the image.
- Apply non-maximum suppression to get rid of spurious response to edge detection.
- Apply double threshold to determine potential edges.
- Track edge by hysteresis: Finalize the detection of edges by suppressing all the other edges
that are weak and not connected to strong edges.
If an edge pixel’s gradient value is higher than the high threshold value, it is marked as a
strong edge pixel. If an edge pixel’s gradient value is smaller than the high threshold value
and larger than the low threshold value, it is marked as a weak edge pixel. If an edge pixel's
value is smaller than the low threshold value, it will be suppressed. The two threshold values
are empirically determined and their definition will depend on the content of a given input
image.
4. Determine the region of interest.
We're interested in the area facing the camera, where the lane lines are found. So, we'll apply
region masking to cut out everything else.
5. Apply Hough transform.
The Hough transform is a technique which can be used to isolate features of a particular
shape within an image. I'll use it to detected the lane lines in `selected_region_images`.
6. Average and extrapolating the lane lines.
We have multiple lines detected for each lane line. We need to average all these lines and
draw a single line for each lane line. We also need to extrapolate the lane lines to cover the
full lane line length.
7. Apply on video streams.
Now, we'll use the above functions to detect lane lines from a video stream.
The video inputs are in test_videos folder. The video outputs are generated in output_videos
folder.And Video will be palyed
Screen shots
To run this project double click on ‘run.bat’ file to get below screen
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen click on ‘Start Behaviour Monitoring Using Webcam’ button to connect
application with webcam, after clicking button will get below screen with webcam streaming
In above screen we can see web cam stream then application monitor all frames to see person
eyes are open or not, if closed then will get below message
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Similarly if mouth starts yawn then also will get alert message
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Now Upload the images from the test_images folder to detection the lane.
Select the required file and file location will be displaced on the screen.
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Now click on lane Detection for selected video and after preprocessing it will display video
and below.
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com

More Related Content

Similar to Driver Drowsiness Detection Using OpenCV

PROJECT REPORT
PROJECT REPORTPROJECT REPORT
PROJECT REPORTpmm330
 
1410482042(Farhat Tasnim) & 1621802042(K.M.H.Mubin) sec 11.pptx
1410482042(Farhat Tasnim) & 1621802042(K.M.H.Mubin) sec 11.pptx1410482042(Farhat Tasnim) & 1621802042(K.M.H.Mubin) sec 11.pptx
1410482042(Farhat Tasnim) & 1621802042(K.M.H.Mubin) sec 11.pptxpproject345
 
Road signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencvRoad signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencvMohdSalim34
 
A Real-Time Monitoring System for the Drivers using PCA and SVM
A Real-Time Monitoring System for the Drivers using PCA and SVMA Real-Time Monitoring System for the Drivers using PCA and SVM
A Real-Time Monitoring System for the Drivers using PCA and SVMIRJET Journal
 
Traffic sign detection and recognition
Traffic sign detection and recognitionTraffic sign detection and recognition
Traffic sign detection and recognitionVenkat Projects
 
Review A DCNN APPROACH FOR REAL TIME UNCONSTRAINED FACE.pptx
Review A DCNN APPROACH FOR REAL TIME UNCONSTRAINED FACE.pptxReview A DCNN APPROACH FOR REAL TIME UNCONSTRAINED FACE.pptx
Review A DCNN APPROACH FOR REAL TIME UNCONSTRAINED FACE.pptxAravindHari22
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection SystemAbhiroop Ghatak
 
IRJET- Survey on Face Recognition using Biometrics
IRJET-  	  Survey on Face Recognition using BiometricsIRJET-  	  Survey on Face Recognition using Biometrics
IRJET- Survey on Face Recognition using BiometricsIRJET Journal
 
Gender Classification using SVM With Flask
Gender Classification using SVM With FlaskGender Classification using SVM With Flask
Gender Classification using SVM With FlaskAI Publications
 
Road signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencvRoad signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencvMohdSalim34
 
REAL TIME DROWSY DRIVER DETECTION USING HAARCASCADE SAMPLES
REAL TIME DROWSY DRIVER DETECTION USING HAARCASCADE SAMPLESREAL TIME DROWSY DRIVER DETECTION USING HAARCASCADE SAMPLES
REAL TIME DROWSY DRIVER DETECTION USING HAARCASCADE SAMPLEScsandit
 
Real time drowsy driver detection
Real time drowsy driver detectionReal time drowsy driver detection
Real time drowsy driver detectioncsandit
 
SIGN LANGUAGE INTERFACE SYSTEM FOR HEARING IMPAIRED PEOPLE
SIGN LANGUAGE INTERFACE SYSTEM FOR HEARING IMPAIRED PEOPLESIGN LANGUAGE INTERFACE SYSTEM FOR HEARING IMPAIRED PEOPLE
SIGN LANGUAGE INTERFACE SYSTEM FOR HEARING IMPAIRED PEOPLEIRJET Journal
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsVenkat Projects
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsVenkat Projects
 
Video based abnormal driving behaviour detection via deep learning fusions
Video based abnormal driving behaviour detection via deep learning fusionsVideo based abnormal driving behaviour detection via deep learning fusions
Video based abnormal driving behaviour detection via deep learning fusionsVenkat Projects
 
IRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry Pi
IRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry PiIRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry Pi
IRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry PiIRJET Journal
 

Similar to Driver Drowsiness Detection Using OpenCV (20)

PROJECT REPORT
PROJECT REPORTPROJECT REPORT
PROJECT REPORT
 
1410482042(Farhat Tasnim) & 1621802042(K.M.H.Mubin) sec 11.pptx
1410482042(Farhat Tasnim) & 1621802042(K.M.H.Mubin) sec 11.pptx1410482042(Farhat Tasnim) & 1621802042(K.M.H.Mubin) sec 11.pptx
1410482042(Farhat Tasnim) & 1621802042(K.M.H.Mubin) sec 11.pptx
 
SMOKE DETECTION ALARM.docx
SMOKE DETECTION ALARM.docxSMOKE DETECTION ALARM.docx
SMOKE DETECTION ALARM.docx
 
Self driving vehicle
Self driving vehicleSelf driving vehicle
Self driving vehicle
 
Road signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencvRoad signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencv
 
A Real-Time Monitoring System for the Drivers using PCA and SVM
A Real-Time Monitoring System for the Drivers using PCA and SVMA Real-Time Monitoring System for the Drivers using PCA and SVM
A Real-Time Monitoring System for the Drivers using PCA and SVM
 
Traffic sign detection and recognition
Traffic sign detection and recognitionTraffic sign detection and recognition
Traffic sign detection and recognition
 
Review A DCNN APPROACH FOR REAL TIME UNCONSTRAINED FACE.pptx
Review A DCNN APPROACH FOR REAL TIME UNCONSTRAINED FACE.pptxReview A DCNN APPROACH FOR REAL TIME UNCONSTRAINED FACE.pptx
Review A DCNN APPROACH FOR REAL TIME UNCONSTRAINED FACE.pptx
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection System
 
IRJET- Survey on Face Recognition using Biometrics
IRJET-  	  Survey on Face Recognition using BiometricsIRJET-  	  Survey on Face Recognition using Biometrics
IRJET- Survey on Face Recognition using Biometrics
 
Gender Classification using SVM With Flask
Gender Classification using SVM With FlaskGender Classification using SVM With Flask
Gender Classification using SVM With Flask
 
Road signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencvRoad signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencv
 
REAL TIME DROWSY DRIVER DETECTION USING HAARCASCADE SAMPLES
REAL TIME DROWSY DRIVER DETECTION USING HAARCASCADE SAMPLESREAL TIME DROWSY DRIVER DETECTION USING HAARCASCADE SAMPLES
REAL TIME DROWSY DRIVER DETECTION USING HAARCASCADE SAMPLES
 
Real time drowsy driver detection
Real time drowsy driver detectionReal time drowsy driver detection
Real time drowsy driver detection
 
SIGN LANGUAGE INTERFACE SYSTEM FOR HEARING IMPAIRED PEOPLE
SIGN LANGUAGE INTERFACE SYSTEM FOR HEARING IMPAIRED PEOPLESIGN LANGUAGE INTERFACE SYSTEM FOR HEARING IMPAIRED PEOPLE
SIGN LANGUAGE INTERFACE SYSTEM FOR HEARING IMPAIRED PEOPLE
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithms
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithms
 
DRIVER DROWSINESS ALERT SYSTEM
DRIVER DROWSINESS ALERT SYSTEMDRIVER DROWSINESS ALERT SYSTEM
DRIVER DROWSINESS ALERT SYSTEM
 
Video based abnormal driving behaviour detection via deep learning fusions
Video based abnormal driving behaviour detection via deep learning fusionsVideo based abnormal driving behaviour detection via deep learning fusions
Video based abnormal driving behaviour detection via deep learning fusions
 
IRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry Pi
IRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry PiIRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry Pi
IRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry Pi
 

More from Venkat Projects

1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docxVenkat Projects
 
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...Venkat Projects
 
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docxVenkat Projects
 
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docxVenkat Projects
 
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...Venkat Projects
 
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docxImage Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docxVenkat Projects
 
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...Venkat Projects
 
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...Venkat Projects
 
Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...Venkat Projects
 
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...Venkat Projects
 
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docxVenkat Projects
 
2022 PYTHON MAJOR PROJECTS LIST.docx
2022 PYTHON MAJOR  PROJECTS LIST.docx2022 PYTHON MAJOR  PROJECTS LIST.docx
2022 PYTHON MAJOR PROJECTS LIST.docxVenkat Projects
 
2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docx2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docxVenkat Projects
 
2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docx2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docxVenkat Projects
 
2021 python projects list
2021 python projects list2021 python projects list
2021 python projects listVenkat Projects
 
10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learni10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learniVenkat Projects
 
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...Venkat Projects
 
6.iris recognition using machine learning technique
6.iris recognition using machine learning technique6.iris recognition using machine learning technique
6.iris recognition using machine learning techniqueVenkat Projects
 
5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal cluster5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal clusterVenkat Projects
 

More from Venkat Projects (20)

1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
 
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
 
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
 
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
 
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
 
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docxImage Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
 
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
 
WATERMARKING IMAGES
WATERMARKING IMAGESWATERMARKING IMAGES
WATERMARKING IMAGES
 
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
 
Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...
 
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
 
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
 
2022 PYTHON MAJOR PROJECTS LIST.docx
2022 PYTHON MAJOR  PROJECTS LIST.docx2022 PYTHON MAJOR  PROJECTS LIST.docx
2022 PYTHON MAJOR PROJECTS LIST.docx
 
2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docx2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docx
 
2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docx2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docx
 
2021 python projects list
2021 python projects list2021 python projects list
2021 python projects list
 
10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learni10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learni
 
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
 
6.iris recognition using machine learning technique
6.iris recognition using machine learning technique6.iris recognition using machine learning technique
6.iris recognition using machine learning technique
 
5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal cluster5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal cluster
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

Driver Drowsiness Detection Using OpenCV

  • 1. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com Driver Drowsiness Monitoring System using Visual Behaviour and Machine Learning And Lane Detection In this project by monitoring Visual Behaviour of a driver with webcam and machine learning SVM (support vector machine) algorithm we are detecting Drowsiness in a driver. This application will use inbuilt webcam to read pictures of a driver and then using OPENCV SVM algorithm extract facial features from the picture and then check whether driver in picture is blinking his eyes for consecutive 20 frames or yawning mouth then application will alert driver with Drowsiness messages. We are using SVM pre-trained drowsiness model and then using Euclidean distance function we are continuously checking or predicting EYES and MOUTH distance closer to drowsiness, if distance is closer to drowsiness then application will alert driver.In this project, I used Python and OpenCV to detect lane lines on the road. I developed a processing pipeline that works on a series of individual images, and applied the result to a video stream. To implement above concept we are using following modules Video Recording: Using this module we will connect application to webcam using OPENCV built-in function called VideoCapture. Frame Extraction: Using this module we will grab frames from webcam and then extract each picture frame by frame and convert image into 2 dimensional array. Face Detection & Facial Landmark Detection: Using SVM algorithm we will detect faces from images and then extract facial expression from the frames. Detection: Using this module we will detect eyes and mouth from the face Calculate: Using this module we will calculate distance with Euclidean Distance formula to check whether given face distance closer to eye blinks or yawning, if eyes blink for 20 frames continuously and mouth open as yawn then it will alert driver. OpenCV is an artificial intelligence API available in python to perform various operation on images such as image recognition, face detection, and convert images to gray or coloured images etc. This API written in C++ languages and then make C++ functions available to call from python using native language programming. Steps involved in face detection using OpenCV. Face Detection Using OpenCV This seems complex at first but it is very easy. Let me walk you through the entire process and you will feel the same. Step 1: Considering our prerequisites, we will require an image, to begin with. Later we need to create a cascade classifier which will eventually give us the features of the face. Step 2: This step involves making use of OpenCV which will read the image and the features file. So at this point, there are NumPy arrays at the primary data points.
  • 2. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com All we need to do is to search for the row and column values of the face NumPy N dimensional array. This is the array with the face rectangle coordinates. Step 3: This final step involves displaying the image with the rectangular face box. SVM Description Machine learning involves predicting and classifying data and to do so we employ various machine learning algorithms according to the dataset. SVM or Support Vector Machine is a linear model for classification and regression problems. It can solve linear and non-linear problems and work well for many practical problems. The idea of SVM is simple: The algorithm creates a line or a hyperplane which separates the data into classes. In machine learning, the radial basis function kernel, or RBF kernel, is a popular kernel function used in various kernelized learning algorithms. In particular, it is commonly used in support vector machine classification. As a simple example, for a classification task with only two features (like the image above), you can think of a hyperplane as a line that linearly separates and classifies a set of data. Intuitively, the further from the hyperplane our data points lie, the more confident we are that they have been correctly classified. We therefore want our data points to be as far away from the hyperplane as possible, while still being on the correct side of it. So when new testing data is added, whatever side of the hyperplane it lands will decide the class that we assign to it. How do we find the right hyperplane? Or, in other words, how do we best segregate the two classes within the data? The distance between the hyperplane and the nearest data point from either set is known as the margin. The goal is to choose a hyperplane with the greatest possible margin between the hyperplane and any point within the training set, giving a greater chance of new data being classified correctly. Project Description Drowsy driving is one of the major causes of road accidents and death. Hence, detection of driver’s fatigue and its indication is an active research area. Most of the conventional methods are either vehicle based, or behavioural based or physiological based. Few methods are intrusive and distract the driver, some require expensive sensors and data handling. Therefore, in this study, a low cost, real time driver’s drowsiness detection system is developed with acceptable accuracy. In the developed system, a webcam records the video and driver’s face is detected in each frame employing image processing techniques. Facial landmarks on the detected face are pointed and subsequently the eye aspect ratio, mouth opening ratio and nose length ratio are computed and depending on their values, drowsiness is detected based on developed adaptive thresholding. Lane Detection Module: Pipeline architecture:
  • 3. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com --- 1. Load test images. 2. Apply Color Selection Lane lines in the test images are in white and yellow. We need to choose the most suitable color space, that clearly highlights the lane lines. I applied color selection to the original RGB images, HSV images, and HSL images, and found out that using HSL will be the best color space to use. 3. Apply Canny edge detection. - We need to detect edges in the images to be able to correctly detect lane lines. The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images. The Canny algorithm involves the following steps: - Gray scaling the images: The Canny edge detection algorithm measures the intensity gradients of each pixel. So, we need to convert the images into gray scale in order to detect edges. - Gaussian smoothing: Since all edge detection results are easily affected by image noise, it is essential to filter out the noise to prevent false detection caused by noise. To smooth the image, a Gaussian filter is applied to convolve with the image. This step will slightly smooth the image to reduce the effects of obvious noise on the edge detector. - Find the intensity gradients of the image. - Apply non-maximum suppression to get rid of spurious response to edge detection. - Apply double threshold to determine potential edges. - Track edge by hysteresis: Finalize the detection of edges by suppressing all the other edges that are weak and not connected to strong edges. If an edge pixel’s gradient value is higher than the high threshold value, it is marked as a strong edge pixel. If an edge pixel’s gradient value is smaller than the high threshold value and larger than the low threshold value, it is marked as a weak edge pixel. If an edge pixel's value is smaller than the low threshold value, it will be suppressed. The two threshold values are empirically determined and their definition will depend on the content of a given input image. 4. Determine the region of interest. We're interested in the area facing the camera, where the lane lines are found. So, we'll apply region masking to cut out everything else. 5. Apply Hough transform. The Hough transform is a technique which can be used to isolate features of a particular shape within an image. I'll use it to detected the lane lines in `selected_region_images`. 6. Average and extrapolating the lane lines. We have multiple lines detected for each lane line. We need to average all these lines and draw a single line for each lane line. We also need to extrapolate the lane lines to cover the full lane line length. 7. Apply on video streams. Now, we'll use the above functions to detect lane lines from a video stream. The video inputs are in test_videos folder. The video outputs are generated in output_videos folder.And Video will be palyed Screen shots To run this project double click on ‘run.bat’ file to get below screen
  • 4. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com In above screen click on ‘Start Behaviour Monitoring Using Webcam’ button to connect application with webcam, after clicking button will get below screen with webcam streaming In above screen we can see web cam stream then application monitor all frames to see person eyes are open or not, if closed then will get below message
  • 5. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com Similarly if mouth starts yawn then also will get alert message
  • 6. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com Now Upload the images from the test_images folder to detection the lane. Select the required file and file location will be displaced on the screen.
  • 7. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com Now click on lane Detection for selected video and after preprocessing it will display video and below.
  • 8. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com