Arrhythmia Classification from ECG Signal

Rabiul Islam
2 min readMay 28, 2024

--

CAT-Net: Convolution, Attention, and Transformer based Network for Single-lead ECG Arrhythmia Classification

Overview of CAT-Net Model

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:

  1. Task: Arrhythmia Classification
  2. Input: ECG Signal (Actually ECG Heartbeats)
  3. Output: Arrhythmia Class — 5 Classes (N, S, V, F, Q)
  4. Datasets: 2, (i) MIT-BIH, (ii) INCART
  5. Preprocessing: (i) Wavelet Denoising, (ii) Heartbeat Segmentation
  6. Class Balancing Approach: 3 techniques (SMOTE, SMOTE-Tomek, ADASYN) implemented — Finally SMOTE-Tomek is applied
  7. 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.

  1. Part A: Installing Packages and Basic Visualization of ECG
  2. Part B: Denoising, R-Peak Detection, Segmentation
  3. Part C: Dataset Loading
  4. Part D: Train-Test Splitting and Class Balancing
  5. Part E: Model Building and Training
  6. 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.

CAT-Net Model Architecture

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.

--

--