/ECG-Arrhythmia-classification

ECG arrhythmia classification using a 2-D convolutional neural network

Primary LanguagePython

ECG-Arrhythmia-classification

ECG arrhythmia classification using a 2-D convolutional neural network

This repository is an implementation of the paper ECG arrhythmia classification using a 2-D convolutional neural network in which we classify ECG into seven categories, one being normal and the other six being different types of arrhythmia using deep two-dimensional CNN with grayscale ECG images. By transforming one-dimensional ECG signals into two-dimensional ECG images, noise filtering and feature extraction are no longer required. This is important since some of ECG beats are ignored in noise filtering and feature extraction. In addition, training data can be enlarged by augmenting the ECG images which results in higher classification accuracy. Data augmentation is hard to be applied in 1-d signals since the distortion of 1-d ECG signal could downgrade the performance of the classifier. However, augmenting two-dimensional ECG images with different cropping methods helps the CNN model to train with different viewpoints of the single ECG images. Using ECG image as an input data of the ECG arrhythmia classification also benefits in the sense of robustness.

METHOD

alt text

MODEL

Here is the link to the model: Link

Deploying the model

  1. Clone my repository.
  2. Clone this repository.
  3. Download the weights.
  4. Replace app.py in the other repository you have downloaded with the app.py from my repository.
  5. Replace index.html as well that is present in the other repository with the index.html that is provided in my repo. If you face any other problem related to deploying you can check this repository.

The model works only if your data is similar to sample.csv

Here is a screenshot of the app from my system

alt text

Medium Blog

You can find all the procedures regarding training your own model and other details of this project on my Medium post.