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:
- https://github.com/jadore801120/attention-is-all-you-need-pytorch
- https://github.com/eladhoffer/seq2seq.pytorch
version is R2018.a
- Need WFDB Toolbox for MATLAB from https://physionet.org/physiotools/matlab/wfdb-app-matlab/
- run
get_anno
to get annotation - run
denoising
to get denoised signal - run
segmentation
to segment the denoised signal - run
features
to get the final results, format: label, preRR interval, postRR interval, [heartbeat signal] - Here I provide a version of the results, you can also try to use different noise reduction methods or segmentation methods.
- All parameters are defined in
config.py
- Some package versions:
- python: 3.6.8
- numpy: 1.16.0
- Pytorch: '1.0.1.post2'
- cuda: '10.0.130'
- tqdm: 4.31.1
- You may need to change the code in
main.py
to set train_file and valid_file path according to your preference. - 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.
For academtic and non-commercial usage