Real-Time Drowsiness Detection Using Dual MobileNetV2 Models on Desktop and Edge Devices
Downloads
Drowsiness is a leading cause of human error in transportation and in shift-based occupational work, yet delivering reliable real-time detection on affordable, resource-constrained hardware remains difficult. This study aims to develop and evaluate a vision-based drowsiness detection system that behaves consistently across a full-power desktop and a low-cost edge device. The system couples two independent MobileNetV2 transfer-learning classifiers — one for eye state (Open/Closed) and one for mouth state (Yawn/No_yawn) — with a temporal decision engine that converts frame-level predictions into microsleep and excessive-yawning alerts. Both classifiers were trained on a merged multi-source dataset (8,548 training images) and evaluated with a class-balanced protocol (186 images/class for the eye branch and 448 images/class for the mouth branch) to remove test-set imbalance bias. The decision engine was realised as two platform-appropriate pipelines that share an offline-first, retry-capable event architecture: a duration-based, two-tier hysteresis alert on a desktop application (Haar-cascade detection, H5/float32 models) and a frame-count alert designed for a Raspberry Pi 5 edge board (MediaPipe detection, quantised TensorFlow Lite models). On the class-balanced test set the eye branch reached 95.16% (H5) / 95.97% (TFLite) accuracy and the mouth branch reached 96.65% for both formats, with above-99% cross-format prediction agreement. Converting to TFLite cut model size by 73.4% (8.99 to 2.39 MB) and single-frame model inference latency roughly thirteen-fold (about 25 to 1.9 ms, measured on the development machine). Real-time desktop sessions sustained 6.9–12.0 FPS, and the Haar detector located a face in only 15.8% of off-angle frames versus 96.9–98.6% of frontal frames. This single-session result offers a preliminary, rather than definitive, indication of the detector's pose sensitivity. A lightweight dual-MobileNetV2 design with platform-appropriate detectors shows promise for delivering consistent real-time drowsiness alerts across heterogeneous hardware tiers.
Copyright (c) 2026 Rafi'e (Author)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlikel 4.0 International (CC BY-SA 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).





