Real-time driver drowsiness detection using transformer architectures: a novel deep learning approach

Hassan, Osama F.; Ibrahim, Ahmed F.; Gomaa, Ahmed; Makhlouf, M. A.; Hafiz, B. · 2025 · openalex

DOI: 10.1038/s41598-025-02111-x

archive: archived pipeline: cataloged verified

Get this paper ↗ (DOI — opens at the source; we link to it, we don't host it)

Summary

This paper addresses the critical safety issue of driver drowsiness, a leading cause of road accidents resulting in significant societal and economic losses. Motivated by the limitations of existing Convolutional Neural Network (CNN) models, which struggle with long-range spatial dependencies in facial features, the authors propose a novel deep learning framework leveraging transformer architectures for real-time drowsiness detection. The study aims to improve accuracy and robustness by capturing global context, such as subtle eyelid movements and holistic facial cues, which are often missed by localized CNN receptive fields. The methodology employs a comprehensive pipeline starting with data preprocessing, including image normalization, augmentation, and region-of-interest selection using Haar Cascade classifiers to isolate the driver’s eyes. The primary dataset used for training and evaluation is the MRL Eye Dataset, where eye states are classified into “Open-Eyes” and “Close-Eyes.” The authors evaluate a range of models, including Vision Transformer (ViT), Swin Transformer, and several fine-tuned transfer learning CNNs such as VGG19, DenseNet169, ResNet50V2, InceptionResNetV2, InceptionV3, and MobileNet. To ensure generalization, the models are further tested on the NTHU-DDD and CEW datasets, which provide diverse real-world scenarios. The system also incorporates Class Activation Mapping (CAM) to enhance interpretability by visualizing the regions influencing predictions. The results demonstrate that transformer-based models significantly outperform traditional CNNs. The ViT model achieved a groundbreaking accuracy of 99.15%, while the Swin Transformer reached 99.03%, surpassing the best CNN model (VGG19) which achieved 98.7% accuracy. These transformers also showed superior performance in precision, recall, and F1-score metrics. The study highlights that transformers are more robust to lighting variations and challenging conditions, such as drivers wearing glasses. The proposed system includes a real-time drowsiness scoring mechanism that triggers alarms upon detecting prolonged eye closure, ensuring timely intervention. The significance of this work lies in establishing a new benchmark for contactless, reliable driver drowsiness detection. By demonstrating the effectiveness of transformer architectures in capturing complex spatial dependencies, the research offers a robust solution for integration into Advanced Driver Assistance Systems (ADAS). The inclusion of CAM for model interpretability addresses transparency concerns critical for real-world deployment, while the high accuracy and adaptability to varying environmental conditions underscore the potential for widespread adoption to enhance road safety and prevent accidents.

Key finding

Vision Transformer and Swin Transformer architectures achieved accuracy rates of 99.15% and 99.03% respectively, significantly outperforming traditional convolutional neural networks in real-time driver drowsiness detection.

Methodology

lab_experiment

Provenance

The full processing record for this entry. Every stage of this paper's journey through the pipeline is logged — what ran, with which tool and model, how many attempts it took, and when it last completed. Discovered via scout_discovery on 2026-05-08.

StageOutcomeToolModelPromptAttemptsCompleted
discover partial scout 2 2026-05-08
archive success unpaywall 1 2026-06-04
extract success cached 3 2026-06-10
clean success clean 1 2026-06-04
chunk success chunk 1 2026-06-04
embed success embed Qwen/Qwen3-Embedding-8B 1 2026-06-04
enrich success semantic_scholar 2 2026-06-04
promote success 1 2026-06-04
summarize success llm qwen3.6-27b-prismaquant summ-v5 2 2026-06-10
tag success vector_similarity 15 2026-06-11
verify partial 2 2026-06-10

Summary generated by qwen3.6-27b-prismaquant on 2026-06-10; verification: verified_with_issues.

Topics

Ranked by relevance to this paper. Hover a topic for its definition.

Information type

What kind of knowledge this paper contributes, grouped by family — independent of topic (what it is about) and method (how it was studied).