Medical Image Segmentation with SAM-generated Annotations

Iira Häkkinen, Iaroslav Melekhov, Erik Englesson, Hossein Azizpour, Juho Kannala · DOI

Abstract

Medical image segmentation (MIS) is a critical task in radiology, yet it is frequently bottlenecked by the scarcity of high-quality, human-annotated datasets. This paper explores the potential of the Segment Anything Model (SAM) to act as an automated expert for generating training labels. By utilizing simple bounding box prompts to create pseudo-labels from 2D CT slices, the researchers trained a standard UNet architecture that achieves performance levels nearly identical to models trained on expert-annotated ground truth. The findings suggest that foundation models can effectively bypass the traditional data bottleneck in medical imaging through weakly-supervised learning.

Introduction

The precise delineation of organs and tumors in medical scans is essential for diagnosis and treatment planning. However, the "data bottleneck" remains a significant hurdle: creating accurate segmentation masks requires extensive time from specialized medical professionals, making large-scale datasets both rare and expensive.

While foundation models like the Segment Anything Model (SAM) have revolutionized general computer vision with their zero-shot capabilities, their direct application to the medical domain is often inconsistent. This research investigates a downstream application: using SAM’s imperfect "pseudo-labels" to train specialized, smaller models. The core question is whether a model can learn effectively from these automated annotations, thereby reducing or eliminating the need for human-led manual tracing.

Methodology

The researchers developed a pipeline that positions SAM as an annotation tool rather than a standalone medical segmenter. The process follows three primary stages:

  1. Pseudo-label Generation: The team processed 2D CT slices through a pre-trained SAM model. To identify the most effective way to guide the model, they tested various prompting strategies, including center points, interior points, and bounding boxes.
  2. Weakly-supervised Training: Instead of relying on gold-standard human labels, a standard UNet architecture was trained using only the masks generated by SAM. The study specifically focused on the bounding box prompt, as it offers a balance between minimal human effort and high spatial accuracy.
  3. Comparative Analysis: The performance of this weakly-supervised UNet was benchmarked against a fully supervised version (trained on human labels) and other state-of-the-art (SOTA) medical segmentation frameworks.

Experimental Setup and Datasets

The study utilized the Medical Segmentation Decathlon (MSD), a comprehensive benchmark for generalizable medical image segmentation. The evaluation focused on six Computed Tomography (CT) tasks representing a variety of anatomical challenges:

  • Large Organs: Liver and Spleen.
  • Complex/Small Structures: Pancreas and Hepatic Vessels.
  • Tumors: Lung and Colon.

This selection allowed the researchers to test the limits of SAM’s labeling accuracy across different scales and morphological complexities.

Key Insights and Discussion

The Efficiency of Bounding Boxes

Among the prompting strategies, bounding box prompts emerged as the "sweet spot." While iterative point prompts (adding positive and negative points) could slightly increase accuracy, the simple bounding box provided sufficient context for SAM to produce reliable masks with significantly less input effort than manual tracing.

Foundation Model Performance: SAM vs. MedSAM

In a surprising finding, the original general-purpose SAM (ViT-H) outperformed MedSAM—a version specifically fine-tuned for medical data—on the majority of tasks when using box prompts. This suggests that the massive scale and diversity of SAM’s original training data may provide better generalization capabilities than models narrowed down to specific medical datasets.

Robustness to Label Noise

Although SAM-generated pseudo-labels are not perfect and contain inherent "noise" compared to expert ground truth, the UNet trained on these labels proved remarkably robust. The neural network effectively filtered out the noise to learn the underlying signal, resulting in a final model that generalized well to unseen data.

Results

The experimental results highlight the viability of SAM-based annotation:

  • Minimal Performance Gap: The difference in Dice Similarity Coefficient (DSC) between fully supervised models and the SAM-trained UNet was negligible in many tasks. For instance, in the Spleen task, the performance gap was a mere 0.018 DSC.
  • Zero-Shot Capability: SAM with bounding box prompts achieved high zero-shot DSC scores for large organs, such as 0.926 for the Liver and 0.932 for the Spleen.
  • Competitive Standing: The weakly-supervised UNet performed on par with several fully-supervised SOTA models, including Trans VW and C2FNAS, across multiple MSD tasks.

Limitations and Future Directions

Despite the promising results, certain challenges remain. SAM continues to struggle with very small or highly irregular structures, such as hepatic vessels and small colon tumors, where pseudo-labels were less accurate. Furthermore, the current study processed 3D volumes as 2D slices, potentially missing out on volumetric context that 3D-native models could utilize.

Future work may focus on "human-in-the-loop" systems, where SAM generates initial masks that experts quickly refine. Preliminary estimates suggest this could accelerate the annotation process by 25% or more without compromising the accuracy required for clinical applications.

Summary updated

BibTeX
@inproceedings{hakkinen2024medical,
  author = {Iira Häkkinen and Iaroslav Melekhov and Erik Englesson and Hossein Azizpour and Juho Kannala},
  title = {{Medical Image Segmentation with SAM-generated Annotations}},
  booktitle = {Workshops @ ECCV},
  year = {2024},
  doi = {10.1007/978-3-031-92089-9\_4},
}
Figure