Papers
Topics
Authors
Recent
2000 character limit reached

A Real-Time Driver Drowsiness Detection System Using MediaPipe and Eye Aspect Ratio (2511.13618v1)

Published 17 Nov 2025 in cs.CV

Abstract: One of the major causes of road accidents is driver fatigue that causes thousands of fatalities and injuries every year. This study shows development of a Driver Drowsiness Detection System meant to improve the safety of the road by alerting drivers who are showing signs of being drowsy. The system is based on a standard webcam that tracks the facial features of the driver with the main emphasis on the examination of eye movements that can be conducted with the help of the Eye Aspect Ratio (EAR) method. The Face Mesh by MediaPipe is a lightweight framework that can identify facial landmarks with high accuracy and efficiency, which is considered to be important in real time use. The system detects the moments of long eye shutdowns or a very low rate of blinking which are manifestations of drowsiness and alerts the driver through sound to get her attention back. This system achieves a high-performance and low-cost driver monitoring solution with the help of the computational power of OpenCV to process the image and the MediaPipe to identify faces. Test data experimental analyses indicate that the system is very accurate and responds quicker; this confirms that it can be a component of the current Advanced Driving Assistance System (ADAS).

Summary

  • The paper introduces a real-time drowsiness detection system using a standard webcam, achieving 92% accuracy through MediaPipe Face Mesh and EAR analysis.
  • It employs a lightweight, threshold-based methodology processing 20–25 FPS on typical CPU hardware, enabling alerting in under 1 second.
  • The study highlights challenges with low-light conditions, occlusions, and extreme head poses, suggesting future work with multi-modal sensing and edge integration.

Real-Time Driver Drowsiness Detection using MediaPipe and Eye Aspect Ratio

Problem Motivation and Context

Driver drowsiness is recognized as a pivotal contributor to vehicular accidents globally, with fatigue-induced impairment rivaling the risk profile of alcohol or narcotics. Early and accurate detection of drowsiness is essential within Advanced Driver Assistance Systems (ADAS), not only to safeguard the driver but also to enable effective transitions in semi-autonomous vehicles, especially during fallback scenarios in SAE Level 2/3 architectures. Most prior work leverages either physiological sensors (ECG, HRV) or compute-intensive deep learning models, each presenting considerable practical or economic barriers for broad deployment.

System Architecture and Implementation

This paper presents a real-time drowsiness detection system predicated on standard webcam input, with computation orchestrated via Python, OpenCV, and MediaPipe. By utilizing MediaPipe’s Face Mesh, the system identifies 468 facial landmarks, with a particular emphasis on periocular regions critical for Eye Aspect Ratio (EAR) calculations. The EAR is computed from the vertical and horizontal distances between specified ocular landmarks. When the EAR falls below an empirically set threshold (typically ∼\sim0.25) for a sustained period across consecutive frames, a drowsiness event is triggered and the driver is alerted audibly.

The pipeline design ensures frame-wise preprocessing (resizing, grayscale conversion) for computational efficiency, continuous facial landmark detection, and instantaneous feedback without the necessity for GPU-accelerated processing, enabling deployment on typical consumer hardware.

Experimental Results

Empirical evaluation demonstrates:

  • Detection accuracy of 92% for drowsiness events, specifically those induced by prolonged eye closure or infrequent blinking, using a group of 10 users subjected to simulated and natural drowsiness scenarios.
  • Response time of <<1 second for event detection and alerting, satisfying ADAS latency requirements.
  • False positive rate of 6% and false negative rate of 3%. Errors predominantly stem from partial facial occlusions (e.g., hand covers, spectacles), extreme head postures, or adverse lighting.
  • Sustained real-time frame rate of 20–25 FPS on mid-range CPU hardware without GPU acceleration, confirming the method’s suitability for widespread automotive integration.

Limitations

Several constraints impact overall reliability:

  • Lighting dependence: Robustness drops significantly in poor illumination, impacting facial landmark detection.
  • Spectacle interference: Reflective/dark-tinted glasses reduce MediaPipe’s eye localization performance, increasing occlusion-driven misclassifications.
  • Pose sensitivity: Extreme head orientations degrade landmark visibility, introducing undetected fatigue episodes.
  • Feature restriction: The current system exclusively monitors ocular features via EAR, ignoring other drowsiness correlates like yawning or head nodding, thus constraining the algorithm’s coverage of complex fatigue phenotypes.

Implications and Future Directions

The system advances the field by demonstrating high detection accuracy (92%) in real-time, circumventing the need for specialized sensors or high-throughput hardware. Its lightweight design invites direct integration into cost-sensitive vehicle platforms, including commercial fleets and consumer cars, as well as broader applications (e.g., public transit, elderly care, and insurance telematics).

Proposed future work includes:

  • Multi-modal fusion: Incorporating yawning, nodding, and posture data via expanded landmark sets or deep neural architectures (e.g., CNNs/RNNs), moving beyond fixed thresholding.
  • Sensor augmentation: IR and thermal imaging for enhanced performance in dim environments.
  • Adaptive preprocessing: Real-time brightness/contrast normalization for resilience against lighting variation.
  • Edge deployment: Integration with vehicle ECUs or edge platforms (Jetson Nano, Raspberry Pi) to synchronize with braking or steering interventions.
  • Cloud connectivity: IoT protocols for centralized fleet monitoring and behavioral analytics.

Conclusion

This driver drowsiness detection system leverages MediaPipe Face Mesh and Eye Aspect Ratio analysis to deliver rapid, resource-efficient drowsiness alerts with high accuracy on conventional hardware. While challenges remain regarding occlusion, lighting, and feature completeness, the framework lays a robust foundation for ADAS and broader vehicular safety applications. Anticipated future enhancements leveraging multi-modal detection and edge/cloud integration will further accelerate adoption in automotive and safety-critical domains.

Whiteboard

Open Problems

We found no open problems mentioned in this paper.

Collections

Sign up for free to add this paper to one or more collections.