HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

TokenLearner: What Can 8 Learned Tokens Do for Images and Videos?

Michael S. Ryoo AJ Piergiovanni Anurag Arnab Mostafa Dehghani Anelia Angelova

TokenLearner: What Can 8 Learned Tokens Do for Images and Videos?

Abstract

In this paper, we introduce a novel visual representation learning which relies on a handful of adaptively learned tokens, and which is applicable to both image and video understanding tasks. Instead of relying on hand-designed splitting strategies to obtain visual tokens and processing a large number of densely sampled patches for attention, our approach learns to mine important tokens in visual data. This results in efficiently and effectively finding a few important visual tokens and enables modeling of pairwise attention between such tokens, over a longer temporal horizon for videos, or the spatial content in images. Our experiments demonstrate strong performance on several challenging benchmarks for both image and video recognition tasks. Importantly, due to our tokens being adaptive, we accomplish competitive results at significantly reduced compute amount. We obtain comparable results to the state-of-the-arts on ImageNet while being computationally more efficient. We also confirm the effectiveness of the approach on multiple video datasets, including Kinetics-400, Kinetics-600, Charades, and AViD. The code is available at: https://github.com/google-research/scenic/tree/main/scenic/projects/token_learner

Benchmarks

BenchmarkMethodologyMetrics
action-classification-on-avidTokenLearner
Accuracy: 53.8
action-classification-on-charadesTokenLearner
MAP: 66.3
action-classification-on-kinetics-400TokenLearner 16at18 (L/10)
Acc@1: 85.4
action-classification-on-kinetics-600TokenLearner 16at18 w. Fuser (L/10)
Top-1 Accuracy: 86.3
Top-5 Accuracy: 97.0
image-classification-on-imagenet16-TokenLearner B/16 (21)
Top 1 Accuracy: 87.07%
image-classification-on-imagenetTokenLearner L/8 (24+11)
Number of params: 460M
Top 1 Accuracy: 88.87%
image-classification-on-imagenet-realTokenLearner L/8 (24+11)
Accuracy: 91.05%
Params: 460M

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