A Deep Capsule Network for Five-Class ECG Rhythm Classification from 1-D Heartbeat Segments


Selvi A. O., Huseynov S.

ESP Journal of Engineering & Technology Advancements, cilt.6, sa.1, ss.140-149, 2026 (Hakemli Dergi)

Özet

This study proposes a deep learning-based Capsule Network (CapsNet) model for five-class ECG rhythm classification using one-dimensional heartbeat segments derived from the MIT-BIH Arrhythmia Database. The analysis focused on five clinically significant rhythm classes: Normal sinus rhythm (N), supraventricular premature beat (S), premature ventricular contraction (V), fusion beat (F), and unclassifiable beat (Q). In the preprocessing stage, raw ECG recordings were segmented into fixed-length heartbeat samples of 300 points based on annotation positions. To reduce the negative impact of class imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied before model training. The Capsule Network architecture proposed in this study is designed to allow feature extraction from ECG data while distorting the structural features of the data. Classification results were evaluated using F1 Score, Sensitivity and Recall, and Accuracy metrics. The studies showed that the proposed architecture achieved an overall success rate of 99% in both training and test datasets. Class-based sensitivity, recall, and F1-score values generally ranged from 0.98 to 1.00. Even with erroneous classification transitions between structurally similar classes, the proposed architecture demonstrated sufficient classification performance for ECG rhythm classification.