Is Space-Time Attention All You Need for Video Understanding?

Gedas Bertasius, Heng Wang, Lorenzo Torresani
2/9/2021
cs.CV

Official code: facebookresearch/TimeSformer (1,862 stars, last commit 2024-04-09).

Abstract

We present a convolution-free approach to video classification built exclusively on self-attention over space and time. Our method, named "TimeSformer," adapts the standard Transformer architecture to video by enabling spatiotemporal feature learning directly from a sequence of frame-level patches. Our experimental study compares different self-attention schemes and suggests that "divided attention," where temporal attention and spatial attention are separately applied within each block, leads to the best video classification accuracy among the design choices considered. Despite the radically new design, TimeSformer achieves state-of-the-art results on several action recognition benchmarks, including the best reported accuracy on Kinetics-400 and Kinetics-600. Finally, compared to 3D convolutional networks, our model is faster to train, it can achieve dramatically higher test efficiency (at a small drop in accuracy), and it can also be applied to much longer video clips (over one minute long). Code and models are available at: https://github.com/facebookresearch/TimeSformer.

View on arXivView PDF

Code Implementations(1)

The official pytorch implementation of our paper "Is Space-Time Attention All You Need for Video Understanding?"

1,862250Shell, PythonApr 2, 20212 years agoNOASSERTION

Similar Papers

Cite this paper

@article{bertasius2021spacetime,
  title  = {Is Space-Time Attention All You Need for Video Understanding?},
  author = {Gedas Bertasius and Heng Wang and Lorenzo Torresani},
  year   = {2021},
  eprint = {2102.05095},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.05095}
}

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/2102.05095.svg)](https://codeofpaper.com/paper/2102.05095)

Discussion