SAM-U: Multi-box Prompts Triggered Uncertainty Estimation for Reliable SAM in Medical Image

Guoyao Deng, Ke Zou, Kai Ren, Meng Wang, Xuedong Yuan, Sancong Ying, Huazhu Fu

Abstract

The Segment Anything Model (SAM) has demonstrated remarkable zero-shot generalization in natural image segmentation. However, its application in medical imaging is hindered by a lack of reliability and sensitivity to prompt variations. We present SAM-U, a framework that leverages multi-box prompt augmentation to estimate uncertainty. By generating a distribution of predictions from randomized box prompts, SAM-U produces a pixel-level uncertainty map and a more robust final segmentation. Evaluated on the REFUGE dataset for optic disc segmentation, SAM-U significantly improves accuracy and calibration, particularly under noisy or low-quality imaging conditions.

Introduction

Foundation models like Meta AI's Segment Anything Model (SAM) have revolutionized computer vision. Despite their power, medical imaging presents unique challenges: a significant domain gap from natural images and a critical need for reliability. In clinical settings, a model's "hard" mask is insufficient; clinicians require a measure of confidence to avoid dangerous misinterpretations. SAM is known to be highly sensitive to prompt coordinates. SAM-U turns this sensitivity into a feature by using multi-box prompting to estimate uncertainty, providing a "map of doubt" alongside the segmentation.

Methodology

The core of SAM-U is Multi-box Prompting (MNP), a test-time augmentation strategy designed to capture the uncertainty inherent in the prompting process.

  1. Prompt Augmentation: Instead of a single bounding box, $M$ randomized box prompts are generated, all encompassing the target object.
  2. Monte Carlo Simulation: The system runs SAM's mask decoder $M$ times, once for each box, creating a distribution of potential segmentation masks ($y^1, y^2, ..., y^M$).
  3. Uncertainty Mapping: By calculating the entropy across these multiple predictions, the authors generate an "Uncertainty Map." Areas where the masks disagree (typically at the edges of a lesion) show up as high-uncertainty zones.
  4. Final Prediction: The multiple predictions are aggregated to produce a final, more robust segmentation mask.
SAM-U Pipeline: From multi-box prompt augmentation to uncertainty mapping and final prediction.

Experimental Setup

The researchers evaluated SAM-U using the REFUGE Challenge dataset, focusing on segmenting the optic cup and disc in fundus photographs. To test the model's reliability under stress, they created two types of low-quality data: synthetic Gaussian noise at varying intensities ($\sigma = 0.05, 0.10$) and realistic clinical degradations simulated from real-world retinal photography artifacts.

Results

SAM-U demonstrates superior performance over standard SAM modes (Everything and single Box).

  • Accuracy Boost: On high-quality images using the ViT-L backbone, SAM-U achieved a Dice score of 0.751, outperforming the standard box mode (0.739) and the "everything" mode (0.438).
  • Robustness to Noise: The performance gap widened on noisy images. At a noise level of $\sigma=0.10$, SAM-U maintained much higher performance than standard SAM.
  • Lower Calibration Error: SAM-U consistently reduced Expected Calibration Error (ECE). For high-quality images, the ECE dropped from 0.050 to 0.013, a nearly 4x improvement in reliability, meaning the model's confidence better reflects its actual accuracy.
Qualitative comparison of SAM-U across different image qualities, showing the generated uncertainty maps.

Discussion and Conclusion

SAM-U effectively utilizes prompt variance as a proxy for uncertainty, mimicking the variability seen among multiple human experts. While it introduces additional computational overhead due to multiple decoder passes, it remains a zero-shot approach that requires no medical-specific retraining. By providing visual uncertainty maps, SAM-U offers a more transparent and reliable tool for clinical decision support. Future work is needed to determine if this multi-box prompting strategy is equally effective for complex 3D volumes like CT or MRI scans.

Summary updated

BibTeX
@inproceedings{deng2023sam,
  author = {Guoyao Deng and Ke Zou and Kai Ren and Meng Wang and Xuedong Yuan and Sancong Ying and Huazhu Fu},
  title = {{SAM-U: Multi-box Prompts Triggered Uncertainty Estimation for Reliable SAM in Medical Image}},
  booktitle = {MTSAIL/LEAF/AI4Treat/MMMI/REMIA @ MICCAI},
  year = {2023},
  doi = {10.1007/978-3-031-47425-5\_33},
}
Figure