Realtime Driver Alertness Monitoring System

Published Aug 30, 2022
 48 hours to build
 Beginner

We built a device that detects drowsiness and alerts the driver if drowsiness is detected. Device which we built is portable and can be implemented in any vehicle. This device will capture out continuous real time images of the driver and check for drowsiness. Image processing is accomplished using a raspberry pi processor and open CV. Cell phone and cigarette detection is achieved by using YOLO algorithm

display image

Components Used

Raspberry Pi 4B
Raspberry Pi 4BRaspberry Pi 4B
1
Buzzer 5V
Buzzer 5V
1
USB Webcam
Cameras & Camera Modules USB 2.0 WEBCAM1080PLNSCVEMICAD
1
5V USB Charger
Wall Mount AC Adapters 2.75W 5V 0.55A USB Charger AUS Wht
1
Micro USB Cable
USB Cables / IEEE 1394 Cables 3FT STRONG MCROUSB-B/USBACBL
1
Description

 

 

 

 

Distracted driving is the number one cause of accidents, the cause of these distractions may include drowsiness, using cell phone, intoxications due to cigarette or alcohol, etc. The proposed project aims at monitoring the attentiveness of the driver and alerting the driver when his/her alertness goes below a certain threshold. It uses image processing using OpenCV and yolo algorithm to detect the eyes and object respectively and sounds an alarm when the driver is either drowsy or using his cell phone or smoking a cigarette.

We built a device that detects drowsiness and alerts the driver if drowsiness is detected. Device which we built is portable and can be implemented in any vehicle. This device will capture out continuous real time images of the driver and check for drowsiness. Image processing is accomplished using a raspberry pi processor and open CV. Cell phone and cigarette detection is achieved by using YOLO algorithm. The video is acquired through the USB camera and fed into two algorithms. The first algorithm is used to determine the driver drowsiness. The second algorithm determines whether the driver is using a cell phone or smoking a cigarette while driving.

The first algorithm localizes the face and detects the key facial structure of it. The facial detection is done through OpenCV and NumPy. The face is continuously captured using the USB camera. The landmark indices of both eye area are highlighted in the frame. The open or closed state of eye is determined using the distance between upper eye lid and lower eye lid.

If the distance between upper eye lid and lower eye lid is less than a threshold value a timer is initiated up to three seconds after which the alarm is turned on to alert the driver of drowsy behavior.

The second algorithm is used to determine the usage of cell phone or a cigarette. The image acquired from the USB cam is given to yolo algorithm where it is converted it into a grid image that will give the feature of the object. Then using the OpenCV the input image data points are read and given to specified image in a NumPy array. As a result, image with a rectangular box is obtained using yolo and COCO data sets. If the object determined is a cell phone or a cigarette warning will be issued to driver through alarms.

 

Codes

Downloads

schematic Download
Guide / Mentor

Institute / Organization

Sahyadri College, Adyar, Mangalore
Comments
Ad