Authors: Chantal Pellegrini, Ege Özsoy, Benjamin Busam, Nassir Navab, Matthias Keicher
✨ News ✨
Conversational AI tools that can generate and discuss clinically correct radiology reports for a given medical image have the potential to transform radiology. Such a human-in-the-loop radiology assistant could facilitate a collaborative diagnostic process, thus saving time and improving the quality of reports. Towards this goal, we introduce RaDialog, the first thoroughly evaluated and publicly available large vision-language model for radiology report generation and interactive dialog. RaDialog effectively integrates visual image features and structured pathology findings with a large language model (LLM) while simultaneously adapting it to a specialized domain using parameter-efficient fine-tuning. To keep the conversational abilities of the underlying LLM, we propose a comprehensive, semi-automatically labeled, image-grounded instruct dataset for chest X-ray radiology tasks. By training with this dataset, our method achieves state-of-the-art clinical correctness in report generation and shows impressive abilities in interactive tasks such as correcting reports and answering questions, serving as a foundational step toward clinical dialog systems.
cd RaDialogconda create --name radialog python=3.7conda activate radialogpip install -r requirements.txtpip install hi-ml-multimodal==0.2.0pip install torch==1.13.0 transformers==4.28.1conda create --name chexbert python=3.7conda activate chexbertcd chexbertpip install -r requirements.txtRaDialog/local_config.pycd mimic-cxrpython create_section_files.py to prepare the report datacd ..local_config.py.Data for RaDialog-RG:
python -m data.create_data --mode "RG" to generate the report generation dataset in the required format (no instruct data)Data for RaDialog-INS:
python -m data.create_data --mode "INS" to generate the instruct datasetpython demo.py --cfg-path pretraining/configs/blip2_pretrain_stage1_emb.yaml to start the demohttp://127.0.0.1:7860 and start chatting with RaDialogpython test.py --prompt img_matching_examples_ig2_noexamples_IMG_findings --use_embs --num_workers 0 --lora_model checkpoints/vicuna-7b-img-report/checkpoint-11200python test.py --prompt img_matching_examples_ig2_noexamples_IMG_findings --use_embs --num_workers 0 --lora_model checkpoints/vicuna-7b-img-instruct/checkpoint-4800python test.py --prompt img_matching_examples_ig2_noexamples_IMG_findings --use_embs --num_workers 0 --lora_model checkpoints/vicuna-7b-img-instruct/checkpoint-4800 --do_corrpython test.py --prompt img_matching_examples_ig2_noexamples_IMG_findings --use_embs --num_workers 0 --lora_model checkpoints/vicuna-7b-img-instruct/checkpoint-4800 --do_cp_all_qa (or --do_cp_bin_qa)python -m findings_classifier.chexpert_train --train --run_name "train_chexbert"python -m findings_classifier.chexpert_train --run_name "save_preds" to save the predictions of the trained modelpython -m pretraining.train --cfg-path pretraining/configs/blip2_pretrain_stage1.yaml, we used the 4th epoch checkpointpython -m pretraining.train --cfg-path pretraining/configs/blip2_pretrain_stage1_emb.yaml, to save the embeddings of the trained modelTrain RaDialog-RG:
python finetune.py --use_embs True --base_model 'vicuna_v7' --output_dir 'checkpoints/lora-vicuna-7b-report' --wandb_run_name lora-vicuna-7b-report --prompt_template_name vicuna_v11 --data_path "data/data_files/mimic_cxr_reports_stratified.json" --cutoff_len 600 --num_epochs 10Train RaDialog-INS:
python finetune.py --use_embs True --base_model 'vicuna_v7' --output_dir 'checkpoints/lora-vicuna-7b-instruct' --wandb_run_name lora-vicuna-7b-instruct --prompt_template_name vicuna_v11 --data_path "data/data_files/mimic_cxr_instruct_stratified.json" --cutoff_len 800 --num_epochs 10To use a model from a checkpoint, you'll need to perform the following steps:
When using our model or dataset, please cite:
@inproceedings{pellegrini2025radialog,
title={RaDialog: Large Vision-Language Models for X-Ray Reporting and Dialog-Driven Assistance},
author={Pellegrini, Chantal and {\"O}zsoy, Ege and Busam, Benjamin and Wiestler, Benedikt and Navab, Nassir and Keicher, Matthias},
booktitle={Medical Imaging with Deep Learning},
year={2025}
}
Python
100.0%
Authors: Chantal Pellegrini, Ege Özsoy, Benjamin Busam, Nassir Navab, Matthias Keicher
✨ News ✨
Conversational AI tools that can generate and discuss clinically correct radiology reports for a given medical image have the potential to transform radiology. Such a human-in-the-loop radiology assistant could facilitate a collaborative diagnostic process, thus saving time and improving the quality of reports. Towards this goal, we introduce RaDialog, the first thoroughly evaluated and publicly available large vision-language model for radiology report generation and interactive dialog. RaDialog effectively integrates visual image features and structured pathology findings with a large language model (LLM) while simultaneously adapting it to a specialized domain using parameter-efficient fine-tuning. To keep the conversational abilities of the underlying LLM, we propose a comprehensive, semi-automatically labeled, image-grounded instruct dataset for chest X-ray radiology tasks. By training with this dataset, our method achieves state-of-the-art clinical correctness in report generation and shows impressive abilities in interactive tasks such as correcting reports and answering questions, serving as a foundational step toward clinical dialog systems.
cd RaDialogconda create --name radialog python=3.7conda activate radialogpip install -r requirements.txtpip install hi-ml-multimodal==0.2.0pip install torch==1.13.0 transformers==4.28.1conda create --name chexbert python=3.7conda activate chexbertcd chexbertpip install -r requirements.txtRaDialog/local_config.pycd mimic-cxrpython create_section_files.py to prepare the report datacd ..local_config.py.Data for RaDialog-RG:
python -m data.create_data --mode "RG" to generate the report generation dataset in the required format (no instruct data)Data for RaDialog-INS:
python -m data.create_data --mode "INS" to generate the instruct datasetpython demo.py --cfg-path pretraining/configs/blip2_pretrain_stage1_emb.yaml to start the demohttp://127.0.0.1:7860 and start chatting with RaDialogpython test.py --prompt img_matching_examples_ig2_noexamples_IMG_findings --use_embs --num_workers 0 --lora_model checkpoints/vicuna-7b-img-report/checkpoint-11200python test.py --prompt img_matching_examples_ig2_noexamples_IMG_findings --use_embs --num_workers 0 --lora_model checkpoints/vicuna-7b-img-instruct/checkpoint-4800python test.py --prompt img_matching_examples_ig2_noexamples_IMG_findings --use_embs --num_workers 0 --lora_model checkpoints/vicuna-7b-img-instruct/checkpoint-4800 --do_corrpython test.py --prompt img_matching_examples_ig2_noexamples_IMG_findings --use_embs --num_workers 0 --lora_model checkpoints/vicuna-7b-img-instruct/checkpoint-4800 --do_cp_all_qa (or --do_cp_bin_qa)python -m findings_classifier.chexpert_train --train --run_name "train_chexbert"python -m findings_classifier.chexpert_train --run_name "save_preds" to save the predictions of the trained modelpython -m pretraining.train --cfg-path pretraining/configs/blip2_pretrain_stage1.yaml, we used the 4th epoch checkpointpython -m pretraining.train --cfg-path pretraining/configs/blip2_pretrain_stage1_emb.yaml, to save the embeddings of the trained modelTrain RaDialog-RG:
python finetune.py --use_embs True --base_model 'vicuna_v7' --output_dir 'checkpoints/lora-vicuna-7b-report' --wandb_run_name lora-vicuna-7b-report --prompt_template_name vicuna_v11 --data_path "data/data_files/mimic_cxr_reports_stratified.json" --cutoff_len 600 --num_epochs 10Train RaDialog-INS:
python finetune.py --use_embs True --base_model 'vicuna_v7' --output_dir 'checkpoints/lora-vicuna-7b-instruct' --wandb_run_name lora-vicuna-7b-instruct --prompt_template_name vicuna_v11 --data_path "data/data_files/mimic_cxr_instruct_stratified.json" --cutoff_len 800 --num_epochs 10To use a model from a checkpoint, you'll need to perform the following steps:
When using our model or dataset, please cite:
@inproceedings{pellegrini2025radialog,
title={RaDialog: Large Vision-Language Models for X-Ray Reporting and Dialog-Driven Assistance},
author={Pellegrini, Chantal and {\"O}zsoy, Ege and Busam, Benjamin and Wiestler, Benedikt and Navab, Nassir and Keicher, Matthias},
booktitle={Medical Imaging with Deep Learning},
year={2025}
}
Python
100.0%