Skip to main content
QUICK REVIEW

[Paper Review] 3DSAM-adapter: Holistic adaptation of SAM from 2D to 3D for promptable tumor segmentation

Shizhan Gong, Yuan Zhong|arXiv (Cornell University)|Jun 23, 2023
Advanced Neural Network ApplicationsComputer Science32 citations
TL;DR

The paper presents a holistic, parameter-efficient 2D-to-3D adaptation of SAM for volumetric medical tumor segmentation, achieving state-of-the-art results with minimal tunable parameters and a single prompt per volume.

ABSTRACT

Despite that the segment anything model (SAM) achieved impressive results on general-purpose semantic segmentation with strong generalization ability on daily images, its demonstrated performance on medical image segmentation is less precise and not stable, especially when dealing with tumor segmentation tasks that involve objects of small sizes, irregular shapes, and low contrast. Notably, the original SAM architecture is designed for 2D natural images, therefore would not be able to extract the 3D spatial information from volumetric medical data effectively. In this paper, we propose a novel adaptation method for transferring SAM from 2D to 3D for promptable medical image segmentation. Through a holistically designed scheme for architecture modification, we transfer the SAM to support volumetric inputs while retaining the majority of its pre-trained parameters for reuse. The fine-tuning process is conducted in a parameter-efficient manner, wherein most of the pre-trained parameters remain frozen, and only a few lightweight spatial adapters are introduced and tuned. Regardless of the domain gap between natural and medical data and the disparity in the spatial arrangement between 2D and 3D, the transformer trained on natural images can effectively capture the spatial patterns present in volumetric medical images with only lightweight adaptations. We conduct experiments on four open-source tumor segmentation datasets, and with a single click prompt, our model can outperform domain state-of-the-art medical image segmentation models on 3 out of 4 tasks, specifically by 8.25%, 29.87%, and 10.11% for kidney tumor, pancreas tumor, colon cancer segmentation, and achieve similar performance for liver tumor segmentation. We also compare our adaptation method with existing popular adapters, and observed significant performance improvement on most datasets.

Motivation & Objective

  • Address SAM's suboptimal and unstable performance on 3D medical tumor segmentation due to domain and dimensional gaps.
  • Holistically adapt SAM to handle volumetric inputs while reusing pre-trained weights as much as possible.
  • Develop parameter-efficient fine-tuning and lightweight adapters to bridge 2D pretraining to 3D medical data.
  • Improve robustness to prompts and maintain high segmentation accuracy across multiple tumor datasets.

Proposed method

  • Modify image encoder to accept volumetric inputs with minimal parameter changes, including 3D patch embedding, 3D positional encoding, and 3D attention blocks with memory-efficient strategies.
  • Introduce lightweight spatial adapters for fine-tuning, freezing most SAM weights and training only adapters and normalization layers.
  • Replace prompt encoding with a visual sampler that fetches embeddings from the image feature map and use a small set of global queries with cross-attention to mitigate token explosion and noise from prompts.
  • Update mask decoder to a lightweight 3D CNN with multi-layer aggregation to produce high-resolution 3D masks.
  • Train with single or few point prompts per volume, including background foreground sampling to improve robustness to noisy prompts.
Figure 1: Overview of our proposed method for 3DSAM-adapter. The original ViT is modified to support volumetric inputs. The prompt encoder is redesigned to support 3D point prompt, and the mask decoder is updated to 3D CNN with multi-layer aggregation to generate 3D segmentation.
Figure 1: Overview of our proposed method for 3DSAM-adapter. The original ViT is modified to support volumetric inputs. The prompt encoder is redesigned to support 3D point prompt, and the mask decoder is updated to 3D CNN with multi-layer aggregation to generate 3D segmentation.

Experimental results

Research questions

  • RQ1Can a holistic 2D-to-3D adaptation of SAM retain pre-trained knowledge while effectively encoding 3D spatial patterns for medical volumes?
  • RQ2Does a visual-sampler-based prompt encoding outperform traditional positional encodings in 3D medical segmentation under limited prompts?
  • RQ3How does multi-layer aggregation in a 3D mask decoder affect segmentation accuracy on small, low-contrast tumors?
  • RQ4What is the trade-off between tunable parameter count and segmentation performance compared to full fine-tuning and other adapters in volumetric tumor segmentation?

Key findings

  • Ours (1 prompt per volume) achieves Dice scores: Kidney 73.78 and NSD 83.86; Pancreas 54.09 and 76.27; Liver 54.78 and 69.55; Colon 48.35 and 63.65.
  • Ours with 3 prompts per volume achieves Dice 74.91, NSD 84.35 (Kidney 75.??, Pancreas 54.92, Liver 77.57, Colon 56.30, per table), illustrating improved performance with more prompts.
  • Compared to state-of-the-art baselines (nnU-Net, etc.), the proposed method often surpasses on three of four datasets, with substantial gains on pancreas and colon cancer tasks.
  • Our approach outperforms existing adapters and full fine-tuning baselines with only 16.96% tunable parameters of the original model, demonstrating high parameter efficiency.
  • Visual-sampler prompt encoding significantly outperforms positional encoding (Dice improvement around 40% in KiTS21 ablation).
  • Multi-layer aggregation in the mask decoder yields ~15.75% Dice improvement over non-aggregated variants.
Figure 2: Spatial adapter.
Figure 2: Spatial adapter.

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.