[ICLR 2025] This is the official repository of our paper "MedTrinity-25M: A Large-scale Multimodal Dataset with Multigranular Annotations for Medicine“
See the codeMedTrinity-25M: A Large-scale Multimodal Dataset with Multigranular Annotations for Medicine
Yunfei Xie*, Ce Zhou*, Lang Gao*, Juncheng Wu*, Xianhang Li, Hong-Yu Zhou, Sheng Liu, Lei Xing, James Zou, Cihang Xie, Yuyin Zhou
Star 🌟 us if you think it is helpful!!
You can view detailed statistics of MedTrinity-25M from this link.
Note: sometimes a single image contains multiple biological structures. The data only reflect the number of samples in which a specific biological structure is present.
| Dataset | 🤗 Huggingface Hub |
|---|---|
| MedTrinity-25M | UCSC-VLAA/MedTrinity-25M |
Using Linux system,
git clone https://github.com/UCSC-VLAA/MedTrinity-25M.git
conda create -n llava-med++ python=3.10 -y
conda activate llava-med++
pip install --upgrade pip # enable PEP 660 support
pip install -e .
pip install -e ".[train]"
pip install flash-attn --no-build-isolation
pip install git+https://github.com/bfshi/scaling_on_scales.git
pip install multimedeval
git pull
pip install -e .
# if you see some import errors when you upgrade,
# please try running the command below (without #)
# pip install flash-attn --no-build-isolation --no-cache-dir
The following table provides an overview of the available models in our zoo. For each model, you can find links to its Hugging Face page or Google drive folder.
| Model Name | Link | Summary | Evaluation Log |
|---|---|---|---|
| LLaVA-Med++ (VQA-RAD) | Hugging Face | Pretrained on LLaVA-Med Data and MedTrinity-25M (specifically the VQA-RAD training set subset), finetuning on VQA-RAD training set. | Log |
| LLaVA-Med++ (SLAKE) | Hugging Face | Pretrained on LLaVA-Med Data and MedTrinity-25M (specifically the SLAKE training set subset), finetuning on SLAKE training set. | Log |
| LLaVA-Med++ (PathVQA) | Hugging Face | Pretrained on LLaVA-Med Data and MedTrinity-25M (specifically the PathVQA training set subset), finetuning on PathVQA training set. | Log |
| LLaVA-Med-Captioner | Hugging Face | Captioner for generating multigranular annotations fine-tuned on MedTrinity-Instruct-200K (Coming soon). | - |
First, you need to download the base model LLaVA-Meta-Llama-3-8B-Instruct-FT-S2 and download the stage1 and stage2 datasets in the LLaVA-Med.
# stage1 training
cd MedTrinity-25M
bash ./scripts/med/llava3_med_stage1.sh
# stage2 training
bash ./scripts/med/llava3_med_stage2.sh
cd MedTrinity-25M
bash ./scripts/med/llava3_med_finetune.sh
cd MedTrinity-25M
bash ./scripts/med/llava3_med_eval_batch_vqa_rad.sh
Here is the evaluation suite of VQA-RAD, PathVQA, and SLAKE. [https://huggingface.co/yunfeixie/MedTrinity-25M-evalsuite](https://huggingface.co/yunfeixie/MedTrinity-25M-evalsuite
If you find MedTrinity-25M useful for your research and applications, please cite using this BibTeX:
@misc{xie2024medtrinity25mlargescalemultimodaldataset,
title={MedTrinity-25M: A Large-scale Multimodal Dataset with Multigranular Annotations for Medicine},
author={Yunfei Xie and Ce Zhou and Lang Gao and Juncheng Wu and Xianhang Li and Hong-Yu Zhou and Sheng Liu and Lei Xing and James Zou and Cihang Xie and Yuyin Zhou},
year={2024},
eprint={2408.02900},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2408.02900},
}
24 followers · starred Aug 2024
17 followers · starred Aug 2024
143 followers · starred Nov 2024
[ICLR 2025] This is the official repository of our paper "MedTrinity-25M: A Large-scale Multimodal Dataset with Multigranular Annotations for Medicine“
See the codeMedTrinity-25M: A Large-scale Multimodal Dataset with Multigranular Annotations for Medicine
Yunfei Xie*, Ce Zhou*, Lang Gao*, Juncheng Wu*, Xianhang Li, Hong-Yu Zhou, Sheng Liu, Lei Xing, James Zou, Cihang Xie, Yuyin Zhou
Star 🌟 us if you think it is helpful!!
You can view detailed statistics of MedTrinity-25M from this link.
Note: sometimes a single image contains multiple biological structures. The data only reflect the number of samples in which a specific biological structure is present.
| Dataset | 🤗 Huggingface Hub |
|---|---|
| MedTrinity-25M | UCSC-VLAA/MedTrinity-25M |
Using Linux system,
git clone https://github.com/UCSC-VLAA/MedTrinity-25M.git
conda create -n llava-med++ python=3.10 -y
conda activate llava-med++
pip install --upgrade pip # enable PEP 660 support
pip install -e .
pip install -e ".[train]"
pip install flash-attn --no-build-isolation
pip install git+https://github.com/bfshi/scaling_on_scales.git
pip install multimedeval
git pull
pip install -e .
# if you see some import errors when you upgrade,
# please try running the command below (without #)
# pip install flash-attn --no-build-isolation --no-cache-dir
The following table provides an overview of the available models in our zoo. For each model, you can find links to its Hugging Face page or Google drive folder.
| Model Name | Link | Summary | Evaluation Log |
|---|---|---|---|
| LLaVA-Med++ (VQA-RAD) | Hugging Face | Pretrained on LLaVA-Med Data and MedTrinity-25M (specifically the VQA-RAD training set subset), finetuning on VQA-RAD training set. | Log |
| LLaVA-Med++ (SLAKE) | Hugging Face | Pretrained on LLaVA-Med Data and MedTrinity-25M (specifically the SLAKE training set subset), finetuning on SLAKE training set. | Log |
| LLaVA-Med++ (PathVQA) | Hugging Face | Pretrained on LLaVA-Med Data and MedTrinity-25M (specifically the PathVQA training set subset), finetuning on PathVQA training set. | Log |
| LLaVA-Med-Captioner | Hugging Face | Captioner for generating multigranular annotations fine-tuned on MedTrinity-Instruct-200K (Coming soon). | - |
First, you need to download the base model LLaVA-Meta-Llama-3-8B-Instruct-FT-S2 and download the stage1 and stage2 datasets in the LLaVA-Med.
# stage1 training
cd MedTrinity-25M
bash ./scripts/med/llava3_med_stage1.sh
# stage2 training
bash ./scripts/med/llava3_med_stage2.sh
cd MedTrinity-25M
bash ./scripts/med/llava3_med_finetune.sh
cd MedTrinity-25M
bash ./scripts/med/llava3_med_eval_batch_vqa_rad.sh
Here is the evaluation suite of VQA-RAD, PathVQA, and SLAKE. [https://huggingface.co/yunfeixie/MedTrinity-25M-evalsuite](https://huggingface.co/yunfeixie/MedTrinity-25M-evalsuite
If you find MedTrinity-25M useful for your research and applications, please cite using this BibTeX:
@misc{xie2024medtrinity25mlargescalemultimodaldataset,
title={MedTrinity-25M: A Large-scale Multimodal Dataset with Multigranular Annotations for Medicine},
author={Yunfei Xie and Ce Zhou and Lang Gao and Juncheng Wu and Xianhang Li and Hong-Yu Zhou and Sheng Liu and Lei Xing and James Zou and Cihang Xie and Yuyin Zhou},
year={2024},
eprint={2408.02900},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2408.02900},
}
24 followers · starred Aug 2024
17 followers · starred Aug 2024
143 followers · starred Nov 2024