Adapting a Segmentation Foundation Model for Medical Image Classification

Pengfei Gu, Haoteng Tang, Islam A. Ebeid, Jose A. Nunez, Fabian Vazquez +5 more
5/9/2025
cs.CV
transformer-attention

No confident code implementation found for this paper.

Abstract

Recent advancements in foundation models, such as the Segment Anything Model (SAM), have shown strong performance in various vision tasks, particularly image segmentation, due to their impressive zero-shot segmentation capabilities. However, effectively adapting such models for medical image classification is still a less explored topic.

Show full abstract

In this paper, we introduce a new framework to adapt SAM for medical image classification. First, we utilize the SAM image encoder as a feature extractor to capture segmentation-based features that convey important spatial and contextual details of the image, while freezing its weights to avoid unnecessary overhead during training. Next, we propose a novel Spatially Localized Channel Attention (SLCA) mechanism to compute spatially localized attention weights for the feature maps. The features extracted from SAM's image encoder are processed through SLCA to compute attention weights, which are then integrated into deep learning classification models to enhance their focus on spatially relevant or meaningful regions of the image, thus improving classification performance. Experimental results on three public medical image classification datasets demonstrate the effectiveness and data-efficiency of our approach.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gu2025adapting,
  title  = {Adapting a Segmentation Foundation Model for Medical Image Classification},
  author = {Pengfei Gu and Haoteng Tang and Islam A. Ebeid and Jose A. Nunez and Fabian Vazquez and Diego Adame and Marcus Zhan and Huimin Li and Bin Fu and Danny Z. Chen},
  year   = {2025},
  eprint = {2505.06217},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.06217v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.06217.svg)](https://codeofpaper.com/paper/2505.06217)

Discussion