Keeping Your Eye on the Ball: Trajectory Attention in Video Transformers

Mandela Patrick
Dylan Campbell
Yuki Asano
Ishan Misra
Florian Metze
Christoph Feichtenhofer
Andrea Vedaldi
Joao Henriques


[Paper]
[Code]







Abstract

In video transformers, the time dimension is often treated in the same way as the two spatial dimensions. However, in a scene where objects or the camera may move, a physical point imaged at one location in frame t may be entirely unrelated to what is found at that location in frame t+k. These temporal correspondences should be modeled to facilitate learning about dynamic scenes. To this end, we propose a new drop-in block for video transformers---trajectory attention---that aggregates information along implicitly determined motion paths. We additionally propose a new method to address the quadratic dependence of computation and memory on the input size, which is particularly important for high resolution or long videos. While these ideas are useful in a range of settings, we apply them to the specific task of video action recognition with a transformer model and obtain state-of-the-art results on the Kinetics, Something--Something V2, and Epic-Kitchens datasets.

Trajectory Attention




Quantitative Results

Something-Something V2
Model Top-1 Top-5
TimeSformer-HR 62.5 -
ViViT-L 65.4 89.8
MViT-B 67.1 90.8
Motionformer-L 68.1 91.2
Kinetics-400
Model Top-1 Top-5
TimeSformer-HR 80.7 94.7
MViT-B 81.2 95.1
ViViT-L 81.3 94.7
Motionformer-HR 81.1 95.2

Qualitative Results


Paper

Mandela Patrick, Dylan Campbell, Yuki Asano, Ishan Misra, Florian Metze, Christoph Feichtenhofer, Andrea Vedaldi, Joao Henriques
Keeping Your Eye on the Ball: Trajectory Attention in Video Transformers
ArXiv




Acknowledgements

We thank Bernie Huang, Dong Guo, Rose Kanjirathinkal, Gedas Bertasius, Mike Zheng Shou, Mathilde Caron, Hugo Touvron, Benjamin Lefaudeux, Haoqi Fan, and Geoffrey Zweig from Facebook AI for their help, support, and discussion around this project. We also thank Max Bain and Tengda Han from VGG for fruitful discussions.