This is an official inference code of "CheX-GPT: Harnessing Large Language Models for Enhanced Chest X-ray Report Labeling" [arxiv]
We have experimented the implementation on the following enviornment.
- Python 3.11
- CUDA 12.1
conda create -n chexgpt python=3.11
conda activate chexgpt
pip install -r requirements.txt
TBU - a subset of MIMIC test data (500 reports and paired labels)
Download the model checkpoint from here [link] and place the model in the 'checkpoint' directory.
- Test
- CE metrics are displayed
python main.py mode=test
- CE metrics are displayed
- Predict
- Labeler outputs are saved in jsonline format
python main.py mode=predict predict.output_path=${save_path}
- Labeler outputs are saved in jsonline format
- Inference
- You can directly input CXR reports and check the labeler output.
python inference.py
- You can directly input CXR reports and check the labeler output.
@article{gu2024chex,
title={CheX-GPT: Harnessing Large Language Models for Enhanced Chest X-ray Report Labeling},
author={Gu, Jawook and Cho, Han-Cheol and Kim, Jiho and You, Kihyun and Hong, Eun Kyoung and Roh, Byungseok},
journal={arXiv preprint arXiv:2401.11505},
year={2024}
}
- The source code of CheX-GPT is licensed under CC-BY-NC 4.0 License.
- The CheX-GPT model initialization utilized the ChexBert. For information regarding the licensing of ChexBert, please refer to the following links:
- Jawook Gu, [email protected]
- Kihyun You, [email protected]