Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Driver Drowsiness Detection System

SAMPITRODA AWARD PROJECT


Memoy Mishra XI
Pranav Wadhwa XI
Working Components of the project
1. Raspberry Pi 4 Computer (Model B ; 4 GB RAM)
2. USB Camera
3. Bluetooth Speaker (Aux in cable would also work)
4. Power Supply Cable USBC-Type (5V)
5. Micro SDHC card (Min. 8GB)
How a Raspberry Pi 4 looks
Components Required for Back-end
Programming
1. Monitor with HDMI Cable port (VGA port would also work)
2. VGA to HDMI Converter (if your monitor includes VGA port)
3. Keyboard and Mouse for operating Raspberry Pi
4. HDMI to Micro HDMI cable
5. Micro SDHC Card Reader
How does it work?
1) We took images of different people under different light conditions with both their eyes opened and closed and labelled
them as open or close and the images totalled up to 7000. All the images were saved in 24x24 pixels. This is the database
with which the driver’s eyes are compared.

2) We used Python 3.8 to code and the following dependencies were used: OpenCV, TensorFlow, Keras, Pygame. What the
python script does is that it first identifies the face in the camera’s frame and makes a box enclosing it called the Region of
Interest (ROI) which is also expanded or contracted to 24x24 pixels as the database comprises of images of same dimensions.
The script then identifies the eyes from the ROI and crops them out and stores them in 2 variables namely “leye” and “reye”.

3) These two images are then compared with the database in real-time to determine whether the driver is sleepy or not. If
the algorithm determines that the eyes have remained close for more than a certain assigned time value, it starts beeping
the alarm until the algorithm senses that the eyes are open again.
Database of 7000 images

It took us about a week to make a database of 7000 images


under different light conditions using Adobe Photoshop CC
2020 which is a photo manipulation software. We changed the
lighting condition of every image using the brightness and
contrast option for various possible conditions.
We first programmed the script on our PC and the built-in
speakers and cameras were used. When the algorithm
proved to be successful, we started integrating the software
with hardware in Raspberry pi. We installed the “Raspbian
32bit Software ” on the raspberry pi and the software was
How did we added to the startup to ensure that the program started
working as soon as we switched it on. Then USB cameras and
make it? speakers were attached. We chose only those speakers and
cameras which were small to ensure the design was small
enough to be placed in front of the driver without hindering
his/her view. Finally, when everything was attached, we
enclosed all wiring and the raspberry pi in a case with a
cooling fan to keep it intact and protected.
Serial Quantity Price
No. Particulars

1. Rasberry Pi 4 01 Rs 5,000
2. USB Camera 01 Rs 1,500 Cost and
3. USB Speaker 01 Rs 1,500 Feasibility
4. Case 01 Rs 200
Total: Rs 8,200
1. Quite Feasible for the
2. Doesn’t obstruct the
middle class population
driver’s view in any way.
(Rs. 8,200/- only).

3. It has a Heat Sink


Advantages
system and a cooling fan
which reduces its working
4. It makes no sound that
might disturb the driver. of our
product
temperature by 20ºC.

5. Power Supply is not an


issue as it would be
connected to the car
charging port.
Different Case Scenarios
1. If the car audio is already playing, the speaker automatically cancels out the car music and
produces a high frequency sound.
2. If there is not enough light in the car, it doesn’t matter because the camera has night vision.
3. If by any chance you think fog might affect the camera because of either cold weather or AC,
it doesn’t matter because the lens is fog resistant as well.
4. If the image in the camera appears dark because of a glare or facing the sun, the camera
already has a color corrector which prevents it.
5. If the driver looks back after putting the car in the reverse gear, raspberry pi won’t raise a false
positive which is further proved in our video.

You might also like