This is the official repository for our paper:
"Are Vision Foundation Models Ready for Out-of-the-Box Medical Image Registration?" π Paper Link
Author: Hanxue Gu*, Yaqian Chen*, Nick Konz, Qihang Li and Maciej A. Mazurowski
This repository implements a training-free (zero-shot) medical image registration pipeline using vision foundation models as feature encoders. We evaluate five different models:
Each model is used to extract image features that are then aligned using a training-free registration optimization pipelineβno fine-tuning required. Though our paper is heavily focused on breast image registration, we excited to see how it can be extended into other tasks!
# Create and activate a clean conda environment
conda create -n dinov2 python=3.10 -y
conda activate dinov2
# Install PyTorch with CUDA 11.7
pip install torch==2.0.0+cu117 torchvision==0.15.0+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
# Install dependencies
pip install torchmetrics==0.10.3 timm opencv-python
# Install DINOv2
pip install git+https://github.com/facebookresearch/dinov2.git
# Install other required libraries
pip install -r requirements.txt
.nii.gz files under a directory, for example: sample_dataset_dir/task.csv file that defines each image pair for registration, with columns:
mov_volume: moving imagefix_volume: fixed imageβ
You can refer to the provided sample_dataset_dir/ for a template and example setup.
Edit the configuration file for your experiment. You can choose different models and adjust paths:
Key config fields:
exp_note: A name for your experimentmodel_ver: One of:
'sam''dino-v2''sslsam''medsam''biomedclip-sam''MIND' (classic handcrafted feature)data_dir: The path to your datasetsave_feature: Set to 'True' to save extracted features for reuseπ Example config files are provided in the repo to help you get started quickly.
python inference_reg.py --cfg config-dinov2-task1.py
You can validate and visualize registration performance using the following tools:
vis_result.ipynbeval_dsc.ipynbeval_dsc.ipynbThis work is heavily developed based on the excellent DINO-reg repository. Big thanks to the original authors for their contributions to cross-modality medical image registration.
We are currently releasing the zero-shot, image-only registration pipeline.
Feel free to βοΈ this repo, and cite our work if you find this repo helpful!
@misc{gu2025visionfoundationmodelsready,
title={Are Vision Foundation Models Ready for Out-of-the-Box Medical Image Registration?},
author={Hanxue Gu and Yaqian Chen and Nicholas Konz and Qihang Li and Maciej A. Mazurowski},
year={2025},
eprint={2507.11569},
archivePrefix={arXiv},
primaryClass={eess.IV},
url={https://arxiv.org/abs/2507.11569},
}
15 commits
Python
98.8%
Jupyter Notebook
1.2%
This is the official repository for our paper:
"Are Vision Foundation Models Ready for Out-of-the-Box Medical Image Registration?" π Paper Link
Author: Hanxue Gu*, Yaqian Chen*, Nick Konz, Qihang Li and Maciej A. Mazurowski
This repository implements a training-free (zero-shot) medical image registration pipeline using vision foundation models as feature encoders. We evaluate five different models:
Each model is used to extract image features that are then aligned using a training-free registration optimization pipelineβno fine-tuning required. Though our paper is heavily focused on breast image registration, we excited to see how it can be extended into other tasks!
# Create and activate a clean conda environment
conda create -n dinov2 python=3.10 -y
conda activate dinov2
# Install PyTorch with CUDA 11.7
pip install torch==2.0.0+cu117 torchvision==0.15.0+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
# Install dependencies
pip install torchmetrics==0.10.3 timm opencv-python
# Install DINOv2
pip install git+https://github.com/facebookresearch/dinov2.git
# Install other required libraries
pip install -r requirements.txt
.nii.gz files under a directory, for example: sample_dataset_dir/task.csv file that defines each image pair for registration, with columns:
mov_volume: moving imagefix_volume: fixed imageβ
You can refer to the provided sample_dataset_dir/ for a template and example setup.
Edit the configuration file for your experiment. You can choose different models and adjust paths:
Key config fields:
exp_note: A name for your experimentmodel_ver: One of:
'sam''dino-v2''sslsam''medsam''biomedclip-sam''MIND' (classic handcrafted feature)data_dir: The path to your datasetsave_feature: Set to 'True' to save extracted features for reuseπ Example config files are provided in the repo to help you get started quickly.
python inference_reg.py --cfg config-dinov2-task1.py
You can validate and visualize registration performance using the following tools:
vis_result.ipynbeval_dsc.ipynbeval_dsc.ipynbThis work is heavily developed based on the excellent DINO-reg repository. Big thanks to the original authors for their contributions to cross-modality medical image registration.
We are currently releasing the zero-shot, image-only registration pipeline.
Feel free to βοΈ this repo, and cite our work if you find this repo helpful!
@misc{gu2025visionfoundationmodelsready,
title={Are Vision Foundation Models Ready for Out-of-the-Box Medical Image Registration?},
author={Hanxue Gu and Yaqian Chen and Nicholas Konz and Qihang Li and Maciej A. Mazurowski},
year={2025},
eprint={2507.11569},
archivePrefix={arXiv},
primaryClass={eess.IV},
url={https://arxiv.org/abs/2507.11569},
}
15 commits
Python
98.8%
Jupyter Notebook
1.2%