Development of a Real-time Driver’s Drowsiness Detection System Using MediaPipe Face Mesh

PDF (926KB), PP.46-57

Views: 0 Downloads: 0

Author(s)

Saikat Baul 1,* Md. Ratan Rana 1 Nusrat Jahan Trisna 1 Farzana Bente Alam 1

1. Department of Computer Science, American International University-Bangladesh (AIUB), Dhaka, 1229, Bangladesh

* Corresponding author.

DOI: https://doi.org/10.5815/ijem.2025.05.04

Received: 17 May 2025 / Revised: 19 Jun. 2025 / Accepted: 26 Jul. 2025 / Published: 8 Oct. 2025

Index Terms

Drowsiness Detection, Computer Vision, MediaPipe Face Mesh, OpenCV, EAR, MAR, Head Tilt Angle

Abstract

Recently, accidents caused by drowsy driving have emerged as a significant concern for society, often resulting in severe consequences for victims, including fatalities. Lives are the most valuable asset in the world and deserve greater safety on the road. Given the urgency, it is essential to develop an effective drowsiness detection system that can identify drowsiness in drivers and take necessary steps to alert them before any unfortunate incident occurs. Dlib and MediaPipe Face Mesh have shown promising results. However, most previous studies have relied solely on blinking patterns to detect drowsiness, while some have combined blinking with yawning patterns. The proposed research focuses on creating a straightforward drowsy driver detection system using Python, incorporating OpenCV and MediaPipe Face Mesh. The shape detector provided by MediaPipe Face Mesh assists in finding critical facial coordinates, allowing for the calculation of the driver's eye aspect ratio, mouth aspect ratio, and head tilt angle from video input. The system's performance evaluation utilizes standardized public datasets and real-time video footage. Notably, in both scenarios, the system exhibited remarkable recognition accuracy. A performance comparison was undertaken, demonstrating the proposed method's effectiveness. The proposed system has the potential to enhance travel safety and efficiency when integrated with vehicles' supplementary safety features and automation technology.

Cite This Paper

Saikat Baul, Md. Ratan Rana, Nusrat Jahan Trisna, Farzana Bente Alam, "Development of a Real-time Driver’s Drowsiness Detection System Using MediaPipe Face Mesh", International Journal of Engineering and Manufacturing (IJEM), Vol.15, No.5, pp. 46-57, 2025. DOI:10.5815/ijem.2025.05.04

Reference

[1]Sankaran, K. S., Vasudevan, N., & Nagarajan, V. (2020, July). Driver drowsiness detection using percentage eye closure method. In 2020 International Conference on Communication and Signal Processing (ICCSP) (pp. 1422-1425). IEEE.
[2]Talukder, M. M. A., Islam, M. S., Ahmed, I., & Raihan, M. A. (2013). Causes of Truck and Cargo Drivers’ Fatigue in Bangladesh. Jurnal Teknologi (Sciences & Engineering), 65(3).
[3]Tribune Desk. (2023, March 20). Madaripur crash: Exhaustion from driving 33 hours led to accident. Dhaka Tribune. Retrieved June 5, 2025, Available at: https://www.dhakatribune.com/bangladesh/nation/307177/madaripur-crash-exhaustion-from-driving-33-hours
[4]Martin, L. M. (2023, January 1). Drivers are falling asleep behind the wheel. National Safety Council. Retrieved June 5, 2025, Available at: https://www.nsc.org/road/safety-topics/fatigued-driver
[5]Baul, S., Rana, M. R., & Alam, F. (2024). A Real-time Light-weight Computer Vision Application for Driver's Drowsiness Detection. International Journal of Engineering and Manufacturing, 14(2), 23-33.
[6]TBS Report. (2024, October 16). Road accidents claim over 35,000 lives in 5.5 years: Road Safety Foundation, The Business Standard. Retrieved June 5, 2025, Available at: https://www.tbsnews.net/bangladesh/road-accidents-claim-over-35000-lives-55-years-road-safety-foundation-968206
[7]TBS Report. (2024, January 8). Road accidents cost Bangladesh over Tk21,000cr in 2024: Report, The Business Standard. Retrieved June 5, 2025, Available at: https://www.tbsnews.net/bangladesh/road-accidents-cost-bangladesh-over-tk21880cr-2024-road-safety-foundation-1037621
[8]Mohanty, S., Hegde, S. V., Prasad, S., & Manikandan, J. (2019, November). Design of real-time drowsiness detection system using dlib. In 2019 IEEE International WIE Conference on Electrical and Computer Engineering (WIECON-ECE) (pp. 1-4). IEEE.
[9]Rana, M. R., & Baul, S. (2024). An Overview of Operating Systems Based on Microkernel Technology and their Essential Components. International Journal of Information Engineering and Electronic Business, 16(6), 18-28.
[10]Ahamed, J., Baul, S., Ali, M., & Nandi, D. (2024, December). The Effective AI Mechanisms for Breast Cancer Classification and Prediction. In 7th IEOM Bangladesh International Conference on Industrial Engineering and Operations Management, https://doi.org/10.46254/BA07.20240063.
[11]Trisna, N., Baul, S., Joy, R., & Hasan, K. (2024, December). Advancements in Lung Cancer Detection: Harnessing Machine Learning for Early Diagnosis and Precision Medicine. In 7th IEOM Bangladesh International Conference on Industrial Engineering and Operations Management, https://doi.org/10.46254/BA07.20240196
[12]Dalve, S., Ramdasi, I., Kothawade, G., Khadke, Y., & Wete, M. (2023). Real Time Prevention of Driver Fatigue Using Deep Learning and MediaPipe. International Journal of Innovative Research in Computer Science & Technology (IJIRCST) Volume-11, Issue-3.
[13]Rasyid, M. F., Rizal, M., Musu, W., & Hadis, M. S. (2023). A machine learning approach to eye blink detection in low-light videos. Jurnal Teknik Informatika (Jutif), 4(3), 619-626.
[14]Akrout, B., & Fakhfakh, S. (2023). How to prevent drivers before their sleepiness using deep learning-based approach. Electronics, 12(4), 965.
[15]Florez, R., Palomino-Quispe, F., Coaquira-Castillo, R. J., Herrera-Levano, J. C., Paixão, T., & Alvarez, A. B. (2023). A cnn-based approach for driver drowsiness detection by real-time eye state identification. Applied Sciences, 13(13), 7849.
[16]Jewel, J. I., Hossain, M. M., & Haque, M. D. (2022, September). Design and Implementation of a Drowsiness Detection System Up to Extended Head Angle Using FaceMesh Machine Learning Solution. In International Conference on Machine Intelligence and Emerging Technologies (pp. 79-90). Cham: Springer Nature Switzerland.
[17]Abbas, S. A. D., Tiang, S. S., Lim, W. H., Chow, L. S., & Wong, C. H. (2023). Driver’s Fatigue Recognition Using Convolutional Neural Network Approach.
[18]Jose, J., Raimond, K., & Vincent, S. (2022). SleepyWheels: An Ensemble Model for Drowsiness Detection leading to Accident Prevention. arXiv preprint arXiv:2211.00718.
[19]Safarov, F., Akhmedov, F., Abdusalomov, A. B., Nasimov, R., & Cho, Y. I. (2023). Real-time deep learning-based drowsiness detection: leveraging computer-vision and eye-blink analyses for enhanced road safety. Sensors, 23(14), 6459.
[20]Sofi, T. A., & Mehfuz, S. (2023, May). Drowsiness and fatigue detection using multi-feature fusion. In 2023 International Conference on Recent Advances in Electrical, Electronics & Digital Healthcare Technologies (REEDCON) (pp. 672-675). IEEE.
[21]Jose, J., Vimali, J. S., Ajitha, P., Gowri, S., Sivasangari, A., & Jinila, B. (2021, June). Drowsiness detection system for drivers using image processing technique. In 2021 5th International Conference on Trends in Electronics and Informatics (ICOEI) (pp. 1527-1530). IEEE.
[22]Deng, W., & Wu, R. (2019). Real-time driver-drowsiness detection system using facial features. Ieee Access, 7, 118727-118738.
[23]Nizar, K. R. M. K., & Jabbar, M. H. (2023). Driver Drowsiness Detection with an Alarm System using a Webcam. Evolution in Electrical and Electronic Engineering, 4(1), 87-96.
[24]Abtahi, S., Omidyeganeh, M., Shirmohammadi, S., & Hariri, B. (2014, March). YawDD: A yawning detection dataset. In Proceedings of the 5th ACM multimedia systems conference (pp. 24-28).
[25]Savaş, B. K., & Becerikli, Y. (2018, October). Real time driver fatigue detection based on SVM algorithm. In 2018 6th International Conference on Control Engineering & Information Technology (CEIT) (pp. 1-4). IEEE.
[26]Sikander, G., Anwar, S., Husnain, G., Thinakaran, R., & Lim, S. (2023). An Adaptive Snake Based Shadow Segmentation for Robust Driver Fatigue Detection: A 3D Facial Feature based Photometric Stereo Perspective. IEEE Access, 11, 99178-99188.
[27]Husnain, G., Anwar, S., Shahzad, F., Sikander, G., Tariq, R., Bakhtyar, M., & Lim, S. (2022). An intelligent harris hawks optimization based cluster optimization scheme for vanets. Journal of Sensors, 2022(1), 6790082.