Skip to content

Latest commit

 

History

History
101 lines (79 loc) · 2.45 KB

README.md

File metadata and controls

101 lines (79 loc) · 2.45 KB

PPG2ECG

The official implementation of the paper "Reconstructing QRS Complex from PPG by Transformed Attentional Neural Networks" https://ieeexplore.ieee.org/document/9109576

Results

Graph Abstract

Model Architecture

Dataset

Download the dataset:

And follow the instruction:

mkdir data
unzip dataset.zip -d data

After that, you should have following data structure:

data/
├── bidmc
│   ├── bidmc_csv
│   ├── bidmc-filtered
│   ├── bidmc-filtered-test
│   └── bidmc-filtered-train
└── uqvitalsigns
    ├── uqvitalsignsdata
    ├── uqvitalsignsdata-test
    └── uqvitalsignsdata-train

The main dataset we used in this paper can be found at

The University of Queensland Vital Signs Dataset

Pretrained Model (UQVIT)

Download the model weights and usually we put it in ./weights.

https://drive.google.com/file/d/10aYWNkgaGCz1zU6--kN3yaW6L_9BzkhQ/view?usp=sharing

(Sorry for the inconvience. The model weights are lost.)

Environment

You can check it yourself in requirements.txt

  • Ubuntu 18.04
  • python 3.6
  • pytorch 1.2 ...

Installation

# in your environment with pip
pip install -r requirements.txt

Usage

All the training parameters are included in config files.

# run UQVIT dataset with full model
python3 train.py --flagfile config/UQVIT.cfg

# run UQVIT dataset with LSTM baseline model
python3 train.py --flagfile config/UQVIT_LSTM.cfg

# run BIDMC dataset with full model
python3 train.py --flagfile config/BIDMC.cfg

Test for your own PPG data

Please see EXAMPLE.md.

Simple result:

Tensorboard

tensorboard --logdir logs

Citation

If you use this code for your research, please cite our papers.

@ARTICLE{ppg2ecg,
  author={H. -Y. {Chiu} and H. -H. {Shuai} and P. C. . -P. {Chao}},
  journal={IEEE Sensors Journal}, 
  title={Reconstructing QRS Complex From PPG by Transformed Attentional Neural Networks}, 
  year={2020},
  volume={20},
  number={20},
  pages={12374-12383},}