FocSAM: Delving Deeply into Focused Objects in Segmenting Anything
You Huang, Zongyu Lan, Liujuan Cao, Xianming Lin, Shengchuan Zhang, Guannan Jiang, Rongrong Ji
Abstract
The Segment Anything Model (SAM) marks a notable milestone in segmentation models, highlighted by its robust zero-shot capabilities and ability to handle diverse prompts. SAM follows a pipeline that separates interactive segmentation into image preprocessing through a large encoder and interactive inference via a lightweight decoder, ensuring efficient real-time performance. However, SAM faces stability issues in challenging samples upon this pipeline. These issues arise from two main factors. Firstly, the image preprocessing disables SAM to dynamically use imagelevel zoom-in strategies to refocus on the target object during interaction. Secondly, the lightweight decoder struggles to sufficiently integrate interactive information with image embeddings. To address these two limitations, we propose FocSAM with a pipeline redesigned on two pivotal aspects. First, we propose Dynamic Window Multi-head Self-Attention (Dwin-MSA) to dynamically refocus SAM's image embeddings on the target object. Dwin-MSA localizes attention computations around the target object, enhancing object-related embeddings with minimal computational overhead. Second, we propose Pixel-wise Dynamic ReLU (P-DyReLU) to enable sufficient integration of interactive information from a few initial clicks that have significant impacts on the overall segmentation results. Experimentally, FocSAM augments SAM's interactive segmentation performance to match the existing state-of-the-art method in segmentation quality, requiring only about 5.6% of this method's inference time on CPUs. Code is available at https://github.com/YouHuang67/focsam .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers3
- DC-TTA: Divide-and-Conquer Framework for Test-Time Adaptation of Interactive SegmentationJihun Kim, Hoyong Kwon, Hyeokjun Kweon, Wooseong Jeong et al.ICCV 2025 · 1 citation
- SAM-REF: Introducing Image-Prompt Synergy during Interaction for Detail Enhancement in the Segment Anything ModelChongkai Yu, Ting Liu, Anqi Li, Xiaochao Qu et al.CVPR 2025
- NTClick: Achieving Precise Interactive Segmentation With Noise-tolerant ClicksChenyi Zhang, Ting Liu, Xiaochao Qu, Luoqi Liu et al.CVPR 2025
Builds on21
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- SegFormer: Simple and Efficient Design for Semantic Segmentation with TransformersEnze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar et al.NeurIPS 2021 · 9,661 citations
- CCNet: Criss-Cross Attention for Semantic SegmentationZilong Huang, Xinggang Wang, Lichao Huang, Chang Huang et al.ICCV 2019 · 2,972 citations
- Swin Transformer V2: Scaling Up Capacity and ResolutionZe Liu, Han Hu, Yutong Lin, Zhuliang Yao et al.CVPR 2022 · 2,138 citations
Related papers
- Stable Segment Anything ModelQi Fan, Xin Tao, Lei Ke, Mingqiao Ye et al.ICLR 2025 · 1 citation
- Segment Anything with Precise InteractionMengzhen Liu, Mengyu Wang, Henghui Ding, Yilong Xu et al.ACM MM 2024 · 2 citations
- RobustSAM: Segment Anything Robustly on Degraded ImagesWei-Ting Chen, Yu-Jiet Vong, Sy-Yen Kuo, Sizhuo Ma et al.CVPR 2024
- Segment and Matte Anything in a Unified ModelZezhong Fan, Xiaohan Li, Topojoy Biswas, Kaushiki Nag et al.AAAI 2026
- AoP-SAM: Automation of Prompts for Efficient SegmentationYi Chen, Muyoung Son, Chuanbo Hua, Joo-Young KimAAAI 2025 · 9 citations
