Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
PPD f0137bc3e8 | 1 year ago | |
---|---|---|
chexpert-labeler | 1 year ago | |
models | 1 year ago | |
modules | 1 year ago | |
README.md | 1 year ago | |
main.py | 1 year ago | |
run_mimic_abn.sh | 1 year ago | |
run_mimic_cxr.sh | 1 year ago |
This is the pytorch implementation for our paper:
Weakly Supervised Contrastive Learning for Chest X-Ray Report Generation
at Findings of EMNLP-2021.
torch>=1.6.0
torchvision>=0.8.0
We use two datasets (MIMIC-ABN and MIMIC-CXR) in the paper.
For MIMIC-ABN
, you can download the dataset from release/mimic_abn and then put the files in data/mimic_abn
.
For MIMIC-CXR
, you can download the dataset from release/mimic_cxr and then put the files in data/mimic_cxr
.
Note: you need to sign user agreements then download x-ray images from the official website.
Run bash run_mimic_abn.sh
to train a model on the MIMIC-ABN data.
Run bash run_mimic_cxr.sh
to train a model on the MIMIC-CXR data.
We use public code sources to evaluate our models.
For CE metrics, please follow this repo to use ChexPert and install relative packages. Then refer to label_on_fly.py and run_label.sh in our chexpert-labeler folder to label your reports (which will generate a csv file with ChexPert labels). In the end, use calculate_metric.py to compute clinical accuracy.
For NLG metrics, please refer to pycocoevalcap.
You can download the models we trained for each dataset from release/pretrained_models.
If you find this repository useful, please cite our paper:
@article{yan2021weakly,
title={Weakly Supervised Contrastive Learning for Chest X-Ray Report Generation},
author={Yan, An and He, Zexue and Lu, Xing and Du, Jiang and Chang, Eric and Gentili, Amilcare and McAuley, Julian and Hsu, Chun-Nan},
journal={arXiv preprint arXiv:2109.12242},
year={2021}
}
This project is built on top of R2Gen. Thank the authors for their contributions to the community!
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》