Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 650 Bytes

README.md

File metadata and controls

20 lines (16 loc) · 650 Bytes

ecg_vit

1D vision transformer (vit) for ecg interpretable classification
Code for my blog post

Installation

python version 3.10.5
dependencies in requirements.txt

Training

python train.py /<path>/a-large-scale-12-lead-electrocardiogram-database-for-arrhythmia-study-1.0.0/

Plot attension

python plot_attention.py  <wfdb_file> <model_weights_path> <lead_index>`  

For example:

python plot_attention.py a-large-scale-12-lead-electrocardiogram-database-for-arrhythmia-study-1.0.0/WFDBRecords/06/066/JS05865 vit_best/ 6