HRSAM: Efficient Interactive Segmentation in High-Resolution Images
Not on the map. Why?
Abstract (arXiv)
The Segment Anything Model (SAM) has advanced interactive segmentation but is limited by the high computational cost on high-resolution images. This requires downsampling to meet GPU constraints, sacrificing the fine-grained details needed for high-precision interactive segmentation. To address SAM's limitations, we focus on visual length extrapolation and propose a lightweight model named HRSAM. The extrapolation enables HRSAM trained on low resolutions to generalize to high resolutions. We begin by finding the link between the extrapolation and attention scores, which leads us to base HRSAM on Swin attention. We then introduce the Flexible Local Attention (FLA) framework, using CUDA-optimized Efficient Memory Attention to accelerate HRSAM. Within FLA, we implement Flash Swin attention, achieving over a 35% speedup compared to traditional Swin attention, and propose a KV-only padding mechanism to enhance extrapolation. We also develop the Cycle-scan module that uses State Space models to efficiently expand HRSAM's receptive field. We further develop the HRSAM++ within FLA by adding an anchor map, providing multi-scale data augmentation for the extrapolation and a larger receptive field at slight computational cost. Experiments show that, under standard training, HRSAMs surpass the previous SOTA with only 38% of the latency. With SAM-distillation, the extrapolation enables HRSAMs to outperform the teacher model at lower latency. Further finetuning achieves performance significantly exceeding the previous SOTA.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 52 of its 111 references that are in the map. First posted on arXiv 2 Jul 2024.
Builds on
52 of 111 references.
References · 52
- 2017Attention Is All You Needcited by 59,932
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Segment Anythingcited by 8,158
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2021SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformerscited by 2,923
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2024Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Modelcited by 1,051
- 2024VMamba: Visual State Space Modelcited by 955
- 2023LISA: Reasoning Segmentation via Large Language Modelcited by 770
38 more
- 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
- 2023Segment Everything Everywhere All at Oncecited by 546
- 2023Medical SAM Adapter: Adapting Segment Anything Model for Medical Image Segmentationcited by 485
- 2024U-Mamba: Enhancing Long-range Dependency for Biomedical Image Segmentationcited by 412
- 2023EVA-02: A Visual Representation for Neon Genesiscited by 377
- 2023Segment Anything in High Qualitycited by 373
- 2021AdaViT: Adaptive Tokens for Efficient Vision Transformercited by 360
- 2022Pix2Struct: Screenshot Parsing as Pretraining for Visual Language Understandingcited by 360
- 2019Axial Attention in Multidimensional Transformerscited by 350
- 2023Faster Segment Anything: Towards Lightweight SAM for Mobile Applicationscited by 345
- 2021Focal Self-attention for Local-Global Interactions in Vision Transformerscited by 286
- 2024VM-UNet: Vision Mamba UNet for Medical Image Segmentationcited by 286
- 2022Matryoshka Representation Learningcited by 268
- 2024LocalMamba: Visual State Space Model with Windowed Selective Scancited by 235
- 2023Inpaint Anything: Segment Anything Meets Image Inpaintingcited by 233
- 2023Segment Anything in Medical Imagescited by 226
- 2023Patch n' Pack: NaViT, a Vision Transformer for any Aspect Ratio and Resolutioncited by 226
- 2023EfficientSAM: Leveraged Masked Image Pretraining for Efficient Segment Anythingcited by 187
- 2018Online normalizer calculation for softmaxcited by 154
- 2024PlainMamba: Improving Non-Hierarchical Mamba in Visual Recognitioncited by 141
- 2024Mamba-UNet: UNet-Like Pure Visual Mamba for Medical Image Segmentationcited by 133
- 2023SAM-Med2Dcited by 123
- 2022SimpleClick: Interactive Image Segmentation with Simple Vision Transformerscited by 109
- 2024Cobra: Extending Mamba to Multi-Modal Large Language Model for Efficient Inferencecited by 97
- 2024VL-Mamba: Exploring State Space Models for Multimodal Learningcited by 93
- 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 84
- 2024SiMBA: Simplified Mamba-Based Architecture for Vision and Multivariate Time seriescited by 81
- 2023Review of Large Vision Models and Visual Prompt Engineeringcited by 77
- 2024Sigma: Siamese Mamba Network for Multi-Modal Semantic Segmentationcited by 71
- 2024When Do We Not Need Larger Vision Models?cited by 65
- 2024Gamba: Marry Gaussian Splatting with Mamba for single view 3D reconstructioncited by 56
- 2024SpikeMba: Multi-Modal Spiking Saliency Mamba for Temporal Video Groundingcited by 25
- 2024Rethinking Interactive Image Segmentation with Low Latency, High Quality, and Diverse Promptscited by 22
- 2024BA-SAM: Scalable Bias-Mode Attention Mask for Segment Anything Modelcited by 15
- 2023Win-Win: Training High-Resolution Vision Transformers from Two Windowscited by 12
- 2024MD-Dose: A diffusion model based on the Mamba for radiation dose predictioncited by 11
- 2024Leveraging AI Predicted and Expert Revised Annotations in Interactive Segmentation: Continual Tuning or Full Training?cited by 9
- 2024RMP-SAM: Towards Real-Time Multi-Purpose Segment Anythingcited by 5
50 most cited of 52 All 52 (JSON)
Built on by
Citing papers per year: 2024: 1.
1 paper.
- 2024Order-aware Interactive Segmentationcited by 2
- 2024Order-aware Interactive Segmentation16 Oct 2024
Similar, not cited
Close in wording, no citation either way
- 2026SparseSAM: Structured Sparsification of Activations in Segment Anything Models
- 2025Inter2Former: Dynamic Hybrid Attention for Efficient High-Precision Interactive
- 2024Repurposing Stable Diffusion Attention for Training-Free Unsupervised Interactive Segmentation
- 2025X-SAM: From Segment Anything to Any Segmentation
- 2026Lean-SAM2: Target-Anchored Memory and Encoder Acceleration for SAM2
- 2026TinySAM 2: Extreme Memory Compression for Efficient Track Anything Model
- 2024Mamba or RWKV: Exploring High-Quality and High-Efficiency Segment Anything Model
- 2026X2SAM: Any Segmentation in Images and Videos