TokenLearner: What Can 8 Learned Tokens Do for Images and Videos?
Preprint
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_learnerKeywords
All Related Versions
This publication has 9 references indexed in Scilit:
- SCENIC: A JAX Library for Computer Vision Research and Beyond2022
- Scaling Vision Transformers2022
- Video Swin Transformer2022
- Tiny Video NetworksApplied AI Letters, 2021
- Bottleneck Transformers for Visual Recognition2021
- D3D: Distilled 3D Networks for Video Action Recognition2020
- Long-Term Feature Banks for Detailed Video Understanding2019
- Moments in Time Dataset: One Million Videos for Event UnderstandingIEEE Transactions on Pattern Analysis and Machine Intelligence, 2019
- 3D Convolutional Neural Networks for Human Action RecognitionIEEE Transactions on Pattern Analysis and Machine Intelligence, 2012