Smart ECG Analysis and Heart Condition Detection Using AI
Cardiovascular diseases (CVDs) remain the leading cause of mortality worldwide, accounting for an estimated 17.9 million deaths annually. Electrocardiography (ECG) is a non-invasive and widely utilized diagnostic tool for detecting cardiac abnormalities. However, manual interpretation of ECG signals is time-consuming and prone to error. In this study, we propose a deep learning based framework for automated ECG analysis and heart condition detection. Utilizing the large-scale PTB-XL 12-lead ECG dataset, we apply essential preprocessing steps including bandpass filtering and baseline drift correction to enhance signal quality. Our architecture integrates a one- dimensional convolutional neural network (1D-CNN) for morphological feature extraction with a bidirectional long short-term memory (BiLSTM) network to capture temporal dependencies. Additionally, patient demographic information (age and sex) is incorporated through a parallel input branch to improve classification robustness. The model is trained using categorical cross-entropy loss across five diagnostic classes: normal, myocardial infarction, ST/T abnormalities, conduction disturbances, and hypertrophy. Stratified data splitting into training, validation, and test sets ensures balanced evaluation. The final model achieved a test accuracy of approximately 77.9%, with class-wise F1-scores ranging from 0.70 to 0.80, indicating reliable detection across diagnostic categories. A confusion matrix highlights misclassifications, particularly among classes with overlapping waveform characteristics. This AI-enhanced ECG interpretation system offers a consistent, scalable solution for preliminary cardiac screening, with strong potential for deployment in telehealth and resource-constrained environments to support early diagnosis and intervention.
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-11-04
- DOI
- https://doi.org/10.5281/zenodo.17519339
- Primary Topic
- ECG Monitoring and Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00