liyuejul / ppg2ecg-pytorch

The official implementation of the paper "Reconstructing QRS Complex from PPG by Transformed Attentional Neural Networks"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

https://drive.google.com/file/d/15dxbpi4FH7lJbRFZwyREyX4V0VKDxXNs/view?usp=sharing

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

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},}

About

The official implementation of the paper "Reconstructing QRS Complex from PPG by Transformed Attentional Neural Networks"

License:MIT License


Languages

Language:Python 100.0%