MCP-MedSAM: A Powerful Lightweight Medical Segment Anything Model Trained with a Single GPU in Just One Day

Donghang Lyu1Orcid, Ruochen Gao1Orcid, Marius Staring1Orcid
1: Division of Image Processing, Department of Radiology, Leiden University Medical Center, Leiden, the Netherlands
Publication date: 2025/05/12
https://doi.org/10.59275/j.melba.2025-4849
PDF · Code

Abstract

Medical image segmentation involves partitioning medical images into meaningful regions, with a focus on identifying anatomical structures and lesions. It has broad applications in healthcare, and deep learning methods have enabled significant advancements in automating this process. Recently, the introduction of the Segmentation Anything Model (SAM), the first foundation model for segmentation task, has prompted researchers to adapt it for the medical domain to improve performance across various tasks. However, SAM’s large model size and high GPU requirements hinder its scalability and development in the medical domain. To address these challenges, research has increasingly focused on lightweight adaptations of SAM to reduce its parameter count, enabling training with limited GPU resources while maintaining competitive segmentation performance. In this work, we propose MCP-MedSAM, a powerful and lightweight medical SAM model designed to be trainable on a single A100 GPU with 40GB of memory within one day while delivering superior segmentation performance. Recognizing the significant internal differences between modalities and the need for direct segmentation target information within bounding boxes, we introduce two kinds of prompts: the modality prompt and the content prompt. After passing through the prompt encoder, their embedding representations can further improve the segmentation performance by incorporating more relevant information without adding significant training overhead. Additionally, we adopt an effective modality-based data sampling strategy to address data imbalance between modalities, ensuring more balanced performance across all modalities. Our method was trained and evaluated using a large-scale challenge dataset, compared to top-ranking methods on the challenge leaderboard, MCP-MedSAM achieved superior performance while requiring only one day of training on a single GPU. The code is publicly available at https://github.com/dong845/MCP-MedSAM

Keywords

MedSAM · Lightweight · Modality prompt · Content prompt · Modality-based data sampling strategy

Bibtex @article{melba:2025:008:lyu, title = "MCP-MedSAM: A Powerful Lightweight Medical Segment Anything Model Trained with a Single GPU in Just One Day", author = "Lyu, Donghang and Gao, Ruochen and Staring, Marius", journal = "Machine Learning for Biomedical Imaging", volume = "3", issue = "May 2025 issue", year = "2025", pages = "135--151", issn = "2766-905X", doi = "https://doi.org/10.59275/j.melba.2025-4849", url = "https://melba-journal.org/2025:008" }
RISTY - JOUR AU - Lyu, Donghang AU - Gao, Ruochen AU - Staring, Marius PY - 2025 TI - MCP-MedSAM: A Powerful Lightweight Medical Segment Anything Model Trained with a Single GPU in Just One Day T2 - Machine Learning for Biomedical Imaging VL - 3 IS - May 2025 issue SP - 135 EP - 151 SN - 2766-905X DO - https://doi.org/10.59275/j.melba.2025-4849 UR - https://melba-journal.org/2025:008 ER -

2025:008 cover