This paper is on video recognition using Transformers. Very recent attempts in this area have demonstrated promising results in terms of recognition accuracy, yet they have been also shown to induce, in many cases, significant computational overheads due to the additional modelling of the temporal information. In this work, we propose a Video Transformer model the complexity of which scales linearly with the number of frames in the video sequence and hence induces no overhead compared to an image-based Transformer model. To achieve this, our model makes two approximations to the full space-time attention used in Video Transformers: (a) It restricts time attention to a local temporal window and capitalizes on the Transformer's depth to obtain full temporal coverage of the video sequence. (b) It uses efficient space-time mixing to attend jointly spatial and temporal locations without inducing any additional cost on top of a spatial-only attention model. We also show how to integrate 2 very lightweight mechanisms for global temporal-only attention which provide additional accuracy improvements at minimal computational cost. We demonstrate that our model produces very high recognition accuracy on the most popular video recognition datasets while at the same time being significantly more efficient than other Video Transformer models. Code will be made available.
翻译:本文是在使用变换器的视频识别上。 最近,该领域的尝试在识别准确性方面显示出了令人乐观的结果,但在许多情况下,由于对时间信息进行更多的建模,这些尝试也证明会诱发大量的计算间接费用。在这项工作中,我们提议了一个视频变换器模型,其复杂性与视频序列中的框架数量成线,因此与图像变换器模型相比不会产生任何间接费用。为了实现这一点,我们的模型对视频变换器中使用的全时关注量做了两个近似点:(a) 它限制了对当地时间窗口的注意,并且利用变换器的深度来获得视频序列的全部时间覆盖。 (b) 它使用高效的空间-时间混合来联合空间和时间地点,而不会在空间-只注意模型之外引起任何额外的费用。我们还表明如何整合两个非常轻度的全球时间关注机制,以最低的计算成本提供额外的准确性改进。我们证明,我们的模型在最受欢迎的视频识别数据集上产生了非常高的识别度准确性,而与此同时比其他视频变换器模型效率要高得多。