Real-Time Driver Drowsiness Detection System Using OpenCV, Facial Landmark Tracking, and Machine Learning
DOI:
Keywords:
Drowsiness detection, OpenCV, Machine Learning, Eye Aspect Ratio (EAR), Driver fatigue, Convolutional Neural Network (CNN), dlib 68-landmarks, Road safety.
Abstract
Driver drowsiness is a critical contributor to global traffic accidents, necessitating the development of non-
intrusive, real-time monitoring solutions to ensure road safety. This paper presents a cost-effective, real-time drowsiness
detection system that leverages computer vision and machine learning algorithms to continuously monitor a driver's facial
features and mitigate fatigue-related hazards. Utilizing a standard 720p dashboard webcam, the system captures live video
feeds and maps 68 facial landmarks using dlib and OpenCV. The core detection mechanism relies on computing the Eye
Aspect Ratio (EAR) across consecutive frames to track eye closure duration. For enhanced verification and robustness, a
TensorFlow-based Convolutional Neural Network (CNN) is integrated alongside MediaPipe Face Mesh. Additionally, a
localized Flask web application provides a real-time analytics dashboard built with HTML, JavaScript, and Tailwind CSS
to track telemetry and driver alertness statistics. Experimental validation confirms that the system accurately differentiates
between physiological micro-blinks and sustained fatigue closures, successfully triggering an audible emergency alert
within 2.0 seconds of drowsiness onset. The framework demonstrates high resilience across challenging environmental
conditions, including low-light illumination and subjects wearing corrective spectacles, delivering a dependable, lightweight
edge-safety solution.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.


