SAM2-Adapter: Evaluating & Adapting Segment Anything 2 in Downstream Tasks: Camouflage, Shadow, Medical Image Segmentation, and More
Tianrun Chen, Ankang Lu, Lanyun Zhu, Chaotao Ding, Chunan Yu, Deyi Ji, Zejian Li, Lingyun Sun, Papa Mao, Ying Zang
TL;DR
Problem: SAM2 struggles on low-level segmentation tasks such as camouflaged object detection, shadow detection, and medical imagery. Approach: SAM2-Adapter introduces a multi-adapter configuration that injects task-specific prompts into SAM2's hierarchical transformer backbone, enabling task-aware adaptation without altering the core encoder. Contributions: first adapter-based method for SAM2 that attains new state-of-the-art results on CAMO/COD10K/CHAMELEON, ISTD, and kvasir-SEG, with ablation analyses confirming the benefit of four-stage adapters and the SAM2 backbone. Significance: offers a practical, generalizable recipe to adapt large segmentation models to diverse domains, with code and pretrained resources released for community use.
Abstract
The advent of large models, also known as foundation models, has significantly transformed the AI research landscape, with models like Segment Anything (SAM) achieving notable success in diverse image segmentation scenarios. Despite its advancements, SAM encountered limitations in handling some complex low-level segmentation tasks like camouflaged object and medical imaging. In response, in 2023, we introduced SAM-Adapter, which demonstrated improved performance on these challenging tasks. Now, with the release of Segment Anything 2 (SAM2), a successor with enhanced architecture and a larger training corpus, we reassess these challenges. This paper introduces SAM2-Adapter, the first adapter designed to overcome the persistent limitations observed in SAM2 and achieve new state-of-the-art (SOTA) results in specific downstream tasks including medical image segmentation, camouflaged (concealed) object detection, and shadow detection. SAM2-Adapter builds on the SAM-Adapter's strengths, offering enhanced generalizability and composability for diverse applications. We present extensive experimental results demonstrating SAM2-Adapter's effectiveness. We show the potential and encourage the research community to leverage the SAM2 model with our SAM2-Adapter for achieving superior segmentation outcomes. Code, pre-trained models, and data processing protocols are available at http://tianrun-chen.github.io/SAM-Adaptor/
