ecg-master
所属分类:matlab编程
开发工具:matlab
文件大小:266KB
下载次数:5
上传日期:2019-04-15 13:58:25
上 传 者:
arjaya
说明: CODING FOR ECG CLASSIFICATION
文件列表:
LICENSE (35147, 2019-01-15)
ecg (0, 2019-01-15)
ecg\__init__.py (0, 2019-01-15)
ecg\load.py (2764, 2019-01-15)
ecg\network.py (4349, 2019-01-15)
ecg\predict.py (673, 2019-01-15)
ecg\train.py (2873, 2019-01-15)
ecg\util.py (354, 2019-01-15)
examples (0, 2019-01-15)
examples\cinc17 (0, 2019-01-15)
examples\cinc17\build_datasets.py (1352, 2019-01-15)
examples\cinc17\config.json (477, 2019-01-15)
examples\cinc17\entry (0, 2019-01-15)
examples\cinc17\entry\AUTHORS.txt (33, 2019-01-15)
examples\cinc17\entry\LICENSE.txt (35147, 2019-01-15)
examples\cinc17\entry\dependencies.txt (303, 2019-01-15)
examples\cinc17\entry\evaler.py (735, 2019-01-15)
examples\cinc17\entry\next.sh (829, 2019-01-15)
examples\cinc17\entry\prepare-entry.sh (822, 2019-01-15)
examples\cinc17\entry\requirements.txt (487, 2019-01-15)
examples\cinc17\entry\setup.sh (1867, 2019-01-15)
examples\cinc17\entry\weights_only.py (118, 2019-01-15)
examples\cinc17\notebooks (0, 2019-01-15)
examples\cinc17\notebooks\cinc17_eval.ipynb (4094, 2019-01-15)
examples\cinc17\setup.sh (248, 2019-01-15)
examples\irhythm (0, 2019-01-15)
examples\irhythm\build_datasets.py (4904, 2019-01-15)
examples\irhythm\config.json (455, 2019-01-15)
examples\irhythm\notebooks (0, 2019-01-15)
examples\irhythm\notebooks\agreement_rates.ipynb (5959, 2019-01-15)
examples\irhythm\notebooks\cinc17_eval.ipynb (71267, 2019-01-15)
examples\irhythm\notebooks\data_analysis.ipynb (2433, 2019-01-15)
examples\irhythm\notebooks\dev_results.ipynb (9224, 2019-01-15)
... ...
## Install
Clone the repository
```
git clone git@github.com:awni/ecg.git
```
If you don't have `virtualenv`, install it with
```
pip install virtualenv
```
Make and activate a new Python 2.7 environment
```
virtualenv -p python2.7 ecg_env
source ecg_env/bin/activate
```
Install the requirements (this may take a few minutes).
For CPU only support run
```
./setup.sh
```
To install with GPU support run
```
env TF=gpu ./setup.sh
```
## Training
In the repo root direcotry (`ecg`) make a new directory called `saved`.
```
mkdir saved
```
To train a model use the following command, replacing `path_to_config.json`
with an actual config:
```
python ecg/train.py path_to_config.json
```
Note that after each epoch the model is saved in
`ecg/saved///.hdf5`.
For an actual example of how to run this code on a real dataset, you can follow
the instructions in the cinc17 [README](examples/cinc17/README.md). This will
walk through downloading the Physionet 2017 challenge dataset and training and
evaluating a model.
## Testing
After training the model for a few epochs, you can make predictions with.
```
python ecg/predict.py .json .hdf5
```
replacing `` with an actual path to the dataset and `` with the
path to the model.
## Citation and Reference
This work is published in the following paper in *Nature Medicine*
[Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network](https://www.nature.com/articles/s41591-018-0268-3)
If you find this codebase useful for your research please cite:
```
@article{hannun2019cardiologist,
title={Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network},
author={Hannun, Awni Y and Rajpurkar, Pranav and Haghpanahi, Masoumeh and Tison, Geoffrey H and Bourn, Codie and Turakhia, Mintu P and Ng, Andrew Y},
journal={Nature Medicine},
volume={25},
number={1},
pages={65},
year={2019},
publisher={Nature Publishing Group}
}
```
近期下载者:
相关文件:
收藏者: