Arrhythmia Classification from ECG Signal
CAT-Net: Convolution, Attention, and Transformer based Network for Single-lead ECG Arrhythmia Classification
In the blog, I am going to share a GitHub repository that provides Python code of 5 class arrhythmia classification from the ECG dataset. The work was published in Biomedical Signal Processing and Control, Elsevier journal in 2024.
Here is a quick detail of this work.
Task — At A Glance:
- Task: Arrhythmia Classification
- Input: ECG Signal (Actually ECG Heartbeats)
- Output: Arrhythmia Class — 5 Classes (N, S, V, F, Q)
- Datasets: 2, (i) MIT-BIH, (ii) INCART
- Preprocessing: (i) Wavelet Denoising, (ii) Heartbeat Segmentation
- Class Balancing Approach: 3 techniques (SMOTE, SMOTE-Tomek, ADASYN) implemented — Finally SMOTE-Tomek is applied
- Results: State-of-the-art, Accuracy: MIT-BIH — 99.14% (5 Class), INCART — 99.58% (3 Class)
Coding Details- Main Parts of the Study:
The complete code is given in the ‘Arrhythmia Classification Full and Final Code.ipynb’ file.
- Part A: Installing Packages and Basic Visualization of ECG
- Part B: Denoising, R-Peak Detection, Segmentation
- Part C: Dataset Loading
- Part D: Train-Test Splitting and Class Balancing
- Part E: Model Building and Training
- Part F: Results
Publication
The paper is published in the Biomedical Signal Processing and Control Journal, Elsevier in July 2024. You are recommended to check the PAPER.
GitHub Repository
You will find the full information, explanation, and full code in the GitHub repository. Just open the file named “Arrhythmia_Classification_Full_and_Final_Code.ipynb” and explore the whole project here.
If you find the project interesting, explore the GitHub repository, and you can also visit my personal website. Thank you.
Md Rabiul Islam
- PhD Student, Electrical and Computer Engineering
- Texas A&M University, College Station, USA
- BSc, MSc: EEE, KUET, Bangladesh.