Syed Arshad
Tiruchirappalli, Tamil Nadu
Hosur, Tamil Nadu
The drowsiness detection system monitors the driver's condition and issues an alert if it detects signs of drowsiness using CNN - Python, OpenCV. This system aims to reduce the number of accidents on the road by detecting the driver's drowsiness and warning them using an alarm. ...learn more
Project status: Under Development
oneAPI, Artificial Intelligence
Intel Technologies
oneAPI
The number of accidents occuring has been increased a lot recently and one of the major reasons for it is drowsiness Therefore, there is a need for a better solution that can detect driver drowsiness accurately and unobtrusively, and provide timely feedback or intervention to prevent accidents.
Here, we used Python, OpenCV, and Keras(Tensorflow) to build a system that can detect features from the face of the drivers and alert them if they ever fall asleep while driving. The system detects the eyes and prompts if it is closed or open. If the eyes are closed for 10 seconds, it will play the alarm to get the driver's attention to stop because the system has detected drowsiness. We have built a model of CNN network trained on a dataset using OneAPI that can detect closed and open eyes. Then OpenCV is used to get the live feed from the camera and run every frame through the CNN model to process it and classify whether it is opened or closed eyes.
We have built an app using Flutter. Flutter helps Build, test, and deploy beautiful mobile, web, desktop, and embedded apps from a single codebase. It is a cross-platform app development framework by Google which goes hand in hand with the model to help ensure the safety of the user and other commuters.
As soon as the model detects drowsiness, the model will send an API request call to the client app, which notifies the user to take some rest and shows the navigation option to the nearest resting places. If the user isn't drowsy, the app will give 10 seconds buffer time within which the user can confirm that he isn't sleepy by pressing the prompt on the screen. If the user is drowsy he will get a option for getting driving assistance from the nearby driving service providers. If the user has been detected drowsy more than three times within 10 minutes, a notification is sent to the highway patrol and the nearby drivers as a concern for the safety of other drivers and the drowsy driver.
1. Pre-install all the required libraries
OpenCV
Keras
Numpy
Pandas
OS
**2️. Understand the dataset **The dataset which was used is a subset of the dataset from(https://www.kaggle.com/datasets/dheerajperumandla/drowsiness-dataset) It has 4 folder which are
Closed_eyes - having 726 pictures
Open_eyes - having 726 pictures
Yawn - having 725 pictures
no_yawn - having 723 pictures
3. Data preprocessing
preprocess the images from the closed_eye, open_eye, yawn and no_yawn folder.
Resizing all the images to the same dimensions and converting the images into numpy arrays.
The dataset will be split into training, validation, and testing sets.
4. Build and train the CNN model
The CNN model is designed and trained to classify images as either the driver's eye is opened or closed.
5️. Train the model using Intel OneAPI to get better results
Tensorflow
Open CV
Dart
OneAPI
Pandas
Keras
Intel OneDNN
Flutter
https://github.com/gangeshbaskerr/DriverDrowsinessDetection-OneAPI