Code Monkey home page Code Monkey logo

ppg2ecg-pytorch's Introduction

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

ppg2ecg-pytorch's People

Contributors

james77777778 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.