Vision Transformers with Mixed-Resolution Tokenization

Tomer Ronen, Omer Levy, Avram Golbert
4/1/2023
cs.CV

Official code: TomerRonen34/mixed-resolution-vit (59 stars, last commit 2023-09-28).

Abstract

Vision Transformer models process input images by dividing them into a spatially regular grid of equal-size patches. Conversely, Transformers were originally introduced over natural language sequences, where each token represents a subword - a chunk of raw data of arbitrary size. In this work, we apply this approach to Vision Transformers by introducing a novel image tokenization scheme, replacing the standard uniform grid with a mixed-resolution sequence of tokens, where each token represents a patch of arbitrary size. Using the Quadtree algorithm and a novel saliency scorer, we construct a patch mosaic where low-saliency areas of the image are processed in low resolution, routing more of the model's capacity to important image regions. Using the same architecture as vanilla ViTs, our Quadformer models achieve substantial accuracy gains on image classification when controlling for the computational budget. Code and models are publicly available at https://github.com/TomerRonen34/mixed-resolution-vit .

View on arXivView PDF

Code Implementations(1)

591PythonMar 23, 20233 years ago

Similar Papers

Cite this paper

@article{ronen2023vision,
  title  = {Vision Transformers with Mixed-Resolution Tokenization},
  author = {Tomer Ronen and Omer Levy and Avram Golbert},
  year   = {2023},
  eprint = {2304.00287},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.00287v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.00287.svg)](https://codeofpaper.com/paper/2304.00287)

Discussion