Ecg Image Based Predictions for Heart Care Using Machine Learning Based Framework
Keywords:
ECG, ANN, Machine learning, Prediction, Test dataAbstract
Early detection of left ventricular dysfunction (LVD), especially in asymptomatic individuals, is critical for timely intervention and improved cardiovascular outcomes. However, widespread access to echocardiography remains limited, particularly in low-resource settings. In this study, we developed and externally validated a deep learning (DL) model that predicts left ventricular ejection fraction (LVEF) from 12-lead ECG trace images, eliminating the need for raw signal data. A total of 1,19,281 ECG-echocardiogram pairs from 1,04,697 patients formed the training and test datasets, while 24,319 pairs from a distinct cohort were used for external validation. The ECG trace plots were processed via multi-otsu thresholding to extract the region of interest and standardized using Z-score normalization. The model architecture was based on DenseNet121, trained with class-weighted focal binary cross-entropy loss to address data imbalance. On internal test data, the model achieved a receiver operating characteristic area under curve (ROCAUC) of 0.92 and precision-recall AUC (PRAUC) of 0.78 in identifying LVEF < 50%. External validation yielded comparable performance with ROCAUC and PRAUC of 0.88 and 0.74, respectively. Notably, the algorithm demonstrated 97% sensitivity in detecting severe LVD (EF ≤ 35%) and maintained robust performance across age, sex, and paced ECG subgroups. With a diagnostic odds ratio of 31.7 on test data and a high negative predictive value (NPV ~0.94), the model ensures low false negative rates—critical for triaging in high-volume clinical settings. This study highlights the feasibility of using ECG image-based DL models for LVD screening, especially in resource-constrained environments. The ability to extract LVEF-related features from trace images offers practical scalability in primary and tertiary healthcare centers and introduces a new paradigm in accessible, AI-powered cardiac diagnostics.
Downloads
Metrics
References
Savarese G, Stolfo D, Sinagra G, Lund LH. Heart failure with mid-range or mildly reduced ejection fraction. Nat Rev Cardiol. 2022; 19:100–116.
Haas P, Santos ABS, Can˜on-Montan˜ez W, et al. Associations between coronary Artery calcification and left ventricular global longitudinal strain and diastolic parameters: the ELSA-Brasil study. Am J Cardiol. 2023; 204:215–222.
Panicker GK, Narula DD, Albert CM, et al. Validation of electrocardiographic criteria for identifying left ventricular dysfunction in patients with previous myocardial infarction. Ann Noninvasive Electrocardiol. 2021;26, e12812.
Liu S-H, Yang Z-K, Pan K-L, Zhu X, Chen W. Estimation of left ventricular ejection fraction using cardiovascular hemodynamic parameters and pulse morphological characteristics with machine learning algorithms. Nutrients. 2022; 14:4051.
Attia ZI, Dugan J, Rideout A, et al. Automated detection of low ejection fraction from a one-lead electrocardiogram: application of an AI algorithm to an electrocardiogram-enabled Digital Stethoscope. Eur Heart J Digit Health. 2022;3: 373–379.
Khunte A, Sangha V, Oikonomou EK, et al. Detection of left ventricular systolic dysfunction from single-lead electrocardiography adapted for portable and wearable devices. NPJ Digit Med. 2023; 6:124.
Kagiyama N, Piccirilli M, Yanamala N, et al. Machine learning assessment of left ventricular diastolic function based on electrocardiographic features. J Am Coll Cardiol. 2020; 76:930–941.
Potter EL, Rodrigues CHM, Ascher DB, Abhayaratna WP, Sengupta PP, Marwick TH. Machine learning of ECG waveforms to improve selection for testing for asymptomatic left ventricular dysfunction. JACC Cardiovasc Imaging. 2021;14: 1904–1915.
Sangha V, Nargesi AA, Dhingra LS, et al. Detection of left ventricular systolic dysfunction from electrocardiographic images. Circulation. 2023.
Liao P-S, Chen T-S, Chung P. A fast algorithm for multilevel thresholding. J Inf Sci Eng. 2001;17.
Huang G, Liu Z, van der Maaten L, Weinberger KQ. Densely Connected Convolutional Networks [Internet]. arXiv; 2018 [cited 2024 Jun 17]. Available from: http://arxiv.org/abs/1608.06993.
Lin T-Y, Goyal P, Girshick R, He K, Doll´ar P. Focal Loss for Dense Object Detection [Internet]. arXiv; 2018 [cited 2023 Jul 18]. Available from: http://arxiv.org/abs/1 708.02002.
Attia ZI, Kapa S, Lopez-Jimenez F, et al. Screening for cardiac contractile dysfunction using an artificial intelligence–enabled electrocardiogram. Nat Med. 2019; 25:70–74.
Cho J, Lee B, Kwon J-M, et al. Artificial intelligence algorithm for screening heart failure with reduced ejection fraction using electrocardiography. ASAIO J. 2021;67: 314.
Downloads
Published
How to Cite
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License.
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
Terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.