Home

Awesome

R2GenGPT: Radiology Report Generation with Frozen LLMs

Introduction

overview

Getting Started

Installation

1. Prepare the code and the environment

Git clone our repository and install the requirements.

https://github.com/wang-zhanyu/R2GenGPT.git
cd R2GenGPT
pip install -r requirements.txt

2. Prepare the training dataset

IU-xray: download the dataset from here

Mimic-cxr: you can download our preprocess annotation file from here and download the images from official website

After downloading the data, place it in the ./data folder.

Training

For shallow alignment

bash scripts/4-1.shallow_run.sh

For delta alignment

bash scripts/5-1.delta_run.sh

For deep alignment

bash scripts/6-1.deep_run.sh

Testing (For MIMIC-CXR)

You can download our pretrained Delta checkpoints for Here

For shallow alignment

bash scripts/4-2.shallow_test.sh

For delta alignment

bash scripts/5-2.delta_test.sh

For deep alignment

bash scripts/6-2.shallow_test.sh

Acknowledgement

License

This repository is under BSD 3-Clause License.