Register Anything: Estimating "Corresponding Prompts" for Segment Anything Model

Shiqi Huang, Tingfa Xu, Wen Yan, Dean C. Barratt, Yipeng Hu · DOI

Register Anything: Estimating "Corresponding Prompts" for Segment Anything Model

Introduction

Image registration—the process of aligning two or more images into a common coordinate system—is a cornerstone of medical diagnostics and remote sensing. Traditional approaches often rely on complex pixel-level matching or the alignment of pre-segmented Regions of Interest (ROIs). Recently, foundation models like the Segment Anything Model (SAM) have been explored for this task. However, standard methods like SAMReg are often inefficient; they segment random ROIs in two images independently and attempt to match them post-hoc, which frequently leads to correspondence errors.

This paper introduces PromptReg, a training-free framework that flips this paradigm. Instead of matching regions after segmentation, PromptReg asks: "If I place a prompt on a structure in Image A, what is the exact mathematical prompt needed in Image B for SAM to segment the same structure?"

Methods: Promptable Registration

PromptReg is a model-agnostic algorithm that requires zero fine-tuning. It achieves alignment through two core innovations:

  1. Inverse Prompt Searching: Given a point prompt in a source image, SAM generates a feature prototype. PromptReg uses a first-order Taylor expansion to map this prototype into the target image's feature space, mathematically "inverting" the prompt location. To ensure shape fidelity, the algorithm iteratively adds auxiliary point prompts based on the Hausdorff distance between the source and target contours.
  2. Prompt Marginalization: To improve robustness, the system samples multiple prompts and applies spatial augmentations (flipping, rotating, scaling). It then averages the resulting probability maps using Bayesian model averaging to create dense, accurate correspondences.

Datasets and Applications

The framework was rigorously evaluated across five primary datasets, spanning 3D medical volumes and 2D imagery. Notably, while baseline supervised models required 80% of the data for training, PromptReg operated entirely zero-shot on the test sets.

PromptReg demonstrates robust performance across a wide variety of imaging modalities, including MR, CT, pathology, and aerial satellite data.
  • Medical Imaging: Evaluated on MR-Prostate (inter-subject), MR-Abdomen (inter-subject), CT-Lung (intra-subject), and 2D-Pathology (histological alignment).
  • Aerial Imagery: Evaluated on a non-medical 2D-Aerial dataset to demonstrate generalizability.

Key Results

PromptReg consistently outperformed traditional iterative algorithms (e.g., NiftyReg), unsupervised learning methods (e.g., VoxelMorph, TransMorph), and prior SAM-based baselines.

  • Quantitative Performance: On the MR-Prostate dataset, PromptReg achieved a Dice score of 77.76, significantly outperforming the unsupervised VoxelMorph (55.94) and the previous SAMReg (75.67).
  • Competitive with Supervision: Remarkably, this training-free method achieved results competitive with weakly-supervised models that require expensive ground-truth annotations.
  • Scalability: The framework is model-agnostic. Swapping vanilla SAM for domain-specific models like MedSAM or 3DAdapter immediately improved performance on specialized 3D medical tasks.

Conclusion

PromptReg demonstrates that vision foundation models can be repurposed as powerful, zero-shot correspondence engines. By focusing on "prompt matching" rather than feature matching, the method provides a more controllable and accurate path for image registration across diverse modalities. Future work may focus on reducing the computational overhead of the iterative auxiliary prompt generation to further enhance real-time applicability.

Summary updated

BibTeX
@inproceedings{huang2025register,
  author = {Shiqi Huang and Tingfa Xu and Wen Yan and Dean C. Barratt and Yipeng Hu},
  title = {{Register Anything: Estimating "Corresponding Prompts" for Segment Anything Model}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2025},
  doi = {10.1007/978-3-032-04965-0\_44},
}
Figure