Drowsy Driver Detection System using OpenCV
Table of contents :
- What is Drowsy Driver Detection System?
- How it works?
- Tools requirement to build this system
- Results
- Contact Me
1. What is Drowsy Driver Detection System?
Drowsy driver detection is a system that is part of the vehicle safety sector. It basically analyses the driver’s tiredness level based on his or her eye aspect ratio and alerts the driver accordingly. This system can also detect the driver sleeping off. As a result, the system will assist the driver in avoiding road accidents.
2. How it works?
To handle with real-time captures, this system primarily employs the OpenCV library. It detects face landmarks and eyes using dlib and haar-cascade, respectively. The technology will divide the driver’s drowsiness level into three categories based on the eye aspect ratio: Fresh, Drowsy, and Sleepy. In the event that the driver starts dozing at the wheel, it will be classified into three categories: Straight, Right Tilt, and Left Tilt. The level of alertness varies depending on how fatigued user is. There will be no alert for a fresh driver, a moderate alert for a drowsy driver to be aware of his tiredness, and a high degree of alert for a sleepy driver to be awake of his drowsiness.
3. Tools requirement to build this system
- Pycharm IDE
- Libraries : OpenCV, Math, Numpy, Playsound, Haar-cascade, Dlib
- Python programmming language
4. Results
Flow-chart :
Case-1 : Driver is Fresh
If eye aspect ratio of the driver is above 0.30, the drowsiness status is ‘Fresh’. As a result there won’t be any alert and tiredness level will be low.
Case-2 : Driver is Drowsy
If eye aspect ratio of the driver is in between of 0.22 to 0.30, the drowsiness status is ‘Drowsy’. As a result there will be a mild alert and tiredness level will be medium.
Case-3 : Driver is Sleepy
If eye aspect ratio of the driver is below 0.22, the drowsiness status is ‘Sleepy’. As a result there will be a high intensity alert and tiredness level will also be high.
Case-4 : Driver is dozing toward Right
If the face of the driver is tilted toward right, then tilt angle would be positive (>=+15 deg.) and we will asume that driver is dozing and mild alert would be provided.
Case-5 : Driver is dozing toward Left
If the face of the driver is tilted toward left, then tilt angle would be negative (<=-15 deg.) and we will asume that driver is dozing and mild alert would be provided.
Using the eye aspect ratio and facial tilt angle, the device is able to detect the driver’s tiredness. This system can still be improved by incorporating more aspects such as eye blink ratio, yawn detection, and so on.