让视频识别只计算关键帧,速度提升6.7倍且更准。
LookWhen? Fast Video Recognition by Learning When, Where, and What to Compute
- 分三步学习何时、何地、算什么,只处理关键帧。
- 在6个数据集上比同类模型快6.7倍,精度还更高。
- 适合需要快速视频分析的场景,如实时监控或移动端应用。
Transformer在视频识别中占据主导地位,但其将视频分割为令牌后处理时存在超线性计算开销。然而视频内容高度冗余,因此可质疑该开销是否必要。本文提出LookWhen,一种选择-提取框架,将视频识别分解为学习何时、何处、何种信息需计算。浅层选择器对降采样视频快速评分所有时空令牌,深层提取器仅处理前K个选中的令牌,以近似全视频表示而不必处理全部。关键挑战在于选择与提取的有效监督。针对选择预训练,引入基于表征最近邻距离的独特性得分;针对提取预训练,同时蒸馏视频教师和图像教师,通过归一化帧级表征来学习视频内变化。实验在Kinetics-400、SSv2、Epic-Kitchens、Diving48、Jester和Charades上验证,LookWhen在准确率-计算量权衡上优于高效模型及同等规模升级基线,在12项测试中的9项实现帕累托最优,3项表现相当。在准确率-吞吐量(按实际时间衡量)上,相比InternVideo2-B在相同精度下提速6.7倍。
原文摘要 · Abstract (English)
Transformers dominate video recognition. They split videos into tokens, and processing them has expensive superlinear computational cost. Yet videos are filled with redundancy, so we can question the need for this expense. We introduce LookWhen, a selector-extractor framework that factorizes video recognition into learning when, where, and what to compute. Our shallow selector gets a scaled-down video and quickly scores all tokens across space-time, while our deep extractor gets the top-K selected tokens to approximate full-video representations without actually processing all the tokens. A key challenge is defining effective supervision for selection and extraction. For selection pre-training, we introduce a score on representations that ranks tokens by uniqueness using a simple nearest-neighbor distance. For extraction pre-training, we distill both a video teacher and an image teacher, for which we normalize its frame-wise representations to learn what changes within videos. Through these strategies, our selector-extractor learns general and efficient representations for feature extraction or fine-tuning to a task. Through experiments on Kinetics-400, SSv2, Epic-Kitchens, Diving48, Jester, and Charades, we show that LookWhen achieves a better accuracy-computation trade-off than efficient models and upgraded baselines of similar size. LookWhen Pareto-dominates in accuracy-FLOPs on 9 of 12 cases (6 tasks x 2 settings) and roughly matches on 3. In accuracy-throughput, measuring time in practice, LookWhen is more efficient still at 6.7x faster than InternVideo2-B at equal accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。