Official repository for the IEEE TMI paper “Large Language Model with Region‑Guided Referring and Grounding for CT Report Generation”
git clone https://github.com/zhi-xuan-chen/Reg2RG.git
cd Reg2RG
conda create -n reg2rg python=3.9
conda activate reg2rg
pip install -r requirements.txtThe RadGenome‑ChestCT dataset used in this work can be downloaded from the Hugging Face hub: https://huggingface.co/datasets/RadGenome/RadGenome-ChestCT
- Base LLM: Llama‑2‑7b‑chat‑hf
- Pre‑trained & auxiliary checkpoints: Reg2RG
After the data and checkpoints are ready, you can inference the model on RadGenome‑ChestCT with our pre‑trained weights.
- Create a custom configuration file
[your_config_name].shinconfigs/test_radgenome/(you can copy and modifyconfigs/test_radgenome/jhcpu7.sh). - Run:
cd scripts bash test_radgenome.sh [your_config_name]
After inference, evaluate the generated reports with the scripts in the evaluation/ directory.
All scripts read file paths from variables inside the script.
Please open each file and set the path (e.g.results_path) to your own CSV results before running.
- Strip region prefixes
python evaluation/rm_region_text.py
- Compute Natural Language Generation (NLG) metrics
python evaluation/hf_nlg_evaluation.py
- Compute Clinical Efficacy (CE) metrics
python evaluation/ce_evaluator_ct2rep/ce_evaluation.py
- Region prediction accuracy
python evaluation/region_pred_acc.py
- Split into region‑specific reports
python evaluation/parse_report_to_region.py
- Compute region‑level NLG metrics
python evaluation/hf_nlg_evaluation_region.py
- Compute region‑level CE metrics
python evaluation/ce_evaluator_ct2rep/ce_evaluation_region.py
You can fine‑tune the model on your own dataset using our pre‑trained checkpoint.
- Add your dataset class to
src/Dataset/, following the style of the existing datasets. - Create a config
[your_config_name].shinconfigs/train_radgenome/(copy and adjustconfigs/train_radgenome/jhcpu7.sh). - Run the training script:
cd scripts bash train_radgenome.sh [your_config_name]
If you find our work useful, please consider citing it:
@article{chen2025reg2rg,
title = {Large Language Model with Region-Guided Referring and Grounding for CT Report Generation},
author = {Chen, Zhixuan and Bie, Yequan and Jin, Haibo and Chen, Hao},
journal = {IEEE Transactions on Medical Imaging},
year = {2025},
publisher = {IEEE}
}This project builds on the RadFM repository and the LLaMA 2 model.
We sincerely thank the original authors for their invaluable contributions to the community.