Skip to main content
Log in

Data Augmentation for 12-Lead ECG Beat Classification

  • Original Research
  • Published:
SN Computer Science Aims and scope Submit manuscript

Abstract

This paper reports the performance study of classifying 12-lead ECG beat segments in the face of severe imbalance in the class sizes, which is typical of ECG data. The efficacy of data augmentation for class size balancing to improve the classification accuracy is well known. In the ECG domain, however, it has been overlooked or handled inadequately. We propose an amplitude-alteration approach to augment randomly selected ECG heartbeats separately as needed in individual ECG classes while not disrupting the timeline of the ECG signals. In addition, augmentations of training dataset and test dataset receive separate attentions, and four cases of data augmentation are considered depending on whether each dataset is augmented or not. The effects of the augmentation scheme was evaluated using ResNet, the deep learning technique reputed for its remarkable accuracy through unique skipping connections between layers; specifically, a time series version of ResNet was used. The results confirmed the key benefit of class-balancing the training dataset through the proposed data augmentation scheme and, additionally, showed some extra benefit of augmenting the test dataset through “test-time augmentation.” Further, we adopted the class activation map (CAM) to identify heat map signatures that would explain ECG beat classes. The results demonstrated that the CAM could be an effective visual aid to classifying ECG beats, especially with the proposed data augmentation scheme in place. In this paper the augmentation scheme, the associated experiments, and their results are discussed concretely.

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
Fig. 10
Fig. 11

Similar content being viewed by others

References

  1. da Luz EJS, Schwartz WR, Cámara-Chávez G, Menotti D. ECG-based heartbeat classification for arrhythmia detection: a survey. Comput Methods Programs Biomed. 2016;127:144–64.

    Article  Google Scholar 

  2. Chawla NV, Japkowicz N, Kotcz A. Special issue on learning from imbalanced data sets. ACM SIGKDD Explor Newsl. 2004;6(1):1–6.

    Article  Google Scholar 

  3. Hwang B, You J, Vaessen T, Myin-Germeys I, Park C, Zhang BT. Deep ECGnet: an optimal deep learning framework for monitoring mental stress using ultra short-term ECG signals. Telemed e-Health. 2018;24(10):753–72.

    Article  Google Scholar 

  4. Manogaran G, Shakeel PM, Fouad H, Nam Y, Baskar S, Chilamkurti N, Sundarasekar R. Wearable iot smart-log patch: an edge computing-based bayesian deep learning network system for multi access physical monitoring system. Sensors. 2019;19(13):3030.

    Article  Google Scholar 

  5. Trenta F, Conoci S, Rundo F, Battiato S. Advanced motion-tracking system with multi-layers deep learning framework for innovative car-driver drowsiness monitoring. In: Proceedings of the 14th IEEE international conference on automatic face gesture recognition (FG 2019). 2019; pp. 1–5.

  6. Jm Kwon, Cho Y, Jeon KH, Cho S, Kim KH, Baek SD, Jeung S, Park J, Oh BH. A deep learning algorithm to detect anaemia with ECGs: a retrospective, multicentre study. Lancet Digit Health. 2020;2(7):e358–67.

    Article  Google Scholar 

  7. Han C, Shi L. ML-ResNet: a novel network to detect and locate myocardial infarction using 12 leads ECG. Comput Methods Programs Biomed. 2020;185:105138.

    Article  Google Scholar 

  8. He R, Liu Y, Wang K, Zhao N, Yuan Y, Li Q, Zhang H. Automatic cardiac arrhythmia classification using combination of deep residual network and bidirectional LSTM. IEEE Access. 2019;7:102119–35.

    Article  Google Scholar 

  9. Tung H, Zheng C, Mao X, Qian D. Multi-lead ECG classification via an information-based attention convolutional neural network. CoRR. arXiv:2003.12009, 2020.

  10. Labati RD, Muñoz E, Piuri V, Sassi R, Scotti F. Deep-ECG: convolutional neural networks for ECG biometric recognition. Pattern Recognit Lett. 2019;126:78–85.

    Article  Google Scholar 

  11. Aurore L, Ana M, Pablo MJ, Pablo L, Blanca R. Computational techniques for ECG analysis and interpretation in light of their contribution to medical advances. J R Soc Interface. 2018;15(138):20170821.

  12. 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, 2016; pp. 770–778.

  13. Wang Z, Yan W, Oates T. Time series classification from scratch with deep neural networks: a strong baseline. In: Proceedings of the 2017 international joint conference on neural networks (IJCNN). 2017; pp. 1578–1585.

  14. Ismail Fawaz H, Forestier G, Weber J, Idoumghar L, Muller PA. Deep learning for time series classification: a review. Data Min Knowl Discov. 2019;33(4):917–63.

    Article  MathSciNet  Google Scholar 

  15. PhysioNet. PysioBank annotation. 2016. https://archive.physionet.org/physiobank/annotations.shtml. Accessed 6 Dec 2020.

  16. Alday EAP, Gu A, Shah A, Liu C, Sharma A, Seyedi S, Rad AB, Reyna M, Clifford G. Classification of 12-lead ECGs: the PhysioNet—computing in cardiology challenge 2020. 2020. https://physionet.org/content/challenge-2020/1.0.1/. Accessed 6 Dec 2020.

  17. Pan Q, Li X, Fang L. Data augmentation for deep learning-based ECG analysis. In: Liu C, Li J, editors. Feature engineering and computational intelligence in ECG monitoring. Singapore: Springer; 2020. p. 91–111.

    Chapter  Google Scholar 

  18. Cui Z, Chen W, Chen Y. Multi-scale convolutional neural networks for time series classification. arXiv preprint. 2016. arXiv:160306995.

  19. Um TT, Pfister F, Pichler D, Endo S, Lang M, Hirche S, Fietzek U, Kulić D. Data augmentation of wearable sensor data for Parkinson’s disease monitoring using convolutional neural networks. In: Proceedings of the 19th ACM international conference on multimodal interaction; 2017.

  20. Cao P, Li X, Mao K, Lu F, Ning G, Fang L, Pan Q. A novel data augmentation method to enhance deep neural networks for detection of atrial fibrillation. Biomed Signal Process Control. 2020;56:101675.

    Article  Google Scholar 

  21. Le Guennec A, Malinowski S, Tavenard R. Data augmentation for time series classification using convolutional neural networks. In: Proceedings of the ECML/PKDD workshop on advanced analytics and learning on temporal data, 2016.

  22. Jun TJ, Nguyen HM, Kang D, Kim D, Kim D, Kim YH. ECG arrhythmia classification using a 2-D convolutional neural network. ArXiv. 2018. arXiv:1804.06812.

  23. Yao Q, Wang R, Fan X, Liu J, Li Y. Multi-class arrhythmia detection from 12-lead varied-length ECG using attention-based time-incremental convolutional neural network. Inf Fusion. 2020;53:174–82.

    Article  Google Scholar 

  24. Acharya U, Oh SL, Hagiwara Y, Tan J, Adam M, Gertych A, Tan R. A deep convolutional neural network model to classify heartbeats. Comput Biol Med. 2017;89:389–96.

    Article  Google Scholar 

  25. Zhou B, Khosla A, Lapedriza A, Oliva A, Torralba A. Learning deep features for discriminative localization. In: Proceedings of the 2016 IEEE conference on computer vision and pattern recognition (CVPR). 2016; pp. 2921–2929.

  26. Goodfellow SD, Goodwin A, Greer R, Laussen PC, Mazwi M, Eytan D. Towards understanding ECG rhythm classification using convolutional neural networks and attention mappings. In: Proceedings of the machine learning for healthcare conference, PMLR, 2018; pp. 83–101.

  27. Oh SL, Ng EY, San Tan R, Acharya UR. Automated beat-wise arrhythmia diagnosis using modified U-net on extended electrocardiographic recordings with heterogeneous arrhythmia types. Comput Biol Med. 2019;105:92–101.

    Article  Google Scholar 

  28. Wang J, Qiao X, Liu C, Wang X, Liu Y, Yao L, Zhang H. Automated ECG classification using a non-local convolutional block attention module. Comput Methods Programs Biomed. 2021;203:106006.

    Article  Google Scholar 

  29. Boynton J. 12-Lead imbalanced ECG beat classification using time series ResNet. 2020. https://github.com/JackWBoynton/ECG_classification_ResNet/. Accessed 6 Dec 2020.

  30. Rajesh KN, Dhuli R. Classification of ECG heartbeats using nonlinear decomposition methods and support vector machine. Comput Biol Med. 2017;87:271–84.

    Article  Google Scholar 

  31. Rahman QA, Tereshchenko LG, Kongkatong M, Abraham T, Abraham MR, Shatkay H. Utilizing ECG-based heartbeat classification for hypertrophic cardiomyopathy identification. IEEE Trans Nano Biosci. 2015;14(5):505–12.

    Article  Google Scholar 

  32. Liang W, Zhang Y, Tan J, Li Y. A novel approach to ECG classification based upon two-layered HMMS in body sensor networks. Sensors. 2014;14(4):5994–6011.

    Article  Google Scholar 

  33. Lyon A, Mincholé A, Martínez JP, Laguna P, Rodriguez B. Computational techniques for ECG analysis and interpretation in light of their contribution to medical advances. J R Soc Interface. 2018;15(138):20170821.

    Article  Google Scholar 

  34. Li Y, Pang Y, Wang J, Li X. Patient-specific ECG classification by deeper CNN from generic to dedicated. Neurocomputing. 2018;314:336–46.

    Article  Google Scholar 

  35. Yildirim Özal. A novel wavelet sequence based on deep bidirectional LSTM network model for ECG signal classification. Comput Biol Med. 2018;96:189–202.

    Article  Google Scholar 

  36. Saadatnejad S, Oveisi M, Hashemi M. LSTM-based ECG classification for continuous monitoring on personal wearable devices. IEEE J Biomed Health Inform. 2020;24(2):515–23.

    Article  Google Scholar 

  37. Hong S, Zhou Y, Shang J, Xiao C, Sun J. Opportunities and challenges of deep learning methods for electrocardiogram data: a systematic review. Comput Biol Med. 2020;122:103801.

    Article  Google Scholar 

  38. Liu F, Zhou X, Cao J, Wang Z, Wang H, Zhang Y. A LSTM and CNN based assemble neural network framework for arrhythmias classification. In: Proceedings of the IEEE international conference on acoustics, speech and signal processing (ICASSP), IEEE, 2019; pp. 1303–1307.

  39. Lynn HM, Pan SB, Kim P. A deep bidirectional GRU network model for biometric electrocardiogram classification based on recurrent neural networks. IEEE Access. 2019;7:145395–405.

    Article  Google Scholar 

  40. Zhou Y, Zhang H, Li Y, Ning G. ECG heartbeat classification based on ResNet and Bi-LSTM. IOP Conf Ser Earth Environ Sci. 2020;428:012014.

    Article  Google Scholar 

  41. Moody GB, Mark RG. MIT-BIH arrhythmia database. 1992. https://physionet.org/content/mitdb/. Accessed 6 Dec 2020.

  42. American National Standard. ANSI/AAMI. Testing and reporting performance results of cardiac rhythm and ST segment measurement algorithms. In: 1998-2008; ISO EC57. Technical report, association for the advancement of medical instrumentation. 2012. https://my.aami.org/aamiresources/previewfiles/EC57_1212_preview.pdf. Accessed 6 Dec 2020.

  43. PhysioNet. St Petersburg INCART 12-lead arrhythmia database. 2008. https://physionet.org/content/incartdb/1.0.0/. Accessed 6 Dec 2020.

  44. Randazzo A (2016) Guide to 12-lead ECG placement. https://www.primemedicaltraining.com/12-lead-ecg-placement/. Accessed 6 July 2021.

  45. Lieberman K. Interpreting 12-lead ECGs: a piece by piece analysis. Nurse Pract. 2008;33(10):28–35.

    Article  Google Scholar 

  46. Goldberger A, Amaral L, Glass L, et al. PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals. Circulation. 2003;101(23):e215–20.

    Google Scholar 

  47. Shimodaira H. Improving predictive inference under covariate shift by weighting the log-likelihood function. J Stat Plan Inference. 2000;90(2):227–44.

    Article  MathSciNet  Google Scholar 

  48. Fawaz HI. Deep learning for time series classification. 2020. https://github.com/hfawaz/dl-4-tsc. Accessed 1 Sept 2021.

  49. Lin Y, Lee BS, Lustgarten D. Continuous detection of abnormal heartbeats from ECG using online outlier detection. In: Information management and big data. Berlin: Springer; 2019. p. 349–66.

    Chapter  Google Scholar 

  50. Veeravalli B, Deepu CJ, Ngo D. Real-time, personalized anomaly detection in streaming data for wearable healthcare devices. In: Zomaya AY, Abbas A, Khan SU, editors. Handbook of large-scale distributed computing in smart healthcare. Berlin: Springer; 2017. p. 403–26.

    Chapter  Google Scholar 

  51. Christov II. Real time electrocardiogram QRS detection using combined adaptive threshold. Biomed Eng Online. 2004;3:28.

    Article  Google Scholar 

  52. Virtanen P, Gommers R, Oliphant TE, et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods. 2020;17:261–72.

    Article  Google Scholar 

  53. Moshkov N, Mathe B, Kertesz-Farkas A, Hollandi R, Horvath P. Test-time augmentation for deep learning-based cell segmentation on microscopy images. Sci Rep. 2020;10(5068).

  54. Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition. In: Proceedings of the international conference on learning representations 2015, 2015.

  55. Selvaraju RR, Cogswell M, Das A, Vedantam R, Parikh D, Batra D. Grad-CAM: visual explanations from deep networks via gradient-based localization. Int J Comput Vis. 2019;128(2):336–59.

    Article  Google Scholar 

  56. Pedregosa F, Varoquaux G, Gramfort A, et al. Scikit-learn: machine learning in Python. J Mach Learn Res. 2011;12:2825–30.

    MathSciNet  MATH  Google Scholar 

  57. Ardakani AA, Kanafi AR, Acharya UR, Khadem N, Mohammadi A. Application of deep learning technique to manage COVID-19 in routine clinical practice using ct images: results of 10 convolutional neural networks. Comput Biol Med. 2020;121:103795.

    Article  Google Scholar 

Download references

Acknowledgements

The work by Edmund Do and Jack Boynton was supported by the College of Engineering and Mathematical Sciences at the University of Vermont through the Research Experience for Undergraduates program. Computations were performed on the Vermont Advanced Computing Core supported in part by NSF award No. OAC-1827314. The authors thank the anonymous reviewers for their comments, which were invaluable for improving the quality of the manuscript.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Byung Suk Lee.

Ethics declarations

Conflict of interest

On behalf of all authors, the corresponding author states that there is no conflict of interest.

Additional information

Publisher's Note

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

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Do, E., Boynton, J., Lee, B.S. et al. Data Augmentation for 12-Lead ECG Beat Classification. SN COMPUT. SCI. 3, 70 (2022). https://doi.org/10.1007/s42979-021-00924-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s42979-021-00924-x

Keywords

Navigation