Skip to main content
QUICK REVIEW

[Paper Review] How to Efficiently Adapt Large Segmentation Model(SAM) to Medical Images

Xinrong Hu, Xiaowei Xu|arXiv (Cornell University)|Jun 23, 2023
Advanced Neural Network ApplicationsComputer Science29 citations
TL;DR

The paper finetunes only the SAM encoder with a lightweight, non-promptable prediction head (ViT AutoSAM, CNN, or Linear) to adapt SAM to medical image segmentation, enabling efficient few-shot learning and multi-class masks without prompts.

ABSTRACT

The emerging scale segmentation model, Segment Anything (SAM), exhibits impressive capabilities in zero-shot segmentation for natural images. However, when applied to medical images, SAM suffers from noticeable performance drop. To make SAM a real ``foundation model" for the computer vision community, it is critical to find an efficient way to customize SAM for medical image dataset. In this work, we propose to freeze SAM encoder and finetune a lightweight task-specific prediction head, as most of weights in SAM are contributed by the encoder. In addition, SAM is a promptable model, while prompt is not necessarily available in all application cases, and precise prompts for multiple class segmentation are also time-consuming. Therefore, we explore three types of prompt-free prediction heads in this work, include ViT, CNN, and linear layers. For ViT head, we remove the prompt tokens in the mask decoder of SAM, which is named AutoSAM. AutoSAM can also generate masks for different classes with one single inference after modification. To evaluate the label-efficiency of our finetuning method, we compare the results of these three prediction heads on a public medical image segmentation dataset with limited labeled data. Experiments demonstrate that finetuning SAM significantly improves its performance on medical image dataset, even with just one labeled volume. Moreover, AutoSAM and CNN prediction head also has better segmentation accuracy than training from scratch and self-supervised learning approaches when there is a shortage of annotations.

Motivation & Objective

  • Motivate the need to adapt SAM, a natural-image foundation model, to medical imaging domains.
  • Propose a lightweight fine-tuning strategy that freezes the SAM encoder and adds a prediction head for non-promptable, multi-class segmentation.
  • Evaluate three head architectures (ViT-based AutoSAM, CNN, and Linear) under limited labeled data.
  • Demonstrate label-efficient improvements over training from scratch and self-supervised baselines on a public medical image dataset.

Proposed method

  • Freeze SAM encoder weights and attach a lightweight, task-specific head for finetuning.
  • Replace the SAM mask decoder with a non-promptable head; enable multi-class masks by duplicating embeddings per class in AutoSAM.
  • Evaluate three head architectures: ViT-based AutoSAM, CNN-based head (UNet-like decoder), and Linear head.
  • Train with a small number of labeled volumes (1 or 5) using a mix of Cross-Entropy and Dice losses.
  • Compare against UNet trained from scratch and SimCLR-based self-supervised pretraining, as well as the original zero-shot SAM with box prompts.

Experimental results

Research questions

  • RQ1Can freezing SAM's encoder and adding a lightweight, non-promptable head achieve competitive segmentation on medical images with limited annotations?
  • RQ2Which head architecture (AutoSAM ViT, CNN, Linear) yields the best performance under few-shot settings?
  • RQ3Does AutoSAM enable efficient multi-class segmentation without prompts across medical datasets?

Key findings

  • Finetuning the SAM encoder with a lightweight head substantially improves medical segmentation with just one labeled volume.
  • AutoSAM and CNN heads outperform training from scratch and SimCLR in low-data regimes; Linear head underperforms due to underfitting.
  • AutoSAM (ViT-based head) and CNN head achieve higher Dice scores than other baselines, with AutoSAM often offering better ASSD.
  • Larger SAM encoder sizes (vit-h) generally improve results, though AutoSAM shows less sensitivity to encoder size than Encoder + CNN.
  • With increasing labeled data (5 volumes), performance gaps widen in favor of AutoSAM and CNN heads, especially for Dice scores.
  • AutoSAM can generate masks for multiple classes in one inference without prompts, by duplicating embeddings per class.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.