Few Exemplar-Based General Medical Image Segmentation via Domain-Aware Selective Adaptation

Chen Xu, Qiming Huang, Yuqi Hou, Jiangxing Wu, Fan Zhang, Hyung Jin Chang, Jianbo Jiao

Abstract

Medical image segmentation is critical for clinical diagnosis but suffers from a lack of large-scale annotated datasets and a reliance on precise bounding box prompts. We present FEMed, a framework designed for high-quality segmentation using only one to five exemplars. By adapting the Segment Anything Model (SAM) through domain-aware selective adaptation, FEMed overcomes the "prompt trap"—the performance collapse seen in existing models when provided with imprecise, "coarse" bounding boxes. Our approach utilizes lightweight adapters to capture medical-specific high-frequency textures and multi-scale features, ensuring robustness and practicality in low-resource clinical settings.

Introduction

The application of foundation models like the Segment Anything Model (SAM) to the medical domain has shown promise, yet significant challenges remain. First, the data bottleneck persists; expert annotation of medical scans (MRI, CT) is costly and scarce. Second, many current adaptations (e.g., MedSAM) suffer from a "prompt trap": they are trained and evaluated using "perfect" bounding boxes derived from ground-truth masks. In real-world clinical practice, users typically provide loose, imprecise areas of interest. When these models encounter such "coarse" prompts, their segmentation accuracy often degrades significantly.

FEMed addresses these issues by enabling few-shot adaptation that is inherently robust to prompt imprecision. By simulating coarse prompts during training (Setting D), the model learns to localize targets within a broad region rather than simply relying on the box boundaries.

Comparison of fine-tuning strategies with fine-grained vs. coarse prompts and the coarse bbox generation process.

Methodology: The FEMed Framework

FEMed maintains the frozen weights of the SAM image encoder to preserve general knowledge while introducing three "domain-aware" components to bridge the gap between natural and medical imagery.

High-Frequency Adapter (HFA)

Medical images are characterized by subtle textures and edges that are often lost in general-purpose feature extraction. The HFA employs Fast Fourier Transforms (FFT) to isolate and adapt high-frequency information, allowing the model to focus on the fine-grained structural details essential for medical segmentation.

Multi-Scale Feature Adapter (MSFA)

To capture both global context and local lesion details, the MSFA utilizes a pyramid pooling architecture. It processes features at multiple resolutions (1x1, 2x2, 4x4, and 8x8), ensuring the model understands the spatial relationships within the scan.

Feature Fusion Selector

The Feature Selector Module dynamically weights the contributions of the HFA and MSFA for each transformer layer. It incorporates a learnable bias that prioritizes multi-scale features, which empirical evidence suggests are more critical for medical tasks.

The FEMed architecture featuring the High-Frequency Adapter (HFA), Multi-Scale Feature Adapter (MSFA), and the Feature Selector Module integrated with the SAM backbone.

Experimental Evaluation

The model was evaluated across three modalities: 3D MRI (BraTS2021), CT (LiTS17), and RGB endoscopy (Kvasir-SEG). To simulate realistic clinical use, we employed "Setting D," where bounding boxes can cover up to 95% of the image.

Key Results

  • Superior Few-Shot Performance: On the BraTS21 dataset, FEMed achieved an 8.66 mIoU improvement over state-of-the-art models when using only 10 exemplars.
  • Robustness to Coarse Prompts: Unlike MedSAM and SAM-Med2D, which often segment the entire bounding box if it is too large, FEMed successfully localizes the target within the box.
  • Ablation Insights: The HFA was found to be a primary driver of accuracy, confirming that the domain gap between natural and medical images is largely rooted in high-frequency textural differences.

Conclusion

FEMed provides a practical path for deploying advanced segmentation models in low-resource or specialized medical environments. By focusing on selective adaptation and prompt robustness, it reduces the need for massive datasets and expert-level prompt precision. Future work will explore extending this selective adaptation to other prompt types, such as points or scribbles, and further optimizing the model for deployment on mobile medical devices.

Summary updated

BibTeX
@inproceedings{xu2024few,
  author = {Chen Xu and Qiming Huang and Yuqi Hou and Jiangxing Wu and Fan Zhang and Hyung Jin Chang and Jianbo Jiao},
  title = {{Few Exemplar-Based General Medical Image Segmentation via Domain-Aware Selective Adaptation}},
  booktitle = {ACCV},
  year = {2024},
  url = {https://openreview.net/forum?id=LICH9mrGdF},
}
Figure