Lean-SAM2: Target-Anchored Memory and Encoder Acceleration for SAM2

📄 arXiv: 2607.19811v1 📥 PDF

作者: Xudong Ouyang, Wenlun Zhang, Yimin Xu, Huazhong Liu, Yunshan Zhong

分类: cs.CV

发布日期: 2026-07-22

🔗 代码/项目: GITHUB


💡 一句话要点

提出Lean-SAM2以解决SAM2模型的内存和效率问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 目标锚定内存修剪 时间凝聚 风险感知路由 视觉特征提取 复杂场景分割 内存优化 高效推理

📋 核心要点

  1. 现有方法在复杂分割场景中表现不佳,尤其是在遮挡和干扰物存在时,导致性能显著下降。
  2. Lean-SAM2通过三种机制:目标锚定内存修剪、带保险的时间凝聚和目标锚定风险感知路由,系统性地消除计算冗余。
  3. 在LVOSv2验证数据集上,Lean-SAM2在推理速度上分别提升了1.412倍和1.417倍,同时提高了对应的J&F分数5.0%和3.6%。

📝 摘要(中文)

Segment Anything Model 2 (SAM2) 在时间提示分割方面取得了进展,但由于内存交叉注意力开销大和冗余的全帧视觉特征提取,其部署受到限制。为了解决这些问题,本文提出了Lean-SAM2,一个轻量级框架,旨在消除计算冗余。Lean-SAM2集成了三种协同机制:目标锚定内存修剪、带保险的时间凝聚和目标锚定风险感知路由。通过在多个基准测试中的广泛评估,Lean-SAM2在准确性和效率之间建立了优越的平衡。

🔬 方法详解

问题定义:本文旨在解决SAM2模型在复杂场景下的内存开销和效率问题,现有方法在处理遮挡和干扰物时性能下降显著。

核心思路:Lean-SAM2通过三种协同机制来优化内存使用和计算效率,确保在复杂环境中仍能保持高性能。

技术框架:Lean-SAM2的整体架构包括目标锚定内存修剪(TAMP)、带保险的时间凝聚(TCIM)和目标锚定风险感知路由(TARR),各模块协同工作以提升效率。

关键创新:Lean-SAM2的创新在于其目标锚定内存修剪和风险感知路由策略,这些设计使得模型在处理复杂场景时能够有效减少冗余计算。

关键设计:在设计中,TAMP通过语义一致性调节原始注意力的重要性,TCIM使用可见性门控融合历史上下文,而TARR则根据锚点相似性选择性激活重型图像编码器。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

Lean-SAM2在LVOSv2验证数据集上实现了1.412倍和1.417倍的推理速度提升,分别提高了J&F分数5.0%和3.6%。与Efficient-SAM2相比,Lean-SAM2在效率和准确性上均表现出显著优势。

🎯 应用场景

Lean-SAM2的研究成果在视频分析、自动驾驶、机器人视觉等领域具有广泛的应用潜力。通过提高分割模型的效率和准确性,该技术可以帮助实现更智能的视觉理解系统,推动相关领域的发展。

📄 摘要(原文)

The Segment Anything Model 2 (SAM2) has advanced temporal promptable segmentation, yet its deployment remains hindered by heavy memory cross-attention overhead and redundant full-frame visual feature extraction. While recent methods explore efficiency via heuristic memory pruning and window-based sparse routing, they typically suffer from catastrophic performance degradation in complex segmentation scenarios replete with occlusions and distractors. To resolve these limitations, we propose \textbf{Lean-SAM2}, a holistic lightweight framework designed to address the above vulnerabilities while systematically eliminating computational redundancies. Specifically, Lean-SAM2 integrates three collaborative mechanisms: (1) Target-Anchored Memory Pruning (TAMP) safeguards target tokens against deceptive attention by modulating raw attention significance with semantic consistency against prompt-derived foreground anchors; (2) Temporal Condensation with Insurance Memory (TCIM) condenses historical context via a visibility-gated fusion while conditionally archiving high-confidence entries in a parallel insurance bank; and (3) Target-Anchored Risk-Aware Routing (TARR) selectively activates the heavy image encoder for target-related windows based on anchor similarity, utilizing a risk-aware fallback policy to trigger full-frame refreshes during volatile transitions. Extensive evaluations across multiple challenging benchmarks demonstrate that Lean-SAM2 establishes a superior balance between accuracy and efficiency. For example, on the LVOSv2 validation dataset, Lean-SAM2 achieves overall inference speedups of $1.412\times$ and $1.417\times$ on the SAM2.1-Large and SAM2.1-Base+, respectively, significantly outperforming Efficient-SAM2 while boosting the corresponding $\mathcal{J}\&\mathcal{F}$ scores by $5.0\%$ and $3.6\%$. Code is available at https://github.com/DeawhaleQwQ/Lean-SAM2.