Comparative Analysis of VGG16 and ResNet50 Model Performence in Cardiac ECG Image Classification
DOI:
https://doi.org/10.30871/jaic.v9i3.9350Keywords:
ECG Image Classification, Deep Learning, VGG16, ResNet50, Transfer LearningAbstract
This study systematically evaluates and compares the effectiveness of two deep learning architectures, VGG16 and ResNet50, in automating electrocardiogram (ECG) image classification for cardiac condition diagnosis. The dataset was obtained from a public source and consists of 2,898 color ECG images converted from raw signals, categorized into four classes: Abnormal Heartbeat, Myocardial Infarction, Normal Individual, and History of Heart Attack. The data underwent preprocessing steps including resizing to 224×224 pixels, pixel normalization to a 0–1 range, label encoding, one-hot encoding, and an 80:20 split for training and testing. Transfer learning was applied using feature representations from the VGG16 and ResNet50 models, employing the Adam optimizer and categorical cross-entropy loss function. To enhance training efficiency and prevent overfitting, early stopping was implemented based on validation loss performance. Model performance was evaluated using accuracy, precision, recall, and F1-score metrics. The results showed that VGG16 achieved 95% accuracy with a loss of 0.1522, precision of 95%, recall of 94%, and F1-score of 94%. In contrast, ResNet50 attained 81% accuracy with a loss of 0.5730, precision of 82%, recall of 79%, and F1-score of 80%. These findings indicate that, within the context of this study, VGG16 consistently outperformed ResNet50 across all evaluation metrics in the ECG image classification task. Therefore, the application of transfer learning using the VGG16 model demonstrates strong potential as an effective approach for AI-based ECG image classification systems.
Downloads
References
[1] V. Artanti, M. Faisal, and F. Kurniawan, “Klasifikasi Cardiovascular Diseases Menggunakan Algoritma K-Nearest Neighbors (KNN) Classification of Cardiovascular Diseases using K-Nearest Neighbors (KNN) Algorithm,” Techno.COM, vol. 23, no. 2, pp. 467–479, May 2024.
[2] World Health Organization (WHO), “Cardiovascular diseases (CVDs),” https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds).
[3] I. Wijayanto, A. Humairani, A. Rizal, And S. Hadiyoso, “Klasifikasi Sinyal EKG menggunakan Ciri Statistik dan Parameter Hjorth dengan SVM dan k-NN,” ELKOMIKA: Jurnal Teknik Energi Elektrik, Teknik Telekomunikasi, & Teknik Elektronika, vol. 10, no. 1, p. 132, Jan. 2022, doi: 10.26760/elkomika.v10i1.132.
[4] D. Shen, G. Wu, and H.-I. Suk, “Deep Learning in Medical Image Analysis,” Annu Rev Biomed Eng, vol. 42, p. 46, 2017, doi: 10.1146/annurev-bioeng-071516.
[5] D. Gunawan and H. Setiawan, “Convolutional Neural Network dalam Analisis Citra Medis,” KONSTELASI: Konvergensi Teknologi dan Sistem Informasi, vol. 2, no. 2, pp. 376–390, Dec. 2022.
[6] Y. K. Bintang and H. Imaduddin, “Pengembangan Model Deep Learning Untuk Deteksi Retinopati Diabetik Menggunakan Metode Transfer Learning,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 9, no. 3, pp. 1442–1455, Aug. 2024, doi: 10.29100/jipi.v9i3.5588.
[7] Q. Li and M. Q. Yang, “Comparison of machine learning approaches for enhancing Alzheimer’s disease classification,” PeerJ, vol. 9, Feb. 2021, doi: 10.7717/peerj.10549.
[8] R. N. Azizah, M. M. Huda, V. A. Tricahyo, and A. A. Septarina, “Implementasi Arsitektur Visual Geometry Group 16 (VGG16) untuk Deteksi Cardiomegaly pada Chest X-Ray,” Jurnal Teknik Elektro dan Komputer TRIAC, vol. 11, no. 1, pp. 31–36, Jun. 2024.
[9] L. Yin, R. Liu, W. Li, S. Li, and X. Hou, “Deep learning-based CT radiomics predicts prognosis of unresectable hepatocellular carcinoma treated with TACE-HAIC combined with PD-1 inhibitors and tyrosine kinase inhibitors,” BMC Gastroenterol, vol. 25, no. 1, p. 24, Dec. 2025, doi: 10.1186/s12876-024-03555-7.
[10] T. Berliani, E. Rahardja, and L. Septiana, “Perbandingan Kemampuan Klasifikasi Citra X-ray Paru-paru menggunakan Transfer Learning ResNet-50 dan VGG-16,” Journal of Medicine and Health, vol. 5, no. 2, pp. 123–135, Aug. 2023, doi: 10.28932/jmh.v5i2.6116.
[11] D. S. Uplaonkar* and Dr. B. Amarapur, “A hybrid neural filter (HNF) based on adaptive median and weiner techniques for reducing speckle noise of ultrasound liver tumor images,” International Journal of Recent Technology and Engineering, vol. 8, no. 3, pp. 2243–2250, Sep. 2019, doi: 10.35940/ijrte.B3252.098319.
[12] Rio Subandi, Herman, and Anton Yudhana, “Pre-Processing Pada Klasifikasi Citra Medis Pneumonia,” Decode: Jurnal Pendidikan Teknologi Informasi, vol. 4, no. 1, pp. 86–93, Nov. 2023, doi: 10.51454/decode.v4i1.198.
[13] H. Zhang and Y. Qie, “Applying Deep Learning to Medical Imaging: A Review,” Applied Sciences, vol. 13, no. 18, p. 10521, Sep. 2023, doi: 10.3390/app131810521.
[14] F. Muhammad, M. A. Arimurthy, and D. Chahyati, “Transfer learning pada Network VGG16 dan ResNet50,” The Indonesian Journal of Computer Science, vol. 12, no. 1, p. 361, Feb. 2023.
[15] J. Li, T. V. Nguyen, C. Hegde, and R. K. W. Wong, “Implicit Sparse Regularization: The Impact of Depth and Early Stopping,” Adv Neural Inf Process Syst, no. 34, pp. 28298–28309, Aug. 2021, [Online]. Available: http://arxiv.org/abs/2108.05574
[16] N. Khasanah, “Komparasi Arsitektur Resnet50 Dan Vgg16 Untuk Klasifikasi Citra Tanda Tangan,” JSI: Jurnal Sistem Informasi (E-Journal), vol. 14, no. 1, pp. 2611–2621, Apr. 2022, [Online]. Available: http://ejournal.unsri.ac.id/index.php/jsi/index
[17] K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition,” Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016, [Online]. Available: http://image-net.org/challenges/LSVRC/2015/
[18] E. H. Rachmawanto, D. Hermanto, Z. Pratama, and C. A. Sari, “Performa Convolutional Neural Network Dalam Deep Layers Resnet-50 Untuk Klasifikasi Mri Tumor Otak,” Semnas Ristek (Seminar Nasional Riset dan Inovasi Teknologi), vol. 8, no. 01, Jan. 2024.
[19] S. Kornblith, J. Shlens, and Q. V. Le, “Do better imagenet models transfer better?,” in Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, IEEE Computer Society, Jun. 2019, pp. 2656–2666. doi: 10.1109/CVPR.2019.00277.
[20] M. Fahmy Amin and F. Amin, “Confusion Matrix in Binary Classification Problems: A Step-by-Step Tutorial,” Journal of Engineering Research, vol. 6, no. 5, 2022.
[21] C. Kaope and Y. Pristyanto, “The Effect of Class Imbalance Handling on Datasets Toward Classification Algorithm Performance,” MATRIK : Jurnal Manajemen, Teknik Informatika dan Rekayasa Komputer, vol. 22, no. 2, pp. 227–238, Mar. 2023, doi: 10.30812/matrik.v22i2.2515.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Hanif Rizaqi, Imam Tahyudin

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:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- 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 acknowledgement of its initial publication in this journal.
- 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 (See The Effect of Open Access).