$\mathrm{SAM^{Med}}$: A medical image annotation framework based on large vision model

Chenglong Wang, Dexuan Li, Sucheng Wang, Chengxiu Zhang, Yida Wang, Yun Liu, Guang Yang

Abstract

Recently, large vision model, Segment Anything Model (SAM), has revolutionized the computer vision field, especially for image segmentation. SAM presented a new promptable segmentation paradigm that exhibit its remarkable zero-shot generalization ability. An extensive researches have explore the potential and limits of SAM in various downstream tasks. In this study, we presents $\mathrm{SAM^{Med}}$, an enhanced framework for medical image annotation that leverages the capabilities of SAM. $\mathrm{SAM^{Med}}$ framework consisted of two submodules, namely $\mathrm{SAM^{assist}}$ and $\mathrm{SAM^{auto}}$. The $\mathrm{SAM^{assist}}$ demonstrates the generalization ability of SAM to the downstream medical segmentation task using the prompt-learning approach. Results show a significant improvement in segmentation accuracy with only approximately 5 input points. The $\mathrm{SAM^{auto}}$ model aims to accelerate the annotation process by automatically generating input prompts. The proposed SAP-Net model achieves superior segmentation performance with only five annotated slices, achieving an average Dice coefficient of 0.80 and 0.82 for kidney and liver segmentation, respectively. Overall, $\mathrm{SAM^{Med}}$ demonstrates promising results in medical image annotation. These findings highlight the potential of leveraging large-scale vision models in medical image annotation tasks.

Introduction

Medical image annotation—the precise labeling of organs, tumors, or tissues in modalities like CT and MRI—is a critical yet resource-intensive bottleneck in healthcare AI. High-quality labels require expert knowledge and significant time. While the Segment Anything Model (SAM) has set new benchmarks in general image segmentation, its performance often degrades when applied to medical images due to the "domain gap." Medical scans are typically grayscale, low-contrast, and represent 3D volumes, contrasting sharply with the natural images SAM was trained on.

Existing adaptation methods often involve full fine-tuning, which is computationally prohibitive and demands large labeled datasets. $\mathrm{SAM^{Med}}$ addresses these challenges by introducing a two-pronged framework designed to make SAM "medical-aware" with minimal data and compute.

Overview of the SAM-Med framework, illustrating the interactive SAM-assist and automated SAM-auto submodules.

The $\mathrm{SAM^{Med}}$ Framework

The $\mathrm{SAM^{Med}}$ framework is divided into two specialized submodules: $\mathrm{SAM^{assist}}$ for interactive refinement and $\mathrm{SAM^{auto}}$ for automated batch processing.

$\mathrm{SAM^{assist}}$: Interactive Prompt-Learning

$\mathrm{SAM^{assist}}$ leverages a prompt-learning strategy. Instead of modifying the massive, frozen image encoder of SAM, the authors train only the lightweight prompt encoder. This approach allows the model to better interpret medical-specific visual cues from user-provided points or boxes. By tuning only the prompt perception, the system achieves high-fidelity segmentations with minimal user interaction—typically around 5 points. This method is highly efficient, with task-specific training taking as little as 10 to 25 seconds per case on a standard V100 GPU.

$\mathrm{SAM^{auto}}$: Automated Annotation

To further minimize human intervention, $\mathrm{SAM^{auto}}$ generates segmentation prompts automatically. It utilizes two primary strategies:

  1. Prompt Propagation: This method uses intensity consistency to transfer user-defined points from one slice of a 3D volume to adjacent slices.
  2. SAP-Net (Spatial-Aware Prototypical Network): A novel few-shot learner that adapts SAM's features using a specialized "tuner." Crucially, it incorporates positional encoding to maintain spatial context within 3D volumes. To optimize for clinical workflows, SAP-Net employs a biased Dice loss that specifically penalizes false positives, as these are more time-consuming for experts to correct than missing segments.
Detailed architecture of the SAM-auto submodule, showing the automated prompt generation and mask prediction pipeline.

Experimental Results

The framework was validated across eight public datasets covering CT, MRI, Ultrasound, and Histopathology. Key findings include:

  • Performance Gains: On the MultiOrgn-CT dataset, $\mathrm{SAM^{assist}}$ reached a Dice score of 79.2% with 10 points, significantly outperforming the base SAM's 70.4%.
  • Few-Shot Efficiency: $\mathrm{SAM^{auto}}$ (via SAP-Net) achieved an average Dice coefficient of 0.84 for kidney segmentation using only five annotated slices for training.
  • Compute Efficiency: The prompt-learning approach achieves results comparable to fully fine-tuned models like MedSAM but with a fraction of the training overhead.

Conclusion

$\mathrm{SAM^{Med}}$ demonstrates that large-scale vision models can be effectively adapted for specialized medical tasks without exhaustive retraining. By combining interactive prompt-learning with spatial-aware automated generation, the framework significantly reduces the annotation burden. Future work will focus on improving prompt propagation robustness in cases of complex anatomy where slice-to-slice consistency is lower.

Summary updated

Abstract

Recently, large vision model, Segment Anything Model (SAM), has revolutionized the computer vision field, especially for image segmentation. SAM presented a new promptable segmentation paradigm that exhibit its remarkable zero-shot generalization ability. An extensive researches have explore the potential and limits of SAM in various downstream tasks. In this study, we presents $\mathrm{SAM^{Med}}$, an enhanced framework for medical image annotation that leverages the capabilities of SAM. $\mathrm{SAM^{Med}}$ framework consisted of two submodules, namely $\mathrm{SAM^{assist}}$ and $\mathrm{SAM^{auto}}$. The $\mathrm{SAM^{assist}}$ demonstrates the generalization ability of SAM to the downstream medical segmentation task using the prompt-learning approach. Results show a significant improvement in segmentation accuracy with only approximately 5 input points. The $\mathrm{SAM^{auto}}$ model aims to accelerate the annotation process by automatically generating input prompts. The proposed SAP-Net model achieves superior segmentation performance with only five annotated slices, achieving an average Dice coefficient of 0.80 and 0.82 for kidney and liver segmentation, respectively. Overall, $\mathrm{SAM^{Med}}$ demonstrates promising results in medical image annotation. These findings highlight the potential of leveraging large-scale vision models in medical image annotation tasks.
BibTeX
@misc{wang2023mathrm,
  author = {Chenglong Wang and Dexuan Li and Sucheng Wang and Chengxiu Zhang and Yida Wang and Yun Liu and Guang Yang},
  title = {{$\textbackslash\{\}mathrm\{SAM^\{Med\}\}$: A medical image annotation framework based on large vision model}},
  year = {2023},
  eprint = {2307.05617},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.05617},
}
Figure