CNN-GRU for Drowsiness Detection from Electrocardiogram Signal
DOI:
https://doi.org/10.21512/comtech.v16i2.12755Keywords:
Internet of Things, deep learning, ECG, drowsiness detection, edge computingAbstract
Drowsiness is a problem that needs to be addressed to improve road safety. To minimize this safety issue, driving-monitoring systems have been implemented in current car models, and electrocardiography (ECG) is one of the most commonly used driving monitoring techniques. ECG data are modeled using a deep neural network, including a Bidirectional Gated Recurrent Unit (Bi-GRU). However, the accuracy for classifying Wake-Sleep is under 80% and Wake-NREM-REM reaches less than 68%. To address this issue, ECG data from the MESA and SHHS datasets are modeled using a combination of a Convolutional Neural Network (CNN) and a Bi-GRU, referred to as CNN-GRU. This model incorporated Batch Normalization and RMSProp to achieve improved accuracy in classifying drivers' conditions. It operates in two computing sectors: cloud computing (Google Colaboratory, also known as Colab) and edge computing (utilizing an AMD Ryzen 5 4600H processor laptop). Those computing sectors focused on a case where no internet connectivity occurred to process the classification. Those classifications achieved accuracy rates of 82.88% and 81.78% for Wake-Sleep classification in cloud- and edge-computing, respectively. Additionally, it achieved 71.01% (Colab) and 68.85% (edge-computing) accuracy in Wake-NREM-REM classification. This result indicates that CNN-GRU achieved better performance, surpassing the previous Bi-GRU model, which only achieved 80.42% (Colab) and 76.2% (edge-computing) for Wake-Sleep, and 68.85% (Colab) and 66.43% for Wake-NREM-REM.
Plum Analytics
References
Albasrawi, R., Fadhil, F. F., & Ghazal, M. T. (2022). Driver drowsiness monitoring system based on facial Landmark detection with convolutional neural network for prediction. Bulletin of Electrical Engineering and Informatics, 11(5), 2637–2644. https://doi.org/10.11591/eei.v11i5.3966
Blaha, M. J., & DeFilippis, A. P. (2021). Multi-Ethnic Study of Atherosclerosis (MESA): JACC Focus Seminar 5/8. In Journal of the American College of Cardiology (Vol. 77, Issue 25, pp. 3195–3216). Elsevier Inc. https://doi.org/10.1016/j.jacc.2021.05.006
Brunner, C., & Hofer, F. (2023). SleepECG: a Python package for sleep staging based on heart rate. Journal of Open Source Software, 8(86), 5411. https://doi.org/10.21105/joss.05411
Carneiro, T., Da Nobrega, R. V. M., Nepomuceno, T., Bian, G. Bin, De Albuquerque, V. H. C., & Filho, P. P. R. (2018). Performance Analysis of Google Colaboratory as a Tool for Accelerating Deep Learning Applications. IEEE Access, 6, 61677–61685. https://doi.org/10.1109/ACCESS.2018.2874767
Chen, X., Wang, R., Zee, P., Lutsey, P. L., Javaheri, S., Alcántara, C., Jackson, C. L., Williams, M. A., & Redline, S. (2015). Racial/Ethnic Differences in Sleep Disturbances: The Multi-Ethnic Study of Atherosclerosis (MESA). Sleep, 38(6), 877–888. https://doi.org/10.5665/sleep.4732
Cho, K., van Merrienboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., & Bengio, Y. (2014). Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. http://arxiv.org/abs/1406.1078
Chollet, F. (2021). Deep Learning with Python, Second Edition (2nd ed.). Manning. http://ieeexplore.ieee.org/document/10280481
Choquette, J., Gandhi, W., Giroux, O., Stam, N., & Krashinsky, R. (2021). NVIDIA A100 Tensor Core GPU: Performance and Innovation. IEEE Micro, 41(2), 29–35. https://doi.org/10.1109/MM.2021.3061394
Curtin, A. E., Burns, K. V., Bank, A. J., & Netoff, T. I. (2018). QRS complex detection and measurement algorithms for multichannel ECGs in cardiac resynchronization therapy patients. IEEE Journal of Translational Engineering in Health and Medicine, 6. https://doi.org/10.1109/JTEHM.2018.2844195
Devi, G. R., Al-Tmimi, H. M., Ghadir, G. K., Sharma, S., Patnala, E., Bala, B. K., & Baker El-Ebiary, Y. A. (2024). COOT-Optimized Real-Time Drowsiness Detection using GRU and Enhanced Deep Belief Networks for Advanced Driver Safety. International Journal of Advanced Computer Science & Applications, 15(4).
Dhillon, A., & Verma, G. K. (2020). Convolutional neural network: a review of models, methodologies and applications to object detection. Progress in Artificial Intelligence, 9(2), 85–112. https://doi.org/10.1007/S13748-019-00203-0/METRICS
Dutt, M., Redhu, S., Goodwin, M., & Omlin, C. W. (2023). SleepXAI: An explainable deep learning approach for multi-class sleep stage identification. Applied Intelligence, 53(13), 16830–16843. https://doi.org/10.1007/s10489-022-04357-8
Efe, E., & Ozsen, S. (2023). CoSleepNet: Automated sleep staging using a hybrid CNN-LSTM network on imbalanced EEG-EOG datasets. Biomedical Signal Processing and Control, 80, 104299. https://doi.org/https://doi.org/10.1016/j.bspc.2022.104299
Ellis, C. A., Zhang, R., Carbajal, D. A., Miller, R. L., Calhoun, V. D., & Wang, M. D. (2021). Explainable Sleep Stage Classification with Multimodal Electrophysiology Time-series. https://doi.org/10.1101/2021.05.04.442658
Elshamy, R., Abu-Elnasr, O., Elhoseny, M., & Elmougy, S. (2023). Improving the efficiency of RMSProp optimizer by utilizing Nestrove in deep learning. Scientific Reports, 13(1). https://doi.org/10.1038/s41598-023-35663-x
Florez, R., Palomino-Quispe, F., Alvarez, A. B., Coaquira-Castillo, R. J., & Herrera-Levano, J. C. (2024). A Real-Time Embedded System for Driver Drowsiness Detection Based on Visual Analysis of the Eyes and Mouth Using Convolutional Neural Network and Mouth Aspect Ratio. Sensors, 24(19). https://doi.org/10.3390/s24196261
Guthikonda, P. S. R. (2023). IoT based Driver Drowsiness Detection and Alerting System using Haar Cascade and Eye Aspect Ratio Algorithms. In Integration of AI-Based Manufacturing and Industrial Engineering Systems with the Internet of Things (1st ed.). CRC Press.
Kirley, B., Robison, K., Goodwin, A., Harmon, K., O’Brien, N., West, A., Harrell, S., Thomas, L., & Brookshire, K. (2023). Countermeasures That Work: A Highway Safety Countermeasure Guide For State Highway Safety Offices 11th EDITION 2 0 2 3. https://rosap.ntl.bts.gov.
Korompili, G., Amfilochiou, A., Kokkalas, L., Mitilineos, S. A., Tatlas, N. A., Kouvaras, M., Kastanakis, E., Maniou, C., & Potirakis, S. M. (2021). PSG-Audio, a scored polysomnography dataset with simultaneous audio recordings for sleep apnea studies. Scientific Data, 8(1). https://doi.org/10.1038/s41597-021-00977-w
Maniatopoulos, A., & Mitianoudis, N. (2021). Learnable Leaky ReLU (LeLeLU): An Alternative Accuracy-Optimized Activation Function. Information (Switzerland), 12(12). https://doi.org/10.3390/info12120513
Mewada, H. (2023). 2D-wavelet encoded deep CNN for image-based ECG classification. Multimedia Tools and Applications, 82(13), 20553–20569. https://doi.org/10.1007/s11042-022-14302-z
Montesinos López, O. A., Montesinos López, A., & Crossa, J. (2022). Convolutional Neural Networks. In Multivariate Statistical Machine Learning Methods for Genomic Prediction (pp. 533–577). Springer International Publishing. https://doi.org/10.1007/978-3-030-89010-0_13
Morokuma, S., Hayashi, T., Kanegae, M., Mizukami, Y., Asano, S., Kimura, I., Tateizumi, Y., Ueno, H., Ikeda, S., & Niizeki, K. (2023). Deep learning-based sleep stage classification with cardiorespiratory and body movement activities in individuals with suspected sleep disorders. Scientific Reports, 13(1). https://doi.org/10.1038/s41598-023-45020-7
Pei, W., Li, Y., Siuly, S., & Wen, P. (2022). A hybrid deep learning scheme for multi-channel sleep stage classification. Computers, Materials and Continua, 71(1), 889–905. https://doi.org/10.32604/cmc.2022.021830
Quan, S. F., Howard, B. V., Iber, C., Kiley, J. P., Nieto, F. J., O’Connor, G. T., Rapoport, D. M., Redline, S., Robbins, J., Samet, J. M., & Wahl, P. W. (1997). The Sleep Heart Health Study: Design, rationale, and methods. Sleep, 20(12), 1077–1085. https://doi.org/10.1093/sleep/20.12.1077
Shamrat, F. M. J. M., Majumder, A., Antu, P. R., Barmon, S. K., Nowrin, I., & Ranjan, R. (2022). Human Face Recognition Applying Haar Cascade Classifier. Lecture Notes in Networks and Systems, 317, 143–157. https://doi.org/10.1007/978-981-16-5640-8_12
Sulistiyono, M., Ariadi, M. V., Kharisma, R. S., & Saputro, U. A. (2024). Performance analysis of AMD Ryzen 5 4600 H mobile processor undervolting using AMD APU tuning utility on Cinebench R23. Journal of Soft Computing Exploration, 5(2), 133–144. https://doi.org/10.52465/joscex.v5i2.369
Sun, H., Ganglberger, W., Panneerselvam, E., Leone, M. J., Quadri, S. A., Goparaju, B., Tesh, R. A., Akeju, O., Thomas, R. J., & Westover, M. B. (2020). Sleep staging from electrocardiography and respiration with deep learning. Sleep, 43(7). https://doi.org/10.1093/SLEEP/ZSZ306
Tang, M., Zhang, Z., He, Z., Li, W., Mou, X., Du, L., Wang, P., Zhao, Z., Chen, X., Li, X., Chang, H., & Fang, Z. (2022). Deep adaptation network for subject-specific sleep stage classification based on a single-lead ECG. Biomedical Signal Processing and Control, 75, 103548. https://doi.org/https://doi.org/10.1016/j.bspc.2022.103548
Tezuka, T., Kumar, D., Singh, S., Koyanagi, I., Naoi, T., & Sakaguchi, M. (2021). Real-time, automatic, open-source sleep stage classification system using single EEG for mice. Scientific Reports, 11(1). https://doi.org/10.1038/s41598-021-90332-1
Tornede, T., Tornede, A., Fehring, L., Gehring, L., Graf, H., Hanselle, J., Mohr, F., & Wever, M. (2023). PyExperimenter: Easily distribute experiments and track results. Journal of Open Source Software, 8(84), 5149. https://doi.org/10.21105/joss.05149
Ullah, M. I., & Tamanna, S. (2023). Racial disparity in cardiovascular morbidity and mortality associated with obstructive sleep apnea: The sleep heart health study. Sleep Medicine, 101, 528–534. https://doi.org/https://doi.org/10.1016/j.sleep.2022.12.007
van Schagen, I. (2021). European Road Safety Observatory Road Safety Thematic Report-Fatigue. https://www.swov.nl/en/facts-figures/factsheet/fatigue0
Venkatesh, N. P., Arya, B., Dhananjay, B., & Sivaraman, J. (2022). The role of optimal and modified lead systems in electrocardiogram. In Advanced Methods in Biomedical Signal Processing and Analysis (pp. 311–340). Elsevier. https://doi.org/10.1016/B978-0-323-85955-4.00014-4
Wang, C., Chen, L., Zhou, B., Xian, Y., Zhao, Y., & Huan, Z. (2025). CILOSR: A unified framework for enhanced class incremental learning based open-set human activity recognition using wearable sensors. Expert Systems with Applications, 273, 126893. https://doi.org/https://doi.org/10.1016/j.eswa.2025.126893
Warrens, M. J. (2015). Five Ways to Look at Cohen’s Kappa. Journal of Psychology & Psychotherapy, 05(04). https://doi.org/10.4172/2161-0487.1000197
Zhang, J., Tang, Z., Gao, J., Lin, L., Liu, Z., Wu, H., Liu, F., & Yao, R. (2021). Automatic detection of obstructive sleep apnea events using a deep CNN-LSTM model. Computational Intelligence and Neuroscience, 2021. https://doi.org/10.1155/2021/5594733
Zulqarnain, M., Alsaedi, A. K. Z., Sheikh, R., Javid, I., Ahmad, M., & Ullah, U. (2024). An improved gated recurrent unit based on auto encoder for sentiment analysis. International Journal of Information Technology, 16(1), 587–599. https://doi.org/10.1007/s41870-023-01600-4
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Setiawan Hendratno, Nico Surantha

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:
a. Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License - Share Alike that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
b. 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 acknowledgment of its initial publication in this journal.
c. 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.
 USER RIGHTS
 All articles published Open Access will be immediately and permanently free for everyone to read and download. We are continuously working with our author communities to select the best choice of license options, currently being defined for this journal as follows: