AdapterShadow: Adapting Segment Anything Model for Shadow Detection

Leiping Jie, Hui Zhang
11/15/2023
cs.CV

Official code: LeipingJie/AdapterShadow (18 stars, last commit 2025-04-19).

Abstract

Segment anything model (SAM) has shown its spectacular performance in segmenting universal objects, especially when elaborate prompts are provided. However, the drawback of SAM is twofold. On the first hand, it fails to segment specific targets, e.g., shadow images or lesions in medical images. On the other hand, manually specifying prompts is extremely time-consuming. To overcome the problems, we propose AdapterShadow, which adapts SAM model for shadow detection. To adapt SAM for shadow images, trainable adapters are inserted into the frozen image encoder of SAM, since the training of the full SAM model is both time and memory consuming. Moreover, we introduce a novel grid sampling method to generate dense point prompts, which helps to automatically segment shadows without any manual interventions. Extensive experiments are conducted on four widely used benchmark datasets to demonstrate the superior performance of our proposed method. Codes will are publicly available at https://github.com/LeipingJie/AdapterShadow.

View on arXivView PDF

Code Implementations(1)

Source code for our paper "AdapterShadow: Adapting Segment Anything Model for Shadow Detection"

181Shell, PythonNov 14, 20231 years ago

Similar Papers

Cite this paper

@article{jie2023adaptershadow,
  title  = {AdapterShadow: Adapting Segment Anything Model for Shadow Detection},
  author = {Leiping Jie and Hui Zhang},
  year   = {2023},
  eprint = {2311.08891},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.08891v1}
}

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

Discussion