Real-Time Drowsiness Detection using Eye Aspect Ratio and Flask Framework
Akshata B B
Paper Contents
Abstract
AbstractDriver drowsiness is a major cause of road accidents worldwide. This paper proposes areal-time, non-intrusive system that detects drowsiness based on the Eye Aspect Ratio(EAR). Using OpenCV, MediaPipe, and Flask, the system monitors eye states, calculatesEAR, and triggers visual and audio alerts when prolonged eye closure is detected.Experiments demonstrate over 90% accuracy in normal lighting with low latency, makingthe system practical for in-vehicle deployment.Driver drowsiness is one of the leading causes of road accidents worldwide, often resultingin serious injuries and fatalities. This paper proposes a real-time, non-intrusivemonitoring system for detecting driver fatigue based on the Eye Aspect Ratio (EAR). Astandard webcam records the drivers face, and facial landmarks are extracted usingcomputer vision techniques. The EAR is computed to quantify eye openness;when EAR remains below a threshold for a sustained duration, the system issues visual andauditory alerts. The framework is implemented with OpenCV, MediaPipe, and Flask,providing a browser-based interface that streams live video and alerts. Experimental resultsshow an accuracy of over 90% under normal lighting conditions with low latency (<200ms). The system is lightweight, cost-effective, and deployable on ordinary CPUs, makin
Copyright
Copyright © 2025 Akshata B . This is an open access article distributed under the Creative Commons Attribution License.