HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

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

Gedas Bertasius Heng Wang Lorenzo Torresani

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

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.

Benchmarks

BenchmarkMethodologyMetrics
action-classification-on-kinetics-400TimeSformer-L
Acc@1: 80.7
Acc@5: 94.7
FLOPs (G) x views: 7140x3
Parameters (M): 121.4
action-classification-on-kinetics-400TimeSformer-HR
Acc@1: 79.7
Acc@5: 94.4
action-classification-on-kinetics-400TimeSformer
Acc@1: 78
Acc@5: 93.7
action-recognition-in-videos-on-somethingTimeSformer-L
Top-1 Accuracy: 62.3
action-recognition-in-videos-on-somethingTimeSformer
Top-1 Accuracy: 59.5
action-recognition-in-videos-on-somethingTimeSformer-HR
Top-1 Accuracy: 62.5
action-recognition-on-diving-48TimeSformer
Accuracy: 75
action-recognition-on-diving-48TimeSformer-HR
Accuracy: 78
action-recognition-on-diving-48TimeSformer-L
Accuracy: 81
anomaly-detection-on-ubnormalTimeSformer
AUC: 68.5%
RBDC: 0.04
TBDC: 0.05
video-question-answering-on-howto100m-qaTimeSformer
Accuracy: 62.1

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Is Space-Time Attention All You Need for Video Understanding? | Papers | HyperAI