Cardiovascular Diseases Prediction from ECG Image.

Description

Cardiovascular diseases (CVDs) remain the leading cause of mortality worldwide, making early detection critical for effective intervention. Electrocardiograms (ECGs) serve as a widely accessible and noninvasive diagnostic tool for identifying cardiac abnormalities. This study implements a deep learning-based approach to classify ECG images into four categories: abnormal heartbeat, myocardial infarction, history of myocardial infarction, and normal heart conditions. Unlike traditional handcrafted feature extraction techniques, we leverage transfer learning by employing the MobileNet architecture, pretrained on ImageNet, to extract relevant features from ECG images.

The dataset used in this study is the ECG Images Dataset of Cardiac Patients, created under the auspices of Ch. Pervaiz Elahi Institute of Cardiology, Multan, Pakistan. This dataset aims to support the scientific community in conducting research on cardiovascular diseases. The dataset consists of ECG images from different patient groups, with a total size of 194 MB, and contains:

  • Myocardial Infarction Patients: (240 × 12) = 2,880 images

  • Patients with Abnormal Heartbeat: (233 × 12) = 2,796 images

  • Patients with a History of Myocardial Infarction: (172 × 12) = 2,064 images

  • Normal Person ECG Images: (284 × 12) = 3,408 images

By fine-tuning MobileNet and incorporating a custom classification layer, we achieve efficient feature extraction and classification without the need for extensive computational resources. Experimental results demonstrate the effectiveness of transfer learning in ECG classification, yielding a perfect classification performance with an accuracy more than 99 %.

During training, we observed fluctuations in accuracy at specific epochs (e.g., 30, 50, and 72), where accuracy momentarily dropped to 0.6–0.7, deviating from the expected trend of ~0.9. These fluctuations may result from batch variation, learning rate dynamics, or the model temporarily overfitting to specific patterns in the training data. However, the model recovered and ultimately converged to high accuracy. Such fluctuations emphasize the importance of using techniques like learning rate scheduling, adaptive optimizers, and increased batch sizes to stabilize training and improve convergence.

These results highlight the reliability of MobileNet in ECG classification, demonstrating its potential for real-time heart disease detection. Additionally, the integration of this approach into IoT-enabled healthcare systems can enhance accessibility and accuracy in cardiovascular disease diagnosis.

Details
  • Date: January 25, 2020
  • Categories: AI & Machine LearningImage Processing & Computer Vision
  • Client Envato