Efficient-SAM2: Accelerating SAM2 with Object-Aware Visual Encoding and Memory Retrieval
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院)
Segment Anything Model 2(SAM2)在视频对象分割任务中表现出色;然而,其沉重的计算负担阻碍了其在实时视频处理中的应用。尽管已有努力提高SAM2的效率,但大多数方法集中在重新训练轻量级主干网络,对训练后加速的探索较少。本文发现SAM2表现出稀疏感知模式,这为消除冗余计算和加速提供了机会:i)在掩码解码器中,注意力主要集中在前景对象上,而早期阶段的图像编码器具有广谱注意力,导致对背景区域的不必要的计算。ii)在内存银行中,每个帧中只有少量token对内存注意力有显著贡献,而显著区域表现出时间一致性,使全token计算冗余。基于这些见解,我们提出了Efficient-SAM2,使SAM2能够自适应地聚焦于对象区域,同时消除任务无关的计算,从而显著提高推理效率。具体而言,对于图像编码器,我们提出了对象感知的稀疏窗口路由(SWR),这是一种基于前一帧解码器的一致性和显著性线索的窗口级计算分配机制,将背景区域路由到轻量级快捷分支。此外,对于内存注意力,我们提出了对象感知的稀疏内存检索(SMR),只允许每个帧中显著的内存token参与计算,其显著性模式复用自其首次回忆。几乎不增加额外参数和最小训练开销,Efficient-SAM2在SAM2.1-L模型上实现了1.68倍的加速,仅在SA-V测试集上损失了1.0%的准确性。
英文摘要:
Segment Anything Model 2 (SAM2) shows excellent performance in video object segmentation tasks; however, the heavy computational burden hinders its application in real-time video processing. Although there have been efforts to improve the efficiency of SAM2, most of them focus on retraining a lightweight backbone, with little exploration into post-training acceleration. In this paper, we observe that SAM2 exhibits sparse perception pattern as biological vision, which provides opportunities for eliminating redundant computation and acceleration: i) In mask decoder, the attention primarily focuses on the foreground objects, whereas the image encoder in the earlier stage exhibits a broad attention span, which results in unnecessary computation to background regions. ii) In memory bank, only a small subset of tokens in each frame contribute significantly to memory attention, and the salient regions exhibit temporal consistency, making full-token computation redundant. With these insights, we propose Efficient-SAM2, which promotes SAM2 to adaptively focus on object regions while eliminating task-irrelevant computations, thereby significantly improving inference efficiency. Specifically, for image encoder, we propose object-aware Sparse Window Routing (SWR), a window-level computation allocation mechanism that leverages the consistency and saliency cues from the previous-frame decoder to route background regions into a lightweight shortcut branch. Moreover, for memory attention, we propose object-aware Sparse Memory Retrieval (SMR), which allows only the salient memory tokens in each frame to participate in computation, with the saliency pattern reused from their first recollection. With negligible additional parameters and minimal training overhead, Efficient-SAM2 delivers 1.68x speedup on SAM2.1-L model with only 1.0% accuracy drop on SA-V test set.
Zhejiang Gongshang University(浙江工商大学);Renmin University of China(中国人民大学);Zhejiang University(浙江大学);Alibaba-Zhejiang University Joint Research Institute of Frontier Technologies(阿里巴巴-浙江大学前沿技术联合研究院);Alibaba Group(阿里巴巴集团)
Accelerating Streaming Video Large Language Models via Hierarchical Token Compression
EPIC Lab, Shanghai Jiao Tong University(上海交通大学EPIC实验室);Sichuan University(四川大学);Huazhong University of Science and Technology(华中科技大学);Sun Yat-sen University(中山大学);Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))
MURE: Hierarchical Multi-Resolution Encoding via Vision-Language Models for Visual Document Retrieval
National University of Singapore, Singapore(新加坡国立大学);University of Science and Technology of China, China(中国科学技术大学);Hefei University of Technology, China(合肥工业大学)
Deep Binaries: Encoding Semantic-Rich Cues for Efficient Textual-Visual Cross Retrieval
School of Computing Sciences, University of East Anglia(东英吉利大学计算科学学院);Malong Technologies Co., Ltd.(码隆科技有限公司);Future Media Center, University of Electronic Science and Technology of China(电子科技大学未来媒体中心)
College of Computer and Information Engineering, Zhejiang Gongshang University(浙江工商大学计算机与信息工程学院);Renmin University of China(中国人民大学);School of Computing, National University of Singapore(新加坡国立大学计算机学院);School of Computer Science and Information Engineering, Hefei University of Technology(合肥工业大学计算机与信息工程学院)
Histopathology WSI Encoding based on GCNs for Scalable and Efficient Retrieval of Diagnostically Relevant Regions
Beijing Advanced Innovation Center for Biomedical Engineering, Beihang University(北京航空航天大学生物医学工程北京高级创新中心);School of Software, Hefei University of Technology(合肥工业大学软件学院);Tianjin Institute of Industrial Biotechnology, Chinese Academy of Sciences(中国科学院天津工业生物技术研究所)
Learning Where to Embed: Noise-Aware Positional Embedding for Query Retrieval in Small-Object Detection
Southeast University(东南大学);Fudan University(复旦大学);The University of Texas at Dallas(德克萨斯大学达拉斯分校);Zhejiang Normal University(浙江师范大学);Data Space Research Institute, Hefei Comprehensive National Science Center(合肥综合国家科学中心数据空间研究院);Rice University(里士满大学);Huazhong Agricultural University(华中农业大学);City University of Hong Kong (Dongguan)(香港城市大学(东莞));Wake Forest University(威克森林大学)
A Multimodal RAG Framework for Housing Damage Assessment: Collaborative Optimization of Image Encoding and Policy Vector Retrieval
University of California, Berkeley(加州大学伯克利分校);Blum Center for Developing Economies(布鲁姆发展中经济体中心);Icahn School of Medicine at Mount Sinai(西奈山伊坎医学院);McKelvey School of Engineering, Washington University in St. Louis(圣路易斯华盛顿大学麦凯维工程学院)
GLIMPSE: Global-Local Indexing with Multi-Precision Spectral Encoding for Explorable Video World Models
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Cardiff University(卡迪夫大学);Kling AI;The Hong Kong University of Science and Technology(香港科技大学)
Exploiting Visual Semantic Reasoning for Video-Text Retrieval
Beijing Key Laboratory of Network System Architecture and Convergence(网络体系架构与融合北京重点实验室);Beijing Laboratory of Advanced Information Networks(北京先进信息网络实验室);School of Information and Communication Engineering(信息与通信工程学院);Beijing University of Posts and Telecommunications(北京邮电大学)