Skip to main content
QUICK REVIEW

[Paper Review] AutoSAM: Adapting SAM to Medical Images by Overloading the Prompt Encoder

Tal Shaharabany, Aviad Dahan|arXiv (Cornell University)|Jun 10, 2023
Advanced Neural Network ApplicationsComputer Science39 citations
TL;DR

AutoSAM replaces SAM’s prompt encoder with a learned image-conditioned encoder, enabling fully automatic medical image segmentation without fine-tuning SAM, and achieves state-of-the-art results across multiple medical datasets.

ABSTRACT

The recently introduced Segment Anything Model (SAM) combines a clever architecture and large quantities of training data to obtain remarkable image segmentation capabilities. However, it fails to reproduce such results for Out-Of-Distribution (OOD) domains such as medical images. Moreover, while SAM is conditioned on either a mask or a set of points, it may be desirable to have a fully automatic solution. In this work, we replace SAM's conditioning with an encoder that operates on the same input image. By adding this encoder and without further fine-tuning SAM, we obtain state-of-the-art results on multiple medical images and video benchmarks. This new encoder is trained via gradients provided by a frozen SAM. For inspecting the knowledge within it, and providing a lightweight segmentation solution, we also learn to decode it into a mask by a shallow deconvolution network.

Motivation & Objective

  • Address the domain gap between SAM (trained on natural images) and medical images.
  • Develop an automatic prompting mechanism that uses the image itself as input to a trained encoder.
  • Maintain the frozen SAM backbone to avoid re-training core components while improving segmentation in medical domains.
  • Demonstrate state-of-the-art performance on diverse medical segmentation benchmarks.

Proposed method

  • Replace SAM’s prompt encoder with a learned prompt generator g that takes the input image I and outputs prompts Z_I for SAM.
  • Train g end-to-end by propagating gradients through the frozen SAM using segmentation losses: L_seg = L_BCE + L_dice.
  • Backbone of g is Harmonic Dense Net (HarDNet) with six HarD blocks and a lightweight decoder producing 64x64 resolution.
  • Use a lightweight surrogate decoder h to map g(I) to a mask for inspection, trained with a similar segmentation loss.
  • Compute performance with standard segmentation metrics (IoU, Dice) and, for video, six metrics including Dice, Sen, F-measure, F^w, S_alpha, E_phi.
  • Provide extensive experiments across MoNuSeg, GlaS, Kvasir-SEG, ClinicDB, ColonDB, ETIS, and SUN-SEG datasets.

Experimental results

Research questions

  • RQ1Can a fully automatic segmentation solution be built by overloading SAM’s prompt encoder with an image-conditioned prompt generator?
  • RQ2How does replacing the prompt encoder (without fine-tuning SAM) affect segmentation accuracy on medical images and videos?
  • RQ3What are the comparative gains of AutoSAM versus state-of-the-art medical segmentation methods across diverse datasets?

Key findings

  • AutoSAM achieves state-of-the-art results on multiple medical segmentation benchmarks, outperforming methods like Medical Transformer, 3P-SEG, and MedAdaptorSAM on MoNuSeg and GlaS.
  • On the MoNuSeg dataset, AutoSAM surpasses all baselines in Dice and Mean-IoU metrics (specific values reported in the paper).
  • On the GlaS gland segmentation task, AutoSAM exceeds prior methods by a notable margin in IoU and Dice.
  • AutoSAM also delivers strong performance on polyp segmentation datasets (Kvasir-SEG, ClinicDB, ColonDB, ETIS) and on SUN-SEG video polyp segmentation, often achieving state-of-the-art results across metrics.
  • The lightweight decoder h(g(I)) provides a reasonable segmentation mask and demonstrates the information content encoded by g, though not as strong as the full AutoSAM output.
  • Replacing SAM’s prompt encoder with the learned image-conditioned encoder yields substantial gains without any fine-tuning of SAM’s core components.

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.