Skip to content

0mehdi0/Deep-PxAF

Repository files navigation

Accurate Detection of Paroxysmal Atrial Fibrillation with Certified-GAN and Neural Architecture Search

This paper presents the results of a novel machine learning method for detecting Paroxysmal Atrial Fibrillation (Deep-PxAF), a pathological characteristic of Electrocardiogram (ECG) that can lead to fatal conditions such as heart attack. To enhance the learning process, this method involves a Generative Adversarial Network (GAN) along with a Neural Architecture Search (NAS) in the data preparation and classifier optimization phases.

Following is a snippet of key results. results_table

Installation

First, clone the repository.

git clone https://github.com/0mehdi0/ECG-NAS.git && cd ECG-NAS

Then you need to run GAN model to genrate synthetic ecg data and add them to DARTS or you can download them from here.
(Selected_GAN.pt): link , and (GAN_Data.pt): link

  • GAN_Data: 10000 synthetic ecg data was given form our GAN saved model.
  • Selected_GAN: selected indexes were chosen by expert physician.

After that you should download below files : (dataset_PAF.pkl): link , (Selected_PAF.csv): link,(finalindex.pt): link

  • dataset_PAF: Full dataset.
  • Selected_PAF: Selected indexes of PAF dataset were chosen by expert physician.
  • finalindex: Train and test indexes.

Next, move finalindex.pt, dataset_PAF.pkl, Selected_PAF.csv, GAN_Data.pt, Selected_GAN.pt to the datasets folder.
Then, install requirements by running:

pip install -r requirements.txt

Run the Repository

Run the signal processing

To evaluate the signal processing:

python signalprocess_1ch.py

Run the GAN

See the instructions in GAN folder.

Run the NAS

To search for the best CNN architecture for the processed 2D images with randomseed 100 and synthetic data:

python search_1ch_3class.py --seed 100 --GAN_flag" 1

To fine-tune the best designed architecture:

python retrain3class.py --seed 100 --GAN_flag" 1

Database

The original database is downloaded from the PhysioNet PAF prediction challenge through the following link: https://physionet.org/content/afpdb/1.0.0/

Contributors

Some of the code in this repository is based on the following amazing works.

Releases

No releases published

Packages

No packages published