Implementation of a Drowsiness Detection System in Four-Wheel Vehicle Drivers Using OpenCv - Ma’ajid, Farhan Riqi; Al-Khowarizmi (Electronic Integrated Computer Algorithm Journal, 2025)
Drowsiness while driving is one of the triggers of traffic accidents. This study proposes a non-invasive and economical computer vision-based real-time drowsiness detection system. The system combines Eye Aspect Ratio (EAR) to assess eye openness, Convolutional Neural Network (CNN) for open/closed eye classification, and MediaPipe FaceMesh for stable facial landmark extraction. The dataset is taken from Kaggle (Open and Closed classes, totaling 1,452 images) and processed through grayscale conversion, normalization, 64×64 pixel resizing, and augmentation. Drowsiness detection is triggered when EAR <0.25 and CNN classifies both eyes as closed for ±2 consecutive seconds; visual/audio alarms are automatically activated. Test results on 218 images show excellent performance with only 1 misclassification (≈99.5% accuracy), with no false alarms for the open eye class. The system is implemented as a Flask-based web application for easy cross-device access. These findings demonstrate an efficient visual approach that is feasible to be integrated as a driving safety feature.