Haar cascade algorithm for microsleep detection

Awang, Norkhushaini and Azhar, Ahmad Mirza (2025) Haar cascade algorithm for microsleep detection. Malaysian Journal of Computing (MJoC), 10 (2): 2. pp. 2176-2187. ISSN 2600-8238

Identification Number (DOI): 10.24191/mjoc.v10i2.6845

Abstract

Drowsy driving, particularly due to microsleep episodes, is a significant cause of traffic accidents, with existing solutions being often too costly or limited for widespread adoption. This project addresses this critical gap by developing a cost-effective, real-time Internet of Things (IoT)-based anti-microsleep alarm system. The system's development followed a fourstage process: Planning, Design, Development, and Evaluation. During the development phase, the system was built in Python using OpenCV and dlib for real-time facial analysis and the Haar Cascade algorithm for efficient facial feature detection. Key metrics like the Eye Aspect Ratio (EAR) and lip distance were monitored to identify signs of drowsiness and yawning. A comprehensive feedback loop was implemented using MQTT for communication between the Python backend and a Node-RED dashboard, with eSpeak and the Slack API providing aural and textual alerts. A finding from the evaluation, however, was a sensitivity to environmental factors as the distance between the driver and the camera increased, the system's accuracy in detecting drowsiness, yawning, and microsleep declined, leading to an increased risk of false negatives. Based on these results, future research should focus on enhancing the core algorithm to be more resilient to variable lighting and distance, thereby reducing false positives and negatives. Further work is also recommended to explore the system's integration with vehicle-specific infrastructure, develop more scalable data storage solutions, and conduct extensive long-term testing to validate its performance in diverse real-world driving conditions, which will pave the way for its commercial viability and broader adoption.

Metadata

Item Type: Article
Creators:
Creators
Email / ID Num.
Awang, Norkhushaini
nor_awang@uitm.edu.my
Azhar, Ahmad Mirza
2021470424@student.uitm.edu.my
Subjects: Q Science > QA Mathematics > Real-time programming
T Technology > TE Highway engineering. Roads and pavements > Communication systems. Including intelligent transportation systems
Divisions: Universiti Teknologi MARA, Shah Alam > College of Computing, Informatics and Mathematics
Journal or Publication Title: Malaysian Journal of Computing (MJoC)
UiTM Journal Collections: UiTM Journals > Malaysian Journal of Computing (MJoC)
ISSN: 2600-8238
Volume: 10
Number: 2
Page Range: pp. 2176-2187
Keywords: Driver safety, Haar cascade algorithm, Internet of Things (IoT), Microsleep detection, Node-RED, Real-time monitoring
Date: October 2025
URI: https://ir.uitm.edu.my/id/eprint/125989
Edit Item
Edit Item

Download

[thumbnail of 125989.pdf] Text
125989.pdf

Download (941kB)

ID Number

125989

Indexing

Altmetric
PlumX
Dimensions

Statistic

Statistic details