How to build the best medical image segmentation algorithm using foundation models: a comprehensive empirical study with Segment Anything Model
Hanxue Gu, Haoyu Dong, Jichen Yang, Maciej A. Mazurowski
TL;DR
This study assesses how to adapt the Segment Anything Model for medical image segmentation under varied data availability: single-task, multi-task, few-shot, and interactive scenarios. It systematically compares encoder backbones, update scopes, and parameter-efficient fine-tuning methods across 18 configurations on 17 radiology datasets, and investigates task-expansive prompting and self-supervised pretraining. Key findings show that parameter-efficient fine-tuning on both encoder and decoder yields strong performance gains, larger backbones may not substantially improve results due to data constraints, and self-supervised pretraining can boost MRI segmentation but prompt-based pretraining offers limited automation benefits. The work provides practical guidance and releases MRI-specific fine-tuned weights and code to advance SAM-based medical image segmentation practice.
Abstract
Automated segmentation is a fundamental medical image analysis task, which enjoys significant advances due to the advent of deep learning. While foundation models have been useful in natural language processing and some vision tasks for some time, the foundation model developed with image segmentation in mind - Segment Anything Model (SAM) - has been developed only recently and has shown similar promise. However, there are still no systematic analyses or "best-practice" guidelines for optimal fine-tuning of SAM for medical image segmentation. This work summarizes existing fine-tuning strategies with various backbone architectures, model components, and fine-tuning algorithms across 18 combinations, and evaluates them on 17 datasets covering all common radiology modalities. Our study reveals that (1) fine-tuning SAM leads to slightly better performance than previous segmentation methods, (2) fine-tuning strategies that use parameter-efficient learning in both the encoder and decoder are superior to other strategies, (3) network architecture has a small impact on final performance, (4) further training SAM with self-supervised learning can improve final model performance. We also demonstrate the ineffectiveness of some methods popular in the literature and further expand our experiments into few-shot and prompt-based settings. Lastly, we released our code and MRI-specific fine-tuned weights, which consistently obtained superior performance over the original SAM, at https://github.com/mazurowski-lab/finetune-SAM.
