William Jongwon Han,Diana Gomez,Avi Alok,Chaojing Duan,Michael A. Rosenberg,Douglas Weber,Emerson Liu,Ding Zhao。
官方代码“通过文本表示对心脏内电图的解释”,由2024年健康,推理和学习会议接受(CHIL)。
如果您遇到任何错误或有任何疑问,请在wjhan {at} andrew {dot} cmu {dot} edu上提交问题或联系人。
我们感谢Allegheny总医院的Mario Lemieux心律护理中心支持这项工作。
注意:我们仅在Ubuntu 20.04.5 Lts上进行了测试。
conda create -n envname python=3.8
conda activate envname
git clone https://github.com/willxxy/ekg-af.git
cd ekg-af
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
注意:请确保您使用的PIP来自Conda环境
测试是否通过执行python gpu.py与当前的GPU兼容。目前,我们仅在A5000(24 GB)和A6000(48 GB)NVIDIA GPU上进行了测试。
pip install -r requirements.txt
尽管我们策划的数据尚未公开可用,但我们确实在外部数据集上有实验结果(主要结果在表2中),即Physionet上可用的“心脏内房颤数据库”。
要设置此数据,请将cd降为preprocess文件夹。
请执行以下命令以下载数据。
wget https://physionet.org/static/published-projects/iafdb/intracardiac-atrial-fibrillation-database-1.0.0.zip
unzip intracardiac-atrial-fibrillation-database-1.0.0
sh preprocess.sh
.npy的数据文件夹,以供培训,验证和测试。 从预处理文件夹cd ../返回到主目录。
现在,您可以直接使用train.sh文件开始培训。
sh inference.sh 。确保指定检查点路径。 所有可视化将保存在其各自的检查点文件夹中。请在可视化之前cd visualize 。在visualize文件夹下,请查看以下脚本:
stitch.sh可视化重建和预测的信号。
viz_tokens.sh可视化信号的令牌化表示。
viz_attentions.sh可视化模型的注意力图。
viz_int_grad.sh可视化模型的归因分数。
如果您发现此存储库或对自己的工作有帮助,请引用以下Bibtex。
@misc{han2024interpretation,
title={Interpretation of Intracardiac Electrograms Through Textual Representations},
author={William Jongwon Han and Diana Gomez and Avi Alok and Chaojing Duan and Michael A. Rosenberg and Douglas Weber and Emerson Liu and Ding Zhao},
year={2024},
eprint={2402.01115},
archivePrefix={arXiv},
primaryClass={cs.CL}
}