Skip to main content
Log in

2D-wavelet encoded deep CNN for image-based ECG classification

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

Abstract

Cardiovascular is nowadays a common and threatening disease for humans. Computer-aided diagnostic (CAD) can diagnose cardiovascular by finding anomalies in an electrocardiogram (ECG). However, this conventional diagnostic approach is inefficient and needs extensive analysis and medical knowledge to diagnose accurately. Deep learning can help in the timely detection of anomalies. ECG being a multi-tone signal, CNN-based temporal features are not sufficient for classification. A classification can be improved by integrating multi-spectral information with temporal features. Furthermore, the one-dimension (1D) ECG signal needs complex preprocessing, including signal cleaning and RR peak detection, whereas deep CNN is more efficient for 2D signals. This paper proposes an automated CAD system for ECG classification using a 2D deep-convolution network (CNN). The proposed CNN uses multi-spectral information by integrating wavelet-based spectral features with CNN’s temporal features. The 1D ECG is reshaped to a 2D image, and a wavelet-encoded 2D CNN is proposed to classify these 2D images into four classes. The proposed model is evaluated using MIT-BIH datasets containing two-channel ambulatory ECG signals. A comparative study of both 1D and 2D approaches using deep CNN is presented in the paper initially. Later, the proposed network is validated by evaluating various quantitative parameters using the MIT-BIH dataset, and a comparative analysis is shown. The proposed CNN outperformed other models achieving the highest accuracy of 99.52% and 95.64% F1 score. The study reveals that the proposed model avoids the complex preprocessing of the ECG signals of cleaning, RR point detection, and waveform cropping. Further integration of wavelet-based multi-spectral features in CNN has improved the classification accuracy.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Data Availability

The datasets analysed during the current study are available at https://physionet.org/content/mitdb/1.0.0/and included in published article [32]

References

  1. Acharya UR, Fujita H, Adam M, Lih OS, Hong TJ, Sudarshan VK, et al. (2016) Automated characterization of arrhythmias using nonlinear features from tachycardia ECG beats. In: 2016 IEEE international conference on systems, man, and cybernetics (SMC). IEEE, pp 000533–000538

  2. Acharya UR, Fujita H, Oh SL, Hagiwara Y, Tan JH, Adam M (2017) Application of deep convolutional neural network for automated detection of myocardial infarction using ECG signals. Inf Sci 415:190–198

    Article  Google Scholar 

  3. Acharya UR, Oh SL, Hagiwara Y, Tan JH, Adam M, Gertych A, et al. (2017) A deep convolutional neural network model to classify heartbeats. Comput Biol Med 89:389–396

    Article  Google Scholar 

  4. Afkhami RG, Azarnia G, Tinati MA (2016) Cardiac arrhythmia classification using statistical and mixture modeling features of ECG signals. Pattern Recogn Lett 70:45–51

    Article  Google Scholar 

  5. Ahmad Z, Tabassum A, Guan L, Khan NMECG (2021) Heartbeat classification using multimodal fusion. IEEE Access 9:100615–100626

    Article  Google Scholar 

  6. Alfaras M, Soriano MC, Ortín S (2019) A fast machine learning model for ECG-based heartbeat classification and arrhythmia detection. Frontiers in Physics 7:103

    Article  Google Scholar 

  7. Avanzato R, Beritelli F (2020) Automatic ECG diagnosis using convolutional neural network. Electronics 9(6):951

    Article  Google Scholar 

  8. Celin S, Vasanth K (2018) ECG Signal classification using various machine learning techniques. J Med Syst 42(12):1–11

    Article  Google Scholar 

  9. Curtin AE, Burns KV, Bank AJ, Netoff TI (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:1–11

    Article  Google Scholar 

  10. Desai MM, Mewada HK (2021) Review on human pose estimation and human body joints localization. International Journal of Computing and Digital Systems 10

  11. Du N, Cao Q, Yu L, Liu N, Zhong E, Liu Z, et al. (2021) FM-ECG: a fine-grained multi-label framework for ECG image classification. Inf Sci 549:164–177

    Article  MathSciNet  Google Scholar 

  12. Ebrahimi Z, Loni M, Daneshtalab M, Gharehbaghi A (2020) A review on deep learning methods for ECG arrhythmia classification. Expert Systems with Applications X 7:100033

    Article  Google Scholar 

  13. Elhaj FA, Salim N, Harris AR, Swee TT, Ahmed T (2016) Arrhythmia recognition and classification using combined linear and nonlinear features of ECG signals. Comput Methods Programs Biomed 127:52–63

    Article  Google Scholar 

  14. Hannun AY, Rajpurkar P, Haghpanahi M, Tison GH, Bourn C, Turakhia MP, et al. (2019) Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nat Med 25(1):65–69

    Article  Google Scholar 

  15. Inan OT, Giovangrandi L, Kovacs GT (2006) Robust neural-network-based classification of premature ventricular contractions using wavelet transform and timing interval features. IEEE transactions on Biomedical Engineering 53 (12):2507–2515

    Article  Google Scholar 

  16. Ji Y, Zhang S, Xiao W (2019) Electrocardiogram classification based on faster regions with convolutional neural network. Sensors 19(11):2558

    Article  Google Scholar 

  17. Jun TJ, Nguyen HM, Kang D, Kim D, Kim D, Kim YH (2018) ECG arrhythmia classification using a 2-D convolutional neural network. arXiv:180406812

  18. Kiranyaz S, Ince T, Gabbouj M (2015) Real-time patient-specific ECG classification by 1-D convolutional neural networks. IEEE Trans Biomed Eng 63(3):664–675

    Article  Google Scholar 

  19. Li T, Zhou M (2016) ECG Classification using wavelet packet entropy and random forests. Entropy 18(8):285

    Article  Google Scholar 

  20. Liao Y, Na RX, Rayside D (2014) Accurate ECG R-peak detection for telemedicine. In: IEEE Canada International humanitarian technology conference. IEEE, pp 1–5

  21. Liu P, Zhang H, Lian W, Zuo W (2019) Multi-level wavelet convolutional neural networks. IEEE Access 7:74973–74985

    Article  Google Scholar 

  22. Mahapatra S, Mohanta D, Mohanty P, kumar Nayak S, kumar Behari P (2016) A Neuro-fuzzy based model for analysis of an ECG signal using Wavelet Packet Tree. Procedia Computer Science 92:175–180

    Article  Google Scholar 

  23. Makimoto H, Höckmann M, Lin T, Glöckner D, Gerguri S, Clasen L et al (2020) Performance of a convolutional neural network derived from an ECG database in recognizing myocardial infarction. Sci Rep 10(1):1–9

    Article  Google Scholar 

  24. Martis RJ, Acharya UR, Min LC (2013) ECG beat classification using, PCA LDA, ICA and discrete wavelet transform. Biomed Signal Process Control 8(5):437–448

    Article  Google Scholar 

  25. Martis RJ, Acharya UR, Prasad H, Chua CK, Lim CM, Suri JS (2013) Application of higher order statistics for atrial arrhythmia classification. Biomed Signal Process Control 8(6):888–900

    Article  Google Scholar 

  26. Mathews SM, Kambhamettu C, Barner KE (2018) A novel application of deep learning for single-lead ECG classification. Comput Biol Med 99:53–62

    Article  Google Scholar 

  27. Mathunjwa BM, Lin YT, Lin CH, Abbod MF, Shieh JS (2021) ECG Arrhythmia classification by using a recurrence plot and convolutional neural network. Biomed Signal Process Control 64:102262

    Article  Google Scholar 

  28. Melgani F, Bazi Y (2008) Classification of electrocardiogram signals with support vector machines and particle swarm optimization. IEEE transactions on information technology in biomedicine 12(5):667–677

    Article  Google Scholar 

  29. Mewada H, Patel AV, Chaudhari J, Mahant K, Vala A (2020) Composite fuzzy-wavelet-based active contour for medical image segmentation. Engineering Computations

  30. Mewada HK, Patel AV, Chaudhari J, Mahant K, Vala A (2020) Wavelet features embedded convolutional neural network for multiscale ear recognition. J Electron Imaging 29(4):043029

    Article  Google Scholar 

  31. Mewada HK, Patel AV, Hassaballah M, Alkinani MH, Mahant K (2020) Spectral–Spatial Features integrated convolution neural network for breast cancer classification. Sensors 20(17):4747

    Article  Google Scholar 

  32. Moody G, Mark R (2001) The impact of the MIT-BIH Arrhythmia Database. Engineering in Medicine and Biology Magazine 20(3):45–50

    Article  Google Scholar 

  33. Naz M, Shah JH, Khan MA, Sharif M, Raza M, Damaševičius R (2021) From ECG signals to images: a transformation based approach for deep learning. PeerJ Computer Science 7:e386

    Article  Google Scholar 

  34. Patel H, Mewada H (2018) Analysis of machine learning based scene classification algorithms and quantitative evaluation. Int J Appl Eng Res 13(10):7811–7819

    Google Scholar 

  35. Rajpurkar P, Hannun AY, Haghpanahi M, Bourn C, Ng AY (2017) Cardiologist-level arrhythmia detection with convolutional neural networks. arXiv:170701836

  36. Sadhukhan D, Mitra M (2012) R-peak detection algorithm for ECG using double difference and RR interval processing. Procedia Technol 4:873–877

    Article  Google Scholar 

  37. Tanoh IC, Napoletano P (2021) A Novel 1-D CCANet for ECG Classification. Appl Sci 11(6):2758

    Article  Google Scholar 

  38. Venkatesan C, Karthigaikumar P, Paul A, Satheeskumaran S, Kumar R (2018) ECG Signal preprocessing and SVM classifier-based abnormality detection in remote healthcare applications. IEEE Access 6:9767–9773

    Article  Google Scholar 

  39. Wang T, Lu C, Sun Y, Yang M, Liu C, Ou C (2021) Automatic ECG classification using continuous wavelet transform and convolutional neural network. Entropy 23(1):119

    Article  Google Scholar 

  40. Wang S, Peng J, Ma J, Xu J (2016) Protein secondary structure prediction using deep convolutional neural fields. Sci Rep 6(1):1–11

    Google Scholar 

  41. Wang J, Qiao X, Liu C, Wang X, Liu Y, Yao L, et al. (2021) Automated ECG classification using a non-local convolutional block attention module. Comput Methods Programs Biomed 203:106006

    Article  Google Scholar 

  42. Wang G, Zhang C, Liu Y, Yang H, Fu D, Wang H, et al. (2019) A global and updatable ECG beat classification system based on recurrent neural networks and active learning. Inf Sci 501:523–542

    Article  MathSciNet  Google Scholar 

  43. Weimann K, Conrad TO (2021) Transfer learning for ECG classification. Sci Rep 11(1):1–12

    Article  Google Scholar 

  44. Williams T, Li R (2018) Wavelet pooling for convolutional neural networks. In: International conference on learning representations

  45. Wu Y, Yang F, Liu Y, Zha X, Yuan S (2018) A comparison of 1-D and 2-D deep convolutional neural networks in ECG classification. arXiv:181007088

  46. Yan Z, Zhou J, Wong WF (2021) Energy efficient ECG classification with spiking neural network. Biomed Signal Process Control 63:102170

    Article  Google Scholar 

  47. Zhang P, Cheng J, Zhao Y (2020) Classification of ECG signals based on LSTM and CNN. In: International conference on artificial intelligence and security. Springer, pp 278–289

  48. Zidelmal Z, Amirou A, Adnane M, Belouchrani A (2012) QRS Detection based on wavelet coefficients. Comput Methods Programs Biomed 107 (3):490–496

    Article  Google Scholar 

  49. Zihlmann M, Perekrestenko D, Tschannen M (2017) Convolutional recurrent neural networks for electrocardiogram classification. In: 2017 Computing in cardiology (cinc). IEEE, pp 1–4

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hiren Mewada.

Ethics declarations

Conflict of Interests

The author have no conflicts of interest to declare.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Mewada, H. 2D-wavelet encoded deep CNN for image-based ECG classification. Multimed Tools Appl 82, 20553–20569 (2023). https://doi.org/10.1007/s11042-022-14302-z

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-022-14302-z

Keywords

Navigation