Comparative Analysis of ECG Image Classification for Cardiac Disease Detection Using Deep Learning Approaches

Electrocardiogram, Convolutional Neural Network, Deep Learning, Long Short-Term Memory

Authors

  • Bareq Mardan ITM Department, College of Technical, Duhok Polytechnic University, Kurdistan Region, Iraq
  • Diyar Qader Zeebaree Technical Engineering Department, College of Computer and AI, Northern Technical University (NTU)
November 10, 2025
March 31, 2026

Downloads

Background: Electrocardiogram (ECG) interpretation is essential for cardiac disease diagnosis. While signal-based methods have been dominant recent advances in deep learning introduced image-based classification offering new directions for automated detection.

Objectives: This study investigates the effectiveness of Convolutional Neural Networks (CNN), Long Short-Term Memory (LSTM) and a hybrid CNN-LSTM model for ECG image classification. The focus is on whether combining spatial and temporal feature learning improves accuracy compared to individual models.

Methods: ECG images were collected from public repositories. CNN and LSTM models were first applied directly to raw data but faced limitations due to noise and class imbalance. To address these issues preprocessing was introduced: Pix2Pix GAN for denoising and augmentation, and resampling with class weighting to balance classes. The models were retrained on the processed data, followed by the development of a hybrid CNN-LSTM framework combining convolutional feature extraction with sequential learning.

Results: The hybrid model achieved the best performance, with 97.89% accuracy and a macro F1-score of 0.89. Preprocessing significantly improved recognition of minority classes, highlighting the role of GAN-based denoising and balanced training.

Conclusion: A hybrid CNN-LSTM with GAN preprocessing provides a reliable and robust framework for ECG image classification. This approach offers improved generalization and could complement or enhance traditional signal-based ECG analysis in clinical practice.