[Paper Review] MaskSAM: Towards Auto-prompt SAM with Mask Classification for Volumetric Medical Image Segmentation
MaskSAM proposes a prompt-free, mask classification-aware adaptation of the Segment Anything Model (SAM) for 3D volumetric medical image segmentation. By introducing a learnable prompt generator that produces auxiliary masks, boxes, and classifier tokens, and integrating 3D depth-convolution and depth-MLP adapters into SAM's transformer blocks, the method achieves state-of-the-art 90.52% Dice on AMOS2022, outperforming nnUNet by 2.7%.
Segment Anything Model (SAM), a prompt-driven foundation model for natural image segmentation, has demonstrated impressive zero-shot performance. However, SAM does not work when directly applied to medical image segmentation, since SAM lacks the ability to predict semantic labels, requires additional prompts, and presents suboptimal performance. Following the above issues, we propose MaskSAM, a novel mask classification prompt-free SAM adaptation framework for medical image segmentation. We design a prompt generator combined with the image encoder in SAM to generate a set of auxiliary classifier tokens, auxiliary binary masks, and auxiliary bounding boxes. Each pair of auxiliary mask and box prompts can solve the requirements of extra prompts. The semantic label prediction can be addressed by the sum of the auxiliary classifier tokens and the learnable global classifier tokens in the mask decoder of SAM. Meanwhile, we design a 3D depth-convolution adapter for image embeddings and a 3D depth-MLP adapter for prompt embeddings to efficiently fine-tune SAM. Our method achieves state-of-the-art performance on AMOS2022, 90.52% Dice, which improved by 2.7% compared to nnUNet. Our method surpasses nnUNet by 1.7% on ACDC and 1.0% on Synapse datasets.
Motivation & Objective
- Address SAM's limitations in medical image segmentation, including lack of semantic label prediction and dependency on manual prompts.
- Enable zero-shot, prompt-free inference for 3D medical image segmentation using pre-trained 2D SAM.
- Bridge the domain gap between 2D natural images and 3D medical volumes by adapting SAM’s architecture to 3D spatial understanding.
- Introduce a unified framework that predicts both precise masks and their corresponding semantic labels without user-provided prompts.
- Achieve state-of-the-art performance on major 3D medical segmentation benchmarks without task-specific fine-tuning from scratch.
Proposed method
- Design a prompt generator that produces auxiliary binary masks, bounding boxes, and classifier tokens from multi-level feature maps in SAM’s image encoder.
- Introduce learnable global classifier tokens in the mask decoder, which are summed with auxiliary classifier tokens to predict semantic labels per mask.
- Inject a 3D depth-convolution adapter (DConvAdapter) into each transformer block of the image encoder to process 3D image embeddings with 3D inductive bias.
- Introduce a 3D depth-MLP adapter (DMLPAdapter) into the mask decoder to process 3D prompt embeddings, using invert-bottleneck structures with skip connections for improved feature refinement.
- Apply depth positional embeddings (DPosEmbed) to enhance 3D spatial modeling in both image and mask encoders.
- Use bipartite matching between predicted and ground-truth segments to compute loss, enabling end-to-end training with variable-length multi-class masks.
Experimental results
Research questions
- RQ1Can a prompt-free adaptation of SAM achieve high-performance 3D medical image segmentation without requiring manual point or box prompts?
- RQ2How can SAM be extended to predict semantic labels for segmented masks, given its original design for binary mask prediction only?
- RQ3What architectural modifications are necessary to enable 2D pre-trained SAM to effectively extract and utilize 3D spatial information from volumetric medical images?
- RQ4How do 3D-aware adapters (DConvAdapter and DMLPAdapter) compare to standard adapters in improving 3D generalization and segmentation accuracy?
- RQ5To what extent can a unified, end-to-end framework with learnable prompts and classifier tokens outperform existing SOTA methods like nnUNet on 3D medical segmentation benchmarks?
Key findings
- MaskSAM achieves 90.52% Dice on the AMOS2022 dataset, representing a 2.7% improvement over nnUNet.
- On the ACDC dataset, MaskSAM surpasses nnUNet by 1.7% in Dice score, demonstrating strong generalization to cardiac MRI segmentation.
- On the Synapse dataset, MaskSAM improves performance by 1.0% over nnUNet, confirming robustness across diverse anatomical structures.
- The ablation study confirms that the proposed prompt generator with averaged bounding boxes (MaskAvgBBoxPG) yields the best performance, improving by 1.9% over a mask-only generator.
- The integration of DMLPAdapter and DConvAdapter leads to a 0.3% performance gain over the baseline, with DMLPAdapter showing superior feature refinement over alternative depth-MLP placements.
- The addition of depth positional embeddings (DPosEmbed) improves performance by over 0.15% compared to the baseline, validating its role in 3D spatial modeling.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.