Skip to main content
QUICK REVIEW

[Paper Review] DeSAM: Decoupled Segment Anything Model for Generalizable Medical Image Segmentation

Yifan Gao, Wei Xia|arXiv (Cornell University)|Jun 1, 2023
Advanced Neural Network ApplicationsComputer Science19 citations
TL;DR

DeSAM decouples SAM's mask decoder into prompt-relevant IoU and prompt-invariant masking, enabling fully automated, single-source domain generalization for medical image segmentation and achieving strong cross-site prostate segmentation results.

ABSTRACT

Deep learning-based medical image segmentation models often suffer from domain shift, where the models trained on a source domain do not generalize well to other unseen domains. As a prompt-driven foundation model with powerful generalization capabilities, the Segment Anything Model (SAM) shows potential for improving the cross-domain robustness of medical image segmentation. However, SAM performs significantly worse in automatic segmentation scenarios than when manually prompted, hindering its direct application to domain generalization. Upon further investigation, we discovered that the degradation in performance was related to the coupling effect of inevitable poor prompts and mask generation. To address the coupling effect, we propose the Decoupled SAM (DeSAM). DeSAM modifies SAM's mask decoder by introducing two new modules: a prompt-relevant IoU module (PRIM) and a prompt-decoupled mask module (PDMM). PRIM predicts the IoU score and generates mask embeddings, while PDMM extracts multi-scale features from the intermediate layers of the image encoder and fuses them with the mask embeddings from PRIM to generate the final segmentation mask. This decoupled design allows DeSAM to leverage the pre-trained weights while minimizing the performance degradation caused by poor prompts. We conducted experiments on publicly available cross-site prostate and cross-modality abdominal image segmentation datasets. The results show that our DeSAM leads to a substantial performance improvement over previous state-of-theart domain generalization methods. The code is publicly available at https://github.com/yifangao112/DeSAM.

Motivation & Objective

  • Address domain shift in medical image segmentation by leveraging a foundation model (SAM) without requiring multi-source data or target-domain data.
  • Eliminate prompt-driven coupling between image and prompt embeddings to improve fully automatic segmentation.
  • Enable memory-efficient training by freezing encoders and precomputing image embeddings.
  • Demonstrate improved cross-site generalization on prostate MRI datasets across multiple clinical sites.

Proposed method

  • Decouple SAM's mask decoder into two modules: Prompt-Relevant IoU Module (PRIM) and Prompt-Invariant Mask Module (PIMM).
  • Freeze image and prompt encoders; precompute image embeddings using the SAM image encoder to reduce GPU memory usage.
  • PRIM uses a cross-attention transformer to produce mask embeddings and an IoU score (no direct mask head).
  • PIMM fuses image embeddings from multiple scales with PRIM outputs via a U-Net/UNETR-like encoder-decoder structure to generate the final mask.
  • Train with grid-point prompts (9x9 grid, with points inside/outside ground truth) or whole-box prompts; losses include L_dice, L_ce for masks and L_mse for IoU."
  • Ground-truth supervision in grid mode uses L_points = L_dice + L_ce + L_mse with weights (1,1,10); in box mode uses L_box = L_dice + L_ce.

Experimental results

Research questions

  • RQ1Can decoupling the mask decoder suppress the detrimental impact of poor prompts in fully automatic SAM-based medical segmentation?
  • RQ2Does freezing the image encoder and precomputing image embeddings enable training on entry-level GPUs while achieving strong cross-domain generalization?
  • RQ3How does DeSAM compare to existing single-source domain generalization methods on cross-site prostate segmentation?
  • RQ4What is the contribution of each component (PRIM, PIMM, IoU head, fusion strategy) to overall performance?

Key findings

  • DeSAM improves cross-site Dice scores on prostate segmentation by an average of 8.96 percentage points (from 70.06% to 79.02%) over previous state-of-the-art domain generalization methods.
  • DeSAM (grid points) achieves an overall Dice of 79.02%, outperforming DeSAM (whole box) and prior methods; DeSAM (whole box) achieves 77.75%.
  • Compared to MedSAM, DeSAM reduces sensitivity to poor prompts and yields a higher average Dice (77.75% vs 66.98% for MedSAM) on the prostate dataset.
  • Ablation shows that: PIMM alone yields 73.85% overall; adding PRIM with IoU head improves to 75.12%; adding mask embedding fusion raises to 75.81%; full DeSAM reaches 79.02% overall.
  • Increasing grid-point prompts from 1 to 9 points maintains or improves performance, reaching 79.02% at 9 points and remaining stable with more points (e.g., 25 points gives 79.03%).
  • DeSAM can be trained on entry-level GPUs (RTX 3060 12GB) with precomputed image embeddings, significantly reducing memory requirements compared to encoder-tuning approaches.

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.