TL;DR
SAM3D is an efficient adaptation of the Segment Anything Model (SAM) designed for 3D volumetric medical images. By combining a frozen 2D SAM encoder with a lightweight 3D CNN decoder, it achieves competitive segmentation performance across multiple medical datasets while using up to 50x fewer parameters than current state-of-the-art models.
What Problem Does This Paper Address?
Medical imaging, such as CT and MRI, is inherently volumetric (3D). While deep learning has revolutionized medical image segmentation, most high-performing models are either massive, computationally expensive Transformers or specialized CNNs that struggle to capture long-range global context.
The "Segment Anything Model" (SAM) recently set a new bar for 2D natural image segmentation due to its massive pre-training. However, applying SAM to medical volumes is tricky. Existing adaptations usually process volumes slice-by-slice (2D), which ignores the critical "depth" information between slices, or they require extensive, resource-heavy fine-tuning of the entire model. The authors of SAM3D sought a way to harness SAM’s powerful feature extraction for 3D volumes without the massive computational overhead.
Methods
The SAM3D architecture is elegantly simple, focusing on efficiency and inter-slice connectivity.
- Frozen Encoder: The model uses the pre-trained SAM image encoder (specifically the ViT-B variant). Crucially, this encoder is frozen during training. The authors posit that the low-level features SAM learned from 1.1 billion masks—like edges and boundaries—are robust enough to be reused for medical images without modification.
- Slice-wise Processing: A 3D volume is split into $D$ individual 2D slices. Each slice is duplicated across three channels to match SAM's expected RGB input format. These are fed through the frozen encoder to produce a stack of 2D embeddings.
- Lightweight 3D Decoder: This is the core innovation. Instead of using SAM’s original 2D mask decoder, the authors designed a new, lightweight 3D CNN decoder. It consists of four 3D convolutional blocks with skip connections. This decoder takes the stack of 2D embeddings and "stitches" them together, learning the spatial relationships along the depth dimension.
- Deep Supervision: To improve training, the model uses deep supervision, calculating loss (a combination of Dice and Cross-Entropy) at multiple resolutions within the decoder.
Datasets
The model was evaluated on four diverse benchmarks to prove its generalizability:
- Synapse: Multi-organ CT segmentation (8 abdominal organs).
- ACDC: Automated Cardiac Diagnosis Challenge (MRI).
- BraTS: Brain Tumor Segmentation (multi-modality MRI).
- MSD Lung: Lung Tumor Segmentation (CT) from the Medical Segmentation Decathlon.
Key Insights and Ideas
- Frozen Encoders Work: You don't need to re-train a foundation model's encoder to get great results in a specialized domain like medicine. Freezing the encoder drastically reduces the number of trainable parameters and prevents the model from forgetting its general feature-extraction capabilities.
- 3D Context is King: By using a 3D decoder rather than processing slices independently, SAM3D avoids the "jittery" or inconsistent segmentations often seen in 2D-based medical models. It captures the anatomical continuity of organs across the volume.
- Extreme Efficiency: SAM3D operates with only 1.88M trainable parameters. For context, popular models like nnFormer use over 150M. This allows SAM3D to be trained on consumer-grade hardware (like a single NVIDIA RTX 2080 Ti).
Key Results
SAM3D consistently punched above its weight class:
- Synapse: Achieved a Dice Similarity Coefficient (DSC) of 79.56, outperforming other lightweight SAM-based models like SAMed_s (77.78 DSC) while using roughly 3x fewer parameters.
- ACDC: Reached 90.41 DSC, which is competitive with the state-of-the-art nnFormer (92.06 DSC) despite nnFormer having nearly 80x more parameters.
- BraTS: On brain tumors, it achieved a 72.9 average DSC, showing significant improvements over standard UNETR models in specific tumor regions.
Qualitatively, as shown in Figure 3, SAM3D produces smoother, more accurate organ boundaries compared to other SAM-based adaptations that process images slice-by-slice.
Limitations and Future Work
The authors noted a few areas for growth:
- Backbone Scaling: Due to hardware constraints, they only tested the smallest SAM backbone (ViT-B). They hypothesize that using larger versions (ViT-L or ViT-H) would yield even better accuracy.
- Decoder Complexity: The current 3D decoder is intentionally simple to maintain efficiency. Developing a more sophisticated (yet still efficient) decoder architecture could further close the gap with much larger models.
- Prompting: Unlike the original SAM, this adaptation removes the prompt encoder to focus on fully automated segmentation. Re-introducing prompt-based interaction for 3D volumes remains an open research direction.
Summary updated