Rancang Bangun Deteksi Dini Kantuk Berbasis Eye Aspect Ratio dan API menggunakan Python
DOI:
https://doi.org/10.56127/jts.v5i2.2752Keywords:
Drowsiness Detection, Eye Aspect Ratio (EAR), Telegram Bot API, Modular System, Python, Office Productivity, Computer VisionAbstract
Drowsiness during work can reduce productivity and increase the risk of errors, particularly in monotonous office jobs that rely heavily on screen-based activities. This study aims to design and develop a modular computer vision-based drowsiness detection system capable of detecting drowsiness conditions in real-time and providing automatic notifications to users. The system detects drowsiness conditions using the Eye Aspect Ratio (EAR) method through an internal laptop or PC camera. The implementation was carried out using the Python programming language with the OpenCV library for image processing and Dlib for facial landmark detection. Users are provided with a graphical user interface (GUI) application developed using Tkinter. The system automatically sends warning messages through the Telegram Bot API when the EAR value is detected below the threshold of 0.21 for more than 3 seconds. Notifications can be delivered automatically to both the user’s and supervisor’s Telegram accounts. The testing results indicate that the system is capable of operating in real-time with fast response times and stable notification delivery through Telegram. Warning messages are delivered concisely so as not to disrupt the user’s workflow. Based on these findings, the developed drowsiness detection system has the potential to be utilized as a supporting tool to improve alertness and prevent productivity decline among office workers.
References
Albadawi, Y., & Alredhaei, A. (2023). Real-Time Machine Learning-Based Driver Drowsiness Detection Using Visual Features.
Dewanti, N. P., Jingga, N. A., & Wahyudiono, Y. D. A. (2022). The Relationship between Work Shifts and Work Environment with Nurse Fatigue in the Emergency Department. Indonesian Journal of Occupational Safety and Health, 11(2), 178–186. https://doi.org/10.20473/ijosh.v11i2.2022.178-186
King, D. E. (2009). Dlib-ml: A machine learning toolkit. Journal of Machine Learning Research, 10, 1755–1758.
Soukupova, T., & Cech, J. (2016). Real-Time Eye Blink Detection using Facial Landmarks. Center for Machine Perception, Department of Cybernetics Faculty of Electrical Engineering, Czech Technical University in Prague, 1–8.
Swanson, L. M., Arnedt, J. T., Rosekind, M. R., Belenky, G., Balkin, T. J., & Drake, C. (2011). Sleep disorders and work performance: Findings from the 2008 National Sleep Foundation Sleep in America poll. Journal of Sleep Research, 20(3), 487–494. https://doi.org/10.1111/j.1365-2869.2010.00890.x
Szeliski, R. (2011). Introduction. 1–25. https://doi.org/10.1007/978-1-84882-935-0_1
Yuen, S. C. K., Zakaria, N. H. B., Su, G. E., Hassan, R., Kasim, S., & Sutikno, T. (2024). Real-time smart driver sleepiness detection by eye aspect















