HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

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

Mandela Patrick Dylan Campbell Yuki M. Asano Ishan Misra Florian Metze Christoph Feichtenhofer Andrea Vedaldi João F. Henriques

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

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

Code Repositories

facebookresearch/Motionformer
Official
pytorch
Mentioned in GitHub
facebookresearch/xformers
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
action-classification-on-kinetics-400Motionformer-HR
Acc@1: 81.1
Acc@5: 95.2
action-recognition-in-videos-on-somethingMformer-L
GFLOPs: 1181x3
Parameters: N/A
Top-1 Accuracy: 68.1
Top-5 Accuracy: 91.2
action-recognition-in-videos-on-somethingMformer-HR
GFLOPs: 958.8x3
Parameters: N/A
Top-1 Accuracy: 67.1
Top-5 Accuracy: 90.6
action-recognition-in-videos-on-somethingMformer
Top-1 Accuracy: 66.5
Top-5 Accuracy: 90.1
action-recognition-on-epic-kitchens-100Mformer-HR
Action@1: 44.5
Noun@1: 58.5
Verb@1: 67.0
action-recognition-on-epic-kitchens-100Mformer-L
Action@1: 44.1
Noun@1: 57.6
Verb@1: 67.1
action-recognition-on-epic-kitchens-100Mformer
Action@1: 43.1
Noun@1: 56.5
Verb@1: 66.7

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