Drowsiness Detection

Project Summary:      Driver drowsiness is a major reason for fatal accidents of on-road vehicles. Developing an automated, real-time drowsiness detection system is important for providing accurate and timely alerts to the driver. As

2025-06-28 16:32:13 - Adil Khan

Project Title

Drowsiness Detection

Project Area of Specialization Artificial IntelligenceProject Summary

Project Summary:


     Driver drowsiness is a major reason for fatal accidents of on-road vehicles. Developing an automated, real-time drowsiness detection system is important for providing accurate and timely alerts to the driver. As the use of Artificial Intelligence is advancing technology rapidly and overcoming conventional technology, Drowsiness Detection systems need to be advanced too. They need to use the latest in the field of technology to be more useful. Conventional systems, whereby a device is attached to the ear, causes discomfort to the driver, especially on long journeys. It uses conventional technology, which is prone to malfunctioning, and needs to be upgraded. In the proposed system, python and Machine Learning is used to detect the driver’s drowsiness. A Video camera (Raspbian Camera) is used to track the facial image and the eye blinks of the driver. Raspbian Pi 3 (with the Raspbian Linux-based Operating System) will be used for this project. Suitable datasets and classifiers will be used to make the system efficient.  The proposed system works in three main phases: In the First phase, driver's face image and the eye blinks are identified and observed by using the Raspbian camera. In the Second phase, the image features of the eye are extracted by using the Euclidean algorithm. During the third phase, the eye blinks are continually monitored. The final stage decides whether the measure in eye square is in a closed state or open state. When a driver falls asleep, there will be a warning message to alert the driver for preventing road accidents. In addition to this, the functionality, whereby the state of the driver will be emailed to his or her closest contact, will also be included. A block diagram, summarizing the whole process, is shown below.

Drowsiness Detection _1639953414.jpeg

Figure: Block Diagram of overall System

    Scope:

        The “Drowsiness Detection System” could be used in car, buses, and any other vehicle during driving. By using this system, very useful datasets can be extracted for facial recognition. Advanced uses of different classifiers can also be studied by using this project. Thus, this project can be used to develop further research in the field of Data Science, Artificial Intelligence and Machine Learning.

    Major Deliverables:

           The major deliverable is the software, in Raspberry Pi 3, which will be able to detect drowsiness while driving any vehicle, along with an Android app (for configuring the different features of the software easily), as well. The hardware, based upon the Raspberry Pi 3, Raspbian Camera and a small electronic bell (alarm device) will also be delivered.

Project Objectives

Project Objective:

The project of “Drowsiness Detection System” is specifically designed for those individuals who get drowsy while driving the vehicle. Thousands of people are killed, or seriously injured due to drivers falling asleep at the wheels each year. Recent studies show that drivers’ drowsiness accounts for up to 20% of serious or fatal accidents on motorways. The main objective of the research work is to make sure that individuals stay awake and active when they are going in drowsiness due to long distance travel. As the use of Artificial Intelligence is advancing technology rapidly and overcoming conventional technology, Drowsiness Detection systems need to be advanced too. They need to use the latest in the field of technology to be more useful. In this project, the Raspbian Camera will be used to detect the eye angle and other features of the face of the driver in order to detect drowsiness. In order to address the said issue, the software will be designed using Python and machine learning algorithms. The operating system to be used is Raspbian 3 (Linux-based) Operating System. Along with keeping individuals awake and safe, this system can be used to extract very useful datasets of different features for facial recognition. The advanced uses of different classifiers, along with other elements of Machine Learning, can also be studied by using this project. Thus, this project can be used to develop further research in the field of Data Science, Artificial Intelligence and Machine Learning.

Project Implementation Method

Project implementation method:

The ardware (Raspberry Pi 3 & Raspbian Camera) along with the embedded software will be a part of this research project. Different data sets like the sleeping face expressions and eye blinks (angles of eye blinks etc.) will be used to train the machine learning model for efficient detection. Python, along with different machine learning libraries like sci-kit learn will be used. An example of how different features, from the facial recognition, will be extracted, is shown below. As you can see, a feature histogram will be formed from the different detected features. This Feature Histogram and any other relevant elements will play a role in training the machine learning model for detecting the drowsiness in the driver.

2021-01-31_04:17:06pm_image-20210131161707-5.jpeg

Figure: Binary Pattern

 The finalized Python script will be transferred to the Raspberry Pi 3. This SBC will be using Raspbian Operating System. An Android app will also be built for controlling and configuring the software and the hardware. The Raspbian Camera will detect the eye angle or any other included features on the driver’s face. The block diagram, below, shows a possible scenario of how the complete algorithm will work. By focusing the camera on the eyes of the driver, the eye angle or the Eye Aspect Ratio will be measured. If the Eye Aspect Ration falls below a certain threshold (decided according to the datasets, used for training), the alarm will sound and wake up the driver. An email will be sent to the closest contact (s) to notify them of their state so they may take any necessary actions to ensure that the driver stays safe.

Drowsiness Detection _1639953416.jpeg

Figure: Scheme of the proposed algorithm for eye-blink detection

Benefits of the Project

METHODOLOGY:

For this project, first of all, suitable datasets, of different features of facial recognition, will be selected. Eye Aspect Ratio (EAR), which relates to eye blinks and the associated measurements, will also be researched and studied. In Python, the relevant code will be written and the machine learning model will either be trained according to the selected datasets or EAR will be used. Classifiers or other relevant algorithms will be used. Other features like sending of an email, if drowsiness is detected, will be configured. An Android app will also be built for controlling and configuring the software. In the next phase, the Raspberry Pi 3 will be programmed. The Raspbian Camera and the alarm bell will be connected and tested. The Python script will either be run directly on it or the coding will be done directly in the Python environment, meant for Raspian (Linux-based) Operating System. The camera and the alarm will be interfaced to operate according to the code. The next phase will include extensive testing of the software and the hardware. Once the device is connected to a power source like a power bank, the device will start functioning. It will be made sure that the hardware can be packaged and installed easily inside a common vehicle. A block diagram, showing the main functioning, is displayed below.

Drowsiness Detection _1639953417.png

Benefits of the project:

The project could be used for benefiting the individuals who fear that they will fall asleep while driving. Thus, the main target is to save human lives and prevent accidents, which occur due to people falling asleep during driving. By using this system, very useful datasets can be extracted for facial recognition. Advanced uses of different classifiers can also be studied by using this project. Thus, this project can be used to develop further research in the field of Data Science, Artificial Intelligence and Machine Learning.

Technical Details of Final Deliverable

Technical details of final deliverables:

The final deliverables will include Raspberry Pi 3 (with Raspbian Linux-based OS), Raspbian Camera and an alarm bell. The Raspberry Pi 3 will have the software, meant for Drowsiness Detection, installed. Once it is connected to a power source like a power bank, the device will start functioning. An Android app will also be available, which will be used for configuring the software easily.

Final Deliverable of the Project HW/SW integrated systemCore Industry ITOther Industries Others Core Technology Artificial Intelligence(AI)Other Technologies OthersSustainable Development Goals Good Health and Well-Being for PeopleRequired Resources
Item Name Type No. of Units Per Unit Cost (in Rs) Total (in Rs)
Total in (Rs) 67970
Raspberry pi 3 (2GB RAM) Equipment2900018000
Raspberry pi 4 (4 GB) Equipment11300013000
Raspbian Camera (8MP) Equipment2750015000
Alarm Bell (DS1307 chip) Equipment135003500
Breadboard (830 Points) Equipment3200600
Veroboard (4 Equipment3100300
Small Printed Circuit boar(12 Equipment3190570
Soldering Iron Set (12pcs) Equipment170007000
Printer & Traveling Miscellaneous 11000010000

More Posts