MertDuman / Zero-Shot-ECG

A Personalized Zero-Shot ECG Anomaly Monitoring System: From Sparse Representation Based Domain Adaption to Energy Efficient Suspicious Beat Detection for a Practical ECG Surveillance
21 stars 7 forks source link

A Personalized Zero-Shot ECG Arrhythmia Monitoring System

arXiv PWC

Results

| Method | Accuracy | Specificity | Precision | Recall | F1-Score | | :--- | :---: | :---: | :---: | :---: | :---: | | Kiranyaz *et al.* ![](imgs/d.svg) | 0.959 | 0.971 | 0.842 | 0.888 | 0.864 | | Zhai *et al.* ![](imgs/d.svg) | 0.968 | 0.976 | 0.879 | 0.920 | 0.899 | | Li *et al.* | 0.920 | 0.918 | 0.628 | 0.933 | 0.751 | | Zhou *et al.* ![](imgs/ds.svg) | 0.979 | 0.989 | 0.908 | 0.897 | 0.902 | | SAE-based ![](imgs/ds.svg) | 0.947 | 0.968 | 0.779 | 0.794 | 0.786 | | NPE-based (ours) ![](imgs/ds.svg) | 0.947 | 0.968 | 0.779 | 0.794 | 0.786 | | ABS ![](imgs/ds.svg) | 0.977 | **0.995** | **0.956** | 0.825 | 0.886 | | Domain Adaptation (ours) ![](imgs/ds.svg) | 0.978 | 0.987 | 0.911 | 0.907 | 0.909 | | Ensemble (ours) ![](imgs/ds.svg) | **0.982** | 0.988 | 0.919 | **0.937** | **0.928** | ![](imgs/d.svg) Personalized classifiers.
![](imgs/ds.svg) Zero-shot classifiers.

Setup

Python (3.8.10) dependencies:

To minimize conflict, our versions are given as reference.

Replicating Our Results

  1. Download the MIT-BIH Arrhythmia Database.
  2. Run ecg_beat_extraction.ipynb twice to generate single beats and beat-trios.
    • There should be 6 files generated.
  3. Run ecg_dataset_preparation.ipynb twice to generate datasets from single beats and beat-trios.
    • This generates dictionaries for each user. Save the dictionaries for single beats (and optionally for beat-trios).
    • We perform domain adaptation at this stage using the generated dictionaries for each user.
    • There should be 68 dataset files generated, and dictionaries for each user.
  4. To train your own classifier, go to train.ipynb. Otherwise, skip this part.
  5. To test with pretrained weights go to pretrained_*.ipynb files.