arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2112.04674cs.CVcs.AI
收藏

DualFormer:用于高效视频识别的局部-全局分层Transformer

DualFormer: Local-Global Stratified Transformer for Efficient Video Recognition

Sea AI Lab(Sea人工智能实验室);National University of Singapore(新加坡国立大学)

Yuxuan Liang, Pan Zhou, Roger Zimmermann, Shuicheng Yan

摘要:

虽然Transformers具有很强的捕获长距离依赖关系的能力,在视频识别方面表现出了巨大的潜力,但它们通常会因对大量3D令牌的自我关注而产生很高的计算成本。在本文中,我们提出了一种新的Transformer架构称为DualFormer,它可以有效地执行时空注意的视频识别。具体地说,DualFormer将整个时空注意力分为两个级联层次,即,首先学习附近3D令牌之间的细粒度局部交互,然后捕获查询令牌和全局金字塔上下文之间的粗粒度全局依赖关系。与现有的采用时空因子分解或将注意力计算限制在局部窗口内以提高效率的方法不同,我们的局部-全局分层策略可以很好地捕获短期和长期的时空依赖性,同时大大减少了注意力计算中的键和值的数量,以提高效率。实验结果验证了DualFormer在五个视频基准测试上的优越性。特别是,DualFormer在Kinetics-400/600上实现了82.9%/85.2%的top-1准确度,具有约1000 G的推理FLOP,比具有类似性能的现有方法至少少3.2倍。我们已经在https://github.com/sail-sg/dualformer上发布了源代码。

英文摘要:

While transformers have shown great potential on video recognition with their strong capability of capturing long-range dependencies, they often suffer high computational costs induced by the self-attention to the huge number of 3D tokens. In this paper, we present a new transformer architecture termed DualFormer, which can efficiently perform space-time attention for video recognition. Concretely, DualFormer stratifies the full space-time attention into dual cascaded levels, i.e., to first learn fine-grained local interactions among nearby 3D tokens, and then to capture coarse-grained global dependencies between the query token and global pyramid contexts. Different from existing methods that apply space-time factorization or restrict attention computations within local windows for improving efficiency, our local-global stratification strategy can well capture both short- and long-range spatiotemporal dependencies, and meanwhile greatly reduces the number of keys and values in attention computation to boost efficiency. Experimental results verify the superiority of DualFormer on five video benchmarks against existing methods. In particular, DualFormer achieves 82.9%/85.2% top-1 accuracy on Kinetics-400/600 with ~1000G inference FLOPs which is at least 3.2x fewer than existing methods with similar performance. We have released the source code at https://github.com/sail-sg/dualformer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑