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

Mandela Patrick, Dylan Campbell, Yuki M. Asano, Ishan Misra, Florian Metze +3 more
6/9/2021
393 citations
cs.CV
transformer-attention

Official code: facebookresearch/Motionformer (235 stars, Python, last commit 2022-06-13).

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$.

Show full abstract

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. Code and models are available at: https://github.com/facebookresearch/Motionformer

View on arXivView PDF

Code Implementations(1)

Code + pre-trained models for the paper Keeping Your Eye on the Ball Trajectory Attention in Video Transformers

23531Python, HTMLJun 3, 20214 years ago

Similar Papers

Cite this paper

@article{patrick2021keeping,
  title  = {Keeping Your Eye on the Ball: Trajectory Attention in Video Transformers},
  author = {Mandela Patrick and Dylan Campbell and Yuki M. Asano and Ishan Misra and Florian Metze and Christoph Feichtenhofer and Andrea Vedaldi and João F. Henriques},
  year   = {2021},
  eprint = {2106.05392},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.05392}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.05392.svg)](https://codeofpaper.com/paper/2106.05392)

Discussion