SAM2-UNet: Segment Anything 2 Makes Strong Encoder for Natural and Medical Image Segmentation

Xinyu Xiong, Zihuang Wu, Shuangyi Tan, Wenxue Li, Feilong Tang +4 more
8/16/2024
cs.CV

Official code: WZH0120/SAM2-UNet (522 stars, Apache-2.0, last commit 2026-01-16).

Abstract

Image segmentation plays an important role in vision understanding. Recently, the emerging vision foundation models continuously achieved superior performance on various tasks. Following such success, in this paper, we prove that the Segment Anything Model 2 (SAM2) can be a strong encoder for U-shaped segmentation models. We propose a simple but effective framework, termed SAM2-UNet, for versatile image segmentation. Specifically, SAM2-UNet adopts the Hiera backbone of SAM2 as the encoder, while the decoder uses the classic U-shaped design. Additionally, adapters are inserted into the encoder to allow parameter-efficient fine-tuning. Preliminary experiments on various downstream tasks, such as camouflaged object detection, salient object detection, marine animal segmentation, mirror detection, and polyp segmentation, demonstrate that our SAM2-UNet can simply beat existing specialized state-of-the-art methods without bells and whistles. Project page: \url{https://github.com/WZH0120/SAM2-UNet}.

View on arXivView PDF

Code Implementations(1)

WZH0120/SAM2-UNetOfficial100%
Apache-2.0

[VINT 2026] SAM2-UNet: Segment Anything 2 Makes Strong Encoder for Natural and Medical Image Segmentation

52261Cuda, ShellAug 15, 20249 months agoApache-2.0
adaptercamouflaged-object-detectionmarine-animal-segmentationmedical-image-segmentationmirror-detection+5 more

Similar Papers

Cite this paper

@article{xiong2024samunet,
  title  = {SAM2-UNet: Segment Anything 2 Makes Strong Encoder for Natural and Medical Image Segmentation},
  author = {Xinyu Xiong and Zihuang Wu and Shuangyi Tan and Wenxue Li and Feilong Tang and Ying Chen and Siying Li and Jie Ma and Guanbin Li},
  year   = {2024},
  eprint = {2408.08870},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.08870v1}
}

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/2408.08870.svg)](https://codeofpaper.com/paper/2408.08870)

Discussion