Introduction
Cardiovascular diseases (CVDs) remain the leading cause of death globally. Electrocardiograms (ECG) are the primary tool for diagnosing arrhythmias—irregularities in heart rhythm—but manual interpretation is labor-intensive and requires significant expertise. While automated classification exists, most traditional methods use 1-D signals directly. These approaches often struggle with inter-patient variability and the limited ability to perform data augmentation on 1-D time series without distorting clinical meaning. This paper proposes a method to improve diagnostic accuracy by extracting robust, invariant features through 2-D spectral image representation.
Methodology
The core innovation of this research is the transition from 1-D signal processing to 2-D computer vision techniques. The process involves several key stages:
- Pre-processing: Raw ECG signals are cleaned using wavelet-based thresholding to remove noise such as power line interference and baseline drift.
- Spectral Transformation: Using Short-Time Fourier Transform (STFT), 1-D time-series signals are converted into 2-D spectrograms (256x256 images), capturing both time and frequency information simultaneously.
- Data Augmentation: To address class imbalance and improve generalization, a cropping method generates eight different crops from the spectrograms, increasing the training data eightfold.
The study utilized the gold-standard MIT-BIH Arrhythmia Database, focusing on eight specific heartbeat classes: Normal (NOR), Premature ventricular contraction (PVC), Paced (PAB), Right bundle branch block (RBB), Left bundle branch block (LBB), Atrial premature contraction (APC), Ventricular flutter wave (VFW), and Ventricular escape beat (VEB).
CNN Architecture
A custom 2-D CNN was designed to process the spectral images. The architecture consists of four convolutional layers using 3x3 filters, interspersed with sampling (pooling) layers. This culminates in a fully connected layer and a softmax output for eight-class classification.
By converting the signal to an image, the researchers could leverage standard computer vision techniques, such as spatial filters and specific augmentation strategies, which are more versatile than 1-D counterparts. Interestingly, this custom, relatively shallow CNN outperformed much deeper models like VGGNet, suggesting that a tuned architecture can be more effective than brute-force depth for medical imaging tasks.
Key Results and Insights
The proposed 2-D CNN model demonstrated exceptional performance, achieving an average accuracy of 99.11%. This outperforms established models like AlexNet (98.85%) and VGGNet (98.63%). Other key metrics include:
- Sensitivity: 97.91%
- Specificity: 99.61%
- Precision: 98.58%
The "vision" approach offers a significant advantage: in the 2-D spectral domain, cropping allows the model to learn features invariant to slight shifts in time or frequency without destroying the underlying clinical signature. This allows for robust augmentation that is difficult to achieve with raw 1-D waveforms.
Conclusion and Future Work
While the results on the MIT-BIH dataset are state-of-the-art, there are limitations to address. The study primarily utilized single-lead ECG data; incorporating multi-lead data could further improve robustness for complex clinical environments. Additionally, the computational overhead of 2-D transformation may require optimization for real-time wearable "edge" devices. Future work should involve clinical validation on more diverse, real-world datasets to ensure the model handles "in-the-wild" noise and patient diversity effectively.
Summary updated