Segment anything model for medical image analysis: An experimental study

Maciej A Mazurowski, Haoyu Dong, Hanxue Gu, Jichen Yang, Nicholas Konz, Yixin Zhang

TL;DR

This paper provides the first extensive "stress test" of Meta’s Segment Anything Model (SAM) across the medical imaging domain. By evaluating SAM on 19 diverse datasets, the researchers found that while SAM shows impressive zero-shot capabilities—particularly when using bounding boxes—its performance is highly inconsistent and often surpassed by specialized medical models during iterative refinement.

What Problem Does This Paper Address?

Image segmentation—the process of outlining organs, tumors, or bones—is a cornerstone of medical AI. However, training these models usually requires massive amounts of hand-labeled data, which is expensive and requires expert radiologist time.

The "Segment Anything Model" (SAM) arrived as a potential "foundation model" for computer vision, trained on 1.1 billion masks of natural images (cats, cars, trees). The big question this paper tackles is: Can a model trained on everyday photos "zero-shot" its way into the clinic? Medical images have different textures, lower contrast, and higher stakes than natural images. The authors aim to quantify exactly where SAM succeeds and where it fails in a clinical context.

Methods

The researchers didn't just run SAM once; they tested it across five different prompting strategies to simulate how a human might interact with the tool:

  1. Single Point: One click at the center of the largest region.
  2. Points for Each Region: One click for every disconnected part of an object.
  3. Single Box: One bounding box around the largest region.
  4. Boxes for Each Region: Individual boxes for every part (e.g., if a liver appears as two separate pieces in a 2D slice).
  5. Entire Object Box: One box encompassing everything.

They also simulated iterative prompting, where the model receives a click, makes a prediction, and then receives a corrective click on the area it missed most. Finally, they compared SAM against three state-of-the-art interactive segmentation models specifically designed for efficiency: RITM, SimpleClick, and FocalClick.

Datasets

The study utilized a massive collection of 19 publicly available datasets covering 28 distinct segmentation tasks. This included:

  • Modalities: MRI, CT, X-ray, Ultrasound, and PET.
  • Anatomies: Brain (tumors/edema), Heart, Spine, Prostate, Breast, Chest, Hip, Kidney, Muscle, Nerve, Liver, Pancreas, and Spleen.
  • Scale: Over 12,000 masks for brain tumors alone, down to smaller sets like hip X-rays.

Key Insights and Ideas

  • Boxes Beat Clicks: SAM is significantly more accurate when given a bounding box than a point. This suggests SAM’s internal "objectness" is better triggered by knowing the spatial extent of an organ rather than just a single coordinate.
  • The "First Click" Advantage: In a single-point scenario, SAM actually outperforms specialized medical models. It has a very strong "out of the box" intuition for what constitutes a distinct object.
  • Diminishing Returns on Iteration: Surprisingly, SAM doesn't "learn" from extra clicks as well as its competitors. While models like RITM improve drastically with 5–9 clicks, SAM’s performance plateaus quickly. It seems SAM is "stubborn" about its initial zero-shot guess.
  • Ambiguity is a Feature: Medical images are often ambiguous (is that a tumor or just a shadow?). SAM’s ability to output multiple valid masks for a single prompt is highly valuable in a medical context, allowing a doctor to pick the "correct" interpretation.

Key Results

  • Performance Variance: Results were a rollercoaster. SAM achieved an impressive IoU of 0.8650 for hip X-rays but a dismal 0.1135 for spine MRI.
  • Best Mode: "Mode 4" (one box for each separate part of an object) was the clear winner, yielding an average IoU of 0.6542 across all tasks.
  • Zero-Shot vs. Specialized: While SAM won the "single-click" battle, specialized models like SimpleClick eventually surpassed it once 5 or more clicks were provided.
  • Object Size Matters: There is a small but notable correlation between the size of the organ and SAM's performance; it generally struggles more with tiny, faint structures.

Limitations and Future Work

The authors highlight several hurdles for SAM in the medical field:

  1. The Domain Gap: SAM was trained on natural light photos. It lacks "medical common sense"—it doesn't know that a liver should be a certain shape or that a tumor shouldn't have jagged edges.
  2. 2D vs. 3D: SAM is a 2D model. Most medical data (CT/MRI) is 3D. Using SAM requires processing slice-by-slice, which misses out on crucial volumetric information.
  3. Fine-tuning is Necessary: The authors conclude that while SAM is a great starting point, it likely needs to be fine-tuned on medical-specific data (Med-SAM) to be truly reliable for clinical use.

Future work will likely focus on "Medical Prompt Engineering" and developing 3D versions of foundation models that can handle the complexities of human anatomy.

Summary updated

BibTeX
@article{mazurowski2023segment,
  author = {Maciej A Mazurowski and Haoyu Dong and Hanxue Gu and Jichen Yang and Nicholas Konz and Yixin Zhang},
  title = {{Segment anything model for medical image analysis: An experimental study}},
  journal = {Medical Image Analysis},
  year = {2023},
  url = {https://openreview.net/forum?id=5RuCR0fYZG},
}
Figure