A Smartphone-Based M-Health Monitoring System for Arrhythmia Diagnosis
Abstract
:1. Introduction
- We propose an ECG denoising model based on cycle-GAN [11] to mitigate the impact of noise on arrhythmia diagnosis. The model employs a denoising autoencoder (DAE) structure as the generator, which enhances the noise reduction performance by adding analog noise to input signals. Experimental results have demonstrated that our approach outperforms the existing noise reduction methods.
- We devise an arrhythmia diagnosis model based on a time convolution network (TCN) to identify 34 common arrhythmia events [12] using eight-lead ECG signals. The model extracts effective healthcare features through two-dimensional convolution layers and parallel TCN modules and captures temporal information during long-term sequences. Experimental results have indicated that our approach surpasses existing arrhythmia diagnosis models in terms of recognition accuracy, model size, and operation speed.
2. Related Work
3. ECG Denoising Algorithm
4. Arrhythmia Detection
5. Evaluation
- A.
- Methodology
- Alibaba Tianchi Dataset: This data set comes from the Engineering Research Centre of the Education Ministry of Mobile Health Management System, Hangzhou Normal University, and it contains a total of 40,000 real medical electrocardiogram samples, which are taken from patients of different age groups and genders.
- CPSC2020 Dataset [38]: This data set was collected from wearable ECG signal recording devices and contains ECG data from 10 patients with cardiovascular diseases, with each record lasting for about 24 h.
- B.
- Mobile Deployment
- Model format conversion: The network model trained in the Python 3.8.8 environment is generally in.pth format. However, the network model supported by Android is in the .pt format. Therefore, it is necessary to use the pytorch Library in the Python environment for model format conversion. First, read the trained model into memory, and then use the method in the package torch.util.mobile_optimizer to converse and save the model in the .pt format.
- Mobile deployment: Mobile terminal deployment refers to the deployment of the model to the Android terminal intelligent ECG monitoring system. First, create a new assets folder in the application directory and put the format converted model into this directory. The assets directory in Android project is specially used to save various external files. The application will not process the files in this directory when compiling but will package them into. Apk files, so it is more suitable for storing model files.
- Model loading and Application: Before applying the model, the file needs to be loaded from the assets directory into memory. Then, use the load method in the Module class of the pytorch_android library to read the model and save the loaded model as a Module-type object. Finally, call the forward() method of the model object to complete inference.
- C.
- Test of ECG Denoising Algorithm
- -
- The top-left position in Figure 10 represents the variation in the total loss.
- -
- The top-right position in Figure 10 shows the trends in cycle consistency loss and identity loss. In the early stages of model training, these losses rapidly decrease and gradually converge as the training progresses. Due to pre-training of the generator, the identity loss is initially smaller than the cycle consistency loss, but their trends are similar. Additionally, since these two losses have a significant impact on the total loss, the overall trend of the total loss aligns with them.
- -
- The bottom-left and bottom-right positions in Figure 10 represent the variations in generator and discriminator losses, respectively. Due to pre-training, the generator performs better than the discriminator in the initial stages, with lower loss values and faster reduction. During the model training process, both the generator and discriminator losses exhibit significant fluctuations, showing a fluctuating pattern. As the training progresses, the generator loss stabilizes around 0.3, while the discriminator loss stabilizes around 0.7.
- D.
- Test of System Performance
6. Conclusions
- -
- Conducting in-depth research on arrhythmia diagnosis algorithms: This involves incorporating information fusion methods to enhance the accuracy and reliability of the arrhythmia diagnosis.
- -
- Performing dynamic training and optimization of the arrhythmia diagnosis model: Continuously refining and updating the model through dynamic training to adapt to evolving conditions and improve overall performance.
- -
- Further expanding and optimizing the functionality of the system: Exploring additional features and functionalities to enhance the overall capabilities of the system, making it more comprehensive and user-friendly.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- World Heart Federation. World Heart Report 2023: Confronting the World’s Number One Killer; Report; World Heart Federation: Geneva, Switzerland, 2023. [Google Scholar]
- Wu, Z.; Zeng, L.; Zhong, Z.; Luo, T. Clinical Effect of Dynamic Electrocardiogram Application in Diagnosis of Arrhythmia in Patients with Coronary Heart Disease. J. Intell. Health 2023, 9, 10–14. [Google Scholar] [CrossRef]
- Liu, C.; Zhang, S.; Xie, G. Correlation between Heart Rate Variability of Dynamic Electrocardiogram and Prognosis after Percutaneous Coronary Intervention in Patients with Coronary Heart Disease. West China Med. J. 2023, 35, 1647–1651+1656. [Google Scholar]
- Wang, B. Study on the Relationship between 24-hour Dynamic Electrocardiogram and Malignant Arrhythmia Complicated with Acute Myocardial Infarction. Harbin Med. J. 2023, 43, 69–70. [Google Scholar]
- Yuan, C.; Liu, Z.; Wang, C.; Yang, F. Research on Classification of Electrocardiogram Signals Based on CNN-BiLSTM-Attention Neural Network. Computer and Digital Engineering. 2022, 50, 2478–2484. [Google Scholar]
- Li, F.; Wang, Z. Research on Abnormal Detection of Electrocardiogram Signals Based on RNN. J. Intell. Health 2018, 4, 5–8. [Google Scholar] [CrossRef]
- Serhani, M.A.; El Kassabi, T.; Ismail, H.; Nujum Navaz, A. ECG Monitoring Systems: Review, Architecture, Processes, and Key Challenges. Sensors 2020, 20, 1796. [Google Scholar] [CrossRef]
- Al Hemairy, M.; Serhani, M.; Amin, S.; Alahmad, M. A Comprehensive Framework for Elderly Healthcare Monitoring in Smart Environment. In Technology for Smart Futures; Springer: Berlin/Heidelberg, Germany, 2018; Volume 6, pp. 113–140. [Google Scholar]
- Mena, L.J.; Félix, V.G.; Ochoa, A.; Ostos, R.; González, E.; Aspuru, J.; Velarde, P.; Maestre, G.E. Mobile Personal Health Monitoring for Automated Classification of Electrocardiogram Signals in Elderly. Comput. Math. Methods Med. 2018, 2018, 9128054. [Google Scholar] [CrossRef] [PubMed]
- Morak, J.; Kumpusch, H.; Hayn, D.; Leitner, M.; Scherr, D.; Fruhwald, F.M.; Schreier, G. Near Field Communication-based telemonitoring with integrated ECG recordings. Appl. Clin. Inform. 2011, 2, 481–498. [Google Scholar]
- Zhu, J.Y.; Park, T.; Isola, P.; Efros, A.A. Unpaired Image-to-Image Translation Using Cycle-Consistent Adversarial Networks. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; IEEE: Venice, Italy, 2017; pp. 2223–2232. [Google Scholar]
- AHA/ASA. Heart Attack and Stroke Symptoms. Available online: https://www.heart.org/en/health-topics/arrhythmia/about-arrhythmia (accessed on 27 February 2024).
- Rahman, M.Z.U.; Shaik, R.A.; Reddy, D.V.R.K. Efficient and Simplified Adaptive Noise Cancelers for ECG Sensor Based Remote Health Monitoring. IEEE Sens. J. 2012, 12, 566–573. [Google Scholar] [CrossRef]
- Kabir, M.A.; Shahnaz, C. Denoising of ECG signals based on noise reduction algorithms in EMD and wavelet domains. Biomed. Signal Process. Control 2012, 7, 481–489. [Google Scholar] [CrossRef]
- Fu, L. Adaptive Noise Reduction Method for ECG Signals and Its Application Research. Master’s Thesis, Anhui University of Engineering, Anhui, China, 2020. [Google Scholar]
- Chen, J. Research on the Classification of ECG Signals Based on Machine Learning. Master’s Thesis, Xi’an University of Posts and Telecommunications, Xi’an, China, 2022. [Google Scholar]
- Wu, Y.; Xing, H.; Li, J.; Zhang, Y.; Duan, R. Improved wavelet denoising algorithm with modified threshold function. J. Electron. Meas. Instrum. 2022, 36, 9–16. [Google Scholar]
- Karnewar, J.S.; Sarode, M.V.; Karnewar, J.S. The combined effect of median and FIR filter in pre-processing of ECG signal using MATLAB. In Proceedings of the Foundation of Computer Science, Berkeley, CA, USA, 26–29 October 2013; pp. 30–33. [Google Scholar]
- Qian, W.; Zheng, W.; Xu, W.; Liu, J. Denoising algorithm for ECG signals using multilayer denoising autoencoder. Comput. Digit. Eng. 2021, 49, 1957–1962. [Google Scholar]
- Peng, X.; Wang, H.; Liu, M.; Lin, F.; Hou, Z.; Liu, X. A stacked contractive denoising auto-encoder for ECG signal denoising. Physiol. Meas. 2016, 37, 2214–2230. [Google Scholar]
- Romero, F.P.; Piñol, D.C.; Vázquez-Seisdedos, C.R. DeepFilter: An ECG baseline wander removal filter using deep learning techniques. Biomed. Signal Process. Control 2021, 70, 102992. [Google Scholar] [CrossRef]
- Singh, P.; Pradhan, G. A New ECG Denoising Framework Using Generative Adversarial Network. IEEE/ACM Trans. Comput. Biol. Bioinform. 2021, 18, 759–764. [Google Scholar] [CrossRef] [PubMed]
- Wang, X.; Chen, B.; Zeng, M.; Wang, Y.; Liu, H.; Liu, R.; Tian, L.; Lu, X. An ECG Signal Denoising Method Using Conditional Generative Adversarial Net. IEEE J. Biomed. Health Inform. 2022, 26, 2929–2940. [Google Scholar] [CrossRef] [PubMed]
- Kiranyaz, S.; Devecioglu, O.C.; Ince, T.; Malik, J.; Chowdhury, M.; Hamid, T.; Mazhar, R.; Khandakar, A.; Tahir, A.; Rahman, T.; et al. Blind ECG Restoration by Operational Cycle-GANs. IEEE Trans. Biomed. Eng. 2022, 69, 3572–3581. [Google Scholar] [CrossRef] [PubMed]
- Khazaee, A.; Ebrahimzadeh, A. Heart Arrhythmia Detection using Support Vector Machines. Intell. Autom. Soft Comput. 2013, 19, 1–9. [Google Scholar] [CrossRef]
- Park, J.; Lee, K.; Kang, K. Arrhythmia detection from heartbeat using k-nearest neighbor classifier. In Proceedings of the 2013 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), Shanghai, China, 18–21 December 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 15–22. [Google Scholar]
- Maglaveras, N.; Stamkopoulos, T.; Diamantaras, K.; Pappas, C.; Strintzis, M. ECG pattern recognition and classification using non-linear transformations and neural networks: A review. Int. J. Med. Inform. 1998, 52, 191–208. [Google Scholar] [CrossRef]
- Petmezas, G.; Haris, K.; Stefanopoulos, L.; Kilintzis, V.; Tzavelis, A.; Rogers, J.A.; Katsaggelos, A.K.; Maglaveras, N. Automated Atrial Fibrillation Detection using a Hybrid CNN-LSTM Network on Imbalanced ECG Datasets. Biomed. Signal Process. Control 2021, 63, 102194–102195. [Google Scholar] [CrossRef]
- Ingolfsson, T.M.; Wang, X.; Hersche, M.; Burrello, A.; Cavigelli, L.; Benini, L. ECG-TCN: Wearable Cardiac Arrhythmia Detection with a Temporal Convolutional Network. In Proceedings of the 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington, DC, USA, 6–9 June 2021; IEEE: New York, NY, USA, 2021; pp. 1–4. [Google Scholar]
- Bai, S.; Kolter, J.Z.; Koltun, V. An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. arXiv 2018, arXiv:1803.01271. [Google Scholar]
- Xiao, E. Research on Arrhythmia Diagnosis Algorithm Based on Multiscale Deep Learning Network. Ph.D. Thesis, Shantou University, Shantou, China, 2022. [Google Scholar]
- Cui, K. Design and Implementation of ECG Diagnosis Algorithm for Time Series. Ph.D. Thesis, University of Chinese Academy of Sciences (Shenyang Institute of Computing Technology, Chinese Academy of Sciences), Shenyang, China, 2022. [Google Scholar]
- Hu, L. Application of Deep Learning in ECG Signal Classification and Denoising. Ph.D. Thesis, Hunan University, Changsha, China, 2020. [Google Scholar]
- Xie, Y.; Qin, L.; Tan, H.; Li, X.; Liu, B.; Wang, H. Automatic 12-Leading Electrocardiogram Classification Network with Deformable Convolution. In Proceedings of the 2021 43rd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Mexico City, Mexico, 1–5 November 2021; pp. 882–885. [Google Scholar] [CrossRef]
- Zhang, D.; Yang, S.; Yuan, X.; Zhang, P. Interpretable deep learning for automatic diagnosis of 12-lead electrocardiogram. Iscience 2021, 24, 102373. [Google Scholar] [CrossRef] [PubMed]
- Vincent, P.; Larochelle, H.; Bengio, Y.; Manzagol, P.A. Extracting and Composing Robust Features with Denoising Autoencoders; ICML ’08; Association for Computing Machinery: Helsinki, Finland, 2008; pp. 1096–1103. [Google Scholar]
- Chen, J.; Chen, T.; Xiao, B.; Bi, X.; Wang, Y.; Duan, H.; Li, W.; Zhang, J.; Ma, X. SE-ECGNet: Multi-scale SE-Net for multi-lead ECG data. In Proceedings of the 2020 Computing in Cardiology, Rimini, Italy, 13–16 September 2020; IEEE: New York, NY, USA, 2020; pp. 1–4. [Google Scholar]
- Cai, Z.; Liu, C.; Gao, H.; Wang, X.; Zhao, L.; Shen, Q.; Ng, E.Y.K.; Li, J. An Open-Access Long-Term Wearable ECG Database for Premature Ventricular Contractions and Supraventricular Premature Beat Detection. J. Med. Imaging Health Inform. 2020, 10, 2663–2667. [Google Scholar] [CrossRef]
- Goodfellow, I.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative Adversarial Nets; NIPS’14; MIT Press: Montreal, QC, Canada, 2014; pp. 2672–2680. [Google Scholar]
- Kim, Y.; Lee, M.; Yoon, J.; Kim, Y.; Min, H.; Cho, H.; Park, J.; Shin, T. Predicting future incidences of cardiac arrhythmias using discrete heartbeats from normal sinus rhythm ECG signals via deep learning methods. Diagnostics 2023, 13, 2849. [Google Scholar] [CrossRef] [PubMed]
- Ismail, A.R.; Jovanovic, S.; Ramzan, N.; Rabah, H. ECG Classification Using an Optimal Temporal Convolutional Network for Remote Health Monitoring. Sensors 2023, 23, 1697. [Google Scholar] [CrossRef] [PubMed]
- Bian, Y.; Chen, J.; Chen, X.; Yang, X.; Chen, D.Z.; Wu, J. Identifying electrocardiogram abnormalities using a handcrafted-rule-enhanced neural network. IEEE/ACM Trans. Comput. Biol. Bioinform. 2022, 20, 2434–2444. [Google Scholar] [CrossRef] [PubMed]
- Liang, H.; Song, G.; Xu, C.; Deng, X.; Li, Y.; Dou, S.; Chen, D. Classification of Arrhythmia From ECG Signals Using CSL-Net. In Proceedings of the 2022 IEEE 6th Information Technology and Mechatronics Engineering Conference (ITOEC), Chongqing, China, 4–6 March 2022; IEEE: Piscataway, NJ, USA, 2022; Volume 6, pp. 1668–1673. [Google Scholar]
- Vallathan, G.; Sowjanya, M.; Laxmi, M.; Sreelatha, B. Automatic Detection of Irregular Contraction and Relaxation of Cardiac Muscle using Alexnet. In Proceedings of the 2023 International Conference on System, Computation, Automation andNetworking (ICSCAN), Puducherry, India, 17–18 November 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 1–6. [Google Scholar]
- Wong, J.; Nerbonne, J.; Zhang, Q. Ultra-Efficient Edge Cardiac Disease Detection towards Real-time Precision Health. IEEE Access 2023, 12, 9940–9951. [Google Scholar] [CrossRef]
- Brito, C.; Machado, A.; Sousa, A. Electrocardiogram Beat-Classification Based on a ResNet Network. Stud. Health Technol. Inform. 2019, 264, 55–59. [Google Scholar]
- Hannun, A.Y.; Rajpurkar, P.; Haghpanahi, M.; Tison, G.H.; Bourn, C.; Turakhia, M.P.; Ng, A.Y. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nat. Med. 2019, 25, 65–69. [Google Scholar] [CrossRef]
- Cai, J.; Sun, W.; Guan, J.; You, I. Multi-ECGNet for ECG Arrhythmia Multi-Label Classification. IEEE Access 2020, 8, 110848–110858. [Google Scholar] [CrossRef]
- Saadatnejad, S.; Oveisi, M.; Hashemi, M. LSTM-Based ECG Classification for Continuous Monitoring on Personal Wearable Devices. IEEE J. Biomed. Health Inform. 2020, 24, 515–523. [Google Scholar] [CrossRef] [PubMed]
- Zhu, F.; Ye, F.; Fu, Y.; Liu, Q.; Shen, B. Electrocardiogram generation with a bidirectional LSTM-CNN generative adversarial network. Sci. Rep. 2019, 9, 6734–6735. [Google Scholar] [CrossRef] [PubMed]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- Zhang, H.; Zhao, W.; Liu, S. SE-ECGNet: A Multi-scale Deep Residual Network with Squeeze-and-Excitation Module for ECG Signal Classification. In Proceedings of the 2020 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), Seoul, Republic of Korea, 16–19 December 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 2685–2691. [Google Scholar]
- Murugesan, B.; Ravichandran, V.; Ram, K.; Preejith, S.P.; Joseph, J.; Shankaranarayana, S.M.; Sivaprakasam, M. ECGNet: Deep Network for Arrhythmia Classification. In Proceedings of the 2018 IEEE International Symposium on Medical Measurements and Applications (MeMeA), Rome, Italy, 11–13 June 2018; IEEE: New York, NY, USA, 2018; pp. 1–6. [Google Scholar]
- Jing, E.; Zhang, H.; Li, Z.; Liu, Y.; Ji, Z.; Ganchev, I. ECG heartbeat classification based on an improved ResNet-18 model. Comput. Math. Methods Med. 2021, 2021, 6649970. [Google Scholar] [CrossRef] [PubMed]
SNR | MSE | |
---|---|---|
Before noise reduction | −9.197 | 0.559 |
Model in this article | 7.642 | 0.011 |
FIR filtering | 6.206 | 0.016 |
wavelet denoising | −8.789 | 0.509 |
DeepFilter | 3.521 | 0.029 |
GAN | 4.689 | 0.022 |
Model | Our Model | FIR | Wavelet | DeepFilter | GAN |
---|---|---|---|---|---|
Noise reduction time (ms) | 12.1 | 292.5 | 53.1 | 21.9 | 13.2 |
Model | TCN Structure | Convolution Kernel Size k | Expansion Factor D |
---|---|---|---|
Model_1 | single | 3 | 1, 2, 4 |
Model_2 | single | 5 | 1, 2, 4 |
Model_3 | single | 7 | 1, 2, 4 |
Model_4 | paralleling | 3, 5, 7 | 1, 2, 4 |
Model_5 | paralleling | 3, 5, 7 | 1, 4, 8 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Luo, J.; Zhang, M.; Li, H.; Tao, D.; Gao, R. A Smartphone-Based M-Health Monitoring System for Arrhythmia Diagnosis. Biosensors 2024, 14, 201. https://doi.org/10.3390/bios14040201
Luo J, Zhang M, Li H, Tao D, Gao R. A Smartphone-Based M-Health Monitoring System for Arrhythmia Diagnosis. Biosensors. 2024; 14(4):201. https://doi.org/10.3390/bios14040201
Chicago/Turabian StyleLuo, Jun, Mengru Zhang, Haohang Li, Dan Tao, and Ruipeng Gao. 2024. "A Smartphone-Based M-Health Monitoring System for Arrhythmia Diagnosis" Biosensors 14, no. 4: 201. https://doi.org/10.3390/bios14040201