A CNN based to classify the ECG signals of a patient with and without Atrial Fibrillation. Accuracy Achieved: 93.33%.
Data Preprocessing Notebook
·
Model Notebook
·
Report Bug
- Table of Contents
- About The Project
- Jupyter Notebooks - nbViewer
- Dataset Information
- How to Run
- Changelog
- Contributing
- License
- Future Improvements
- Contact
This is a CNN based model which aims to automatically classify the ECG signals of a normal patient vs. a patient with Atrial Fibrillation and has been trained to achieve up to 93.33%
validation accuracy.
The CNN used here is 1D Convolutional Neural Networks.
- Dataset Preparation Notebook
- Model - Main Notebook Containing the Dataset Loader and Model Architecture
- Download the dataset from MIT-BIH Atrial Fibrillation Database
Note: The dataset has been moved from the original URL. Hence, the dataset provided above may be different from the one that was originally used to create this project.
The experiment should be fairly reproducible. However, a GPU would be recommended for training. For Inference, a CPU System would suffice.
- Download the dataset from the above mentioned link.
- Put them in the desired path and change the path of the
Data_Preprocessing.ipynb
to be able to read the signals from the downloaded CSVs. - Save the processed dataset as a Numpy Object in the desired location.
- In the file
Model.ipynb
read the saved processed dataset and train the model. - Any unknown dataset can be then classified by using
model.predict()
function after themodel
has been trained successfully.
- CPU: AMD Ryzen 7 3700X - 8 Cores 16 Threads
- GPU: Nvidia GeForce RTX 2080 Ti 11 GB
- RAM: 32 GB DDR4 @ 3200 MHz
- Storage: 1 TB NVMe SSD (This is not important, even a normal SSD would suffice)
- OS: Ubuntu 20.10
Alternative Option: Google Colaboratory - GPU Kernel
Simple List of Deep Learning Libraries. The main Architecture/Model is developed with Keras, which comes as a part of Tensorflow 1.x
Since this is a Proof of Concept Project, I am not maintaining a CHANGELOG.md at the moment. However, the primary goal is to improve the architecture to make the predicted masks more accurate.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
This is a preliminary attempt and is a work-in-progress:
- In this particular implementation, only 10 Normal patients' data and 10 Abnormal patients' data has been taken and used. The entire dataset has not been used. Using the complete dataset may significantly improve the model accuracy.
- The CNN architecture can be further modified so as to find an optimal architecture that will learn better than the existing one.
- As per experimentation, SGD (Stochastic Gradient Descent) optimizer works the best. However, with further change in model architecture, other optimizers like Adam and RMSProp may outperform the rather primitive SGD optimizer.
- Website: Animikh Aich - Website
- LinkedIn: animikh-aich
- Email: [email protected]
- Twitter: @AichAnimikh