GithubHelp home page GithubHelp logo

gaiamrc / ecgtransformer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sliang11/ecgtransformer

0.0 0.0 0.0 169.02 MB

Source code of BIBM 2019 Paper "Fusing Transformer Model with Temporal Features for ECG Heartbeat Classification"

Python 81.83% MATLAB 18.17%

ecgtransformer's Introduction

Acknowledgement

Some of the python code (comment lines or functions) in this project is not used which are some attempts or hints I have done. I must admit that the code refers to the following two items in many places:

  1. https://github.com/jadore801120/attention-is-all-you-need-pytorch
  2. https://github.com/eladhoffer/seq2seq.pytorch

MATLAB code

version is R2018.a

  1. Need WFDB Toolbox for MATLAB from https://physionet.org/physiotools/matlab/wfdb-app-matlab/
  2. run get_anno to get annotation
  3. run denoising to get denoised signal
  4. run segmentation to segment the denoised signal
  5. run features to get the final results, format: label, preRR interval, postRR interval, [heartbeat signal]
  6. Here I provide a version of the results, you can also try to use different noise reduction methods or segmentation methods.

Python code

  1. All parameters are defined in config.py
  2. Some package versions:
    • python: 3.6.8
    • numpy: 1.16.0
    • Pytorch: '1.0.1.post2'
    • cuda: '10.0.130'
    • tqdm: 4.31.1
  3. You may need to change the code in main.py to set train_file and valid_file path according to your preference.
  4. Since I have modified my code, I'm not sure the code will work correctly. So if there is any bug, please let me know.

License

For academtic and non-commercial usage

ecgtransformer's People

Contributors

yangenshen 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.