results in Table 4. Based on these results, we observe
that the variant of our model that uses space-time positional embeddings produces the best accuracy on both
Kinetics-400, and Something-Something-V2. Interestingly,
we also observe that using space-only positional embeddings leads to solid results on Kinetics-400, but much worse
results on Something-Something-V2. This makes sense as
Kinetics-400 is more spatially biased, whereas SomethingSomething-V2 requires complex temporal reasoning.
4.5. Comparison to the State-of-the-Art
Kinetics-400 & Kinetics-600. In Table 5 we present our
results on the validation set of K400. For these experiments,
we use TimeSformer pretrained on ImageNet-21K. In addition to the accuracy metrics, we also include inference
cost, given in TFLOPs. We note that whereas most previous
Method Top-1 Top-5 TFLOPs
R(2+1)D (Tran et al., 2018) 72.0 90.0 17.5
bLVNet (Fan et al., 2019) 73.5 91.2 0.84
TSM (Lin et al., 2019) 74.7 N/A N/A
S3D-G (Xie et al., 2018) 74.7 93.4 N/A
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.
Gedas Bertasius Heng Wang Lorenzo Torresani