不训练的树状搜索机制,让SAM2长视频分割更稳定
SAM2Long: Enhancing SAM 2 for Long Video Segmentation with a Training-Free Memory Tree
- 用树状搜索在多路径中选最优分割结果
- 长视频上平均提升3.0点,最长达5.3点
- 无需训练,适合复杂长视频跟踪任务
Segment Anything Model 2 (SAM 2) 作为图像与视频对象分割的强大基础模型,其视频分割的关键设计是记忆模块,通过前帧的物体感知记忆来预测当前帧。然而,其贪婪选择的记忆机制存在“误差累积”问题,错误或遗漏的掩码会传播影响后续帧,限制了其在复杂长视频中的表现。为此,我们提出 SAM2Long,一种无需训练的视频对象分割改进策略,通过考虑每帧内的分割不确定性,在受限的树搜索中选择视频级最优结果。实际中,保持固定数量的分割路径贯穿整个视频。每帧基于现有路径生成多个掩码,形成候选分支;随后选择累计得分最高的固定数量分支作为下一帧的新路径。最终帧处理后,选取累计得分最高的路径作为最终分割结果。得益于启发式搜索设计,SAM2Long对遮挡和物体重现具有鲁棒性,能有效分割与追踪复杂长视频中的物体。显著地,SAM2Long 在所有 24 个头对头对比中平均提升 3.0 点,尤其在 SA-V 与 LVOS 等长视频分割基准上,J&F 最高提升达 5.3 点。代码已开源:https://github.com/Mark12Ding/SAM2Long。
原文摘要 · Abstract (English)
The Segment Anything Model 2 (SAM 2) has emerged as a powerful foundation model for object segmentation in both images and videos, paving the way for various downstream video applications. The crucial design of SAM 2 for video segmentation is its memory module, which prompts object-aware memories from previous frames for current frame prediction. However, its greedy-selection memory design suffers from the "error accumulation" problem, where an errored or missed mask will cascade and influence the segmentation of the subsequent frames, which limits the performance of SAM 2 toward complex long-term videos. To this end, we introduce SAM2Long, an improved training-free video object segmentation strategy, which considers the segmentation uncertainty within each frame and chooses the video-level optimal results from multiple segmentation pathways in a constrained tree search manner. In practice, we maintain a fixed number of segmentation pathways throughout the video. For each frame, multiple masks are proposed based on the existing pathways, creating various candidate branches. We then select the same fixed number of branches with higher cumulative scores as the new pathways for the next frame. After processing the final frame, the pathway with the highest cumulative score is chosen as the final segmentation result. Benefiting from its heuristic search design, SAM2Long is robust toward occlusions and object reappearances, and can effectively segment and track objects for complex long-term videos. Notably, SAM2Long achieves an average improvement of 3.0 points across all 24 head-to-head comparisons, with gains of up to 5.3 points in J&F on long-term video object segmentation benchmarks such as SA-V and LVOS. The code is released at https://github.com/Mark12Ding/SAM2Long.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。