git clone https://github.com/PiggyJerry/MammoVQA.git
cd MammoVQA
conda create -n mammovqa python==3.9
conda activate mammovqa
python -m pip install -r requirements.txtSub-Datasets downloading URL:
The json file of MammoVQA can be found in Google Drive, after downloading it, unzip the file and put under /Benchmark/.
After downloaded sub-datasets above, you have to use the correspoding processing code for it. Remember to change the dataset link in the code!!!
If you only want to evaluate your model on MammoVQA, you can skip it.
Please follow the repositories of compared LVLMs (BLIP-2\InstructBLIP,LLaVA-Med,LLaVA-NeXT-interleave,Med-Flamingo,MedDr,MedVInT_TD,minigpt-4,RadFM to prepare the weights and environments.
❗All the LLM weights should be put under MammoVQA/LLM/, except the weight of MedVInT_TD should be put under MammoVQA/Sota/MedVInT_TD/results/ and the weight of RadFM should be put under MammoVQA/Sota/RadFM-main/Quick_demo/.
You can finetune DiNOv2 on our MammoVQA training dataset and evaluate it on our test dataset.
- S1. Download the DiNOv2 pre-trained weight here[https://github.com/facebookresearch/dinov2], and modify the DiNOv2 weight's path in the 67 line of
/MammoVQA/finetune/DiNOv2/models/image_encoder.py. - S2.
python /MammoVQA/finetune/DiNOv2/main.pyto train the model. - S3.
python /MammoVQA/finetune/DiNOv2/eval.pyto evaluate the model, and you can get the result file in/MammoVQA/Result/DiNOv2.json. - S4.
python /MammoVQA/Eval/Visiononly.pyto calculate metrics.
For quick start, you can check the Quick_demo path.
We demonstrate a simple diagnosis case here to show how to inference on MammoVQA with our LLaVA-Mammo.
Feel free to modify it as you want.
- S1. Download Model checkpoint of LLaVA-Mammo, and unzip it to
Quick_demopath. - S2.
python /MammoVQA/Quick_demo/eval.pyto inference, and you can get the result file in/MammoVQA/Result/LLaVA-Mammo.json. - S3.
python /MammoVQA/Eval/LLM.pyto calculate metrics.
@article{zhu2025benchmark,
title={A Benchmark for Breast Cancer Screening and Diagnosis in Mammogram Visual Question Answering},
author={Zhu, Jiayi and Huang, Fuxiang and Luo, Qiong and Chen, Hao},
journal={Nature Communications},
year={2025},
publisher={Nature Publishing Group UK London}
}