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.
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
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
- MiniGPT-4 Some codes of this repo are based on MiniGPT-4.
- Llama2 The fantastic language ability of Llama-2 with only 7B parameters is just amazing.
This repository is under BSD 3-Clause License.