ViTAR: Vision Transformer with Any Resolution

Qihang Fan, Quanzeng You, Xiaotian Han, Yongfei Liu, Yunzhe Tao +3 more
3/27/2024
cs.CV

No official code found. Best implementation: kyegomez/ViTAR (41 stars, MIT, last commit 2024-11-11).

Abstract

This paper tackles a significant challenge faced by Vision Transformers (ViTs): their constrained scalability across different image resolutions. Typically, ViTs experience a performance decline when processing resolutions different from those seen during training. Our work introduces two key innovations to address this issue. Firstly, we propose a novel module for dynamic resolution adjustment, designed with a single Transformer block, specifically to achieve highly efficient incremental token integration. Secondly, we introduce fuzzy positional encoding in the Vision Transformer to provide consistent positional awareness across multiple resolutions, thereby preventing overfitting to any single training resolution. Our resulting model, ViTAR (Vision Transformer with Any Resolution), demonstrates impressive adaptability, achieving 83.3\% top-1 accuracy at a 1120x1120 resolution and 80.4\% accuracy at a 4032x4032 resolution, all while reducing computational costs. ViTAR also shows strong performance in downstream tasks such as instance and semantic segmentation and can easily combined with self-supervised learning techniques like Masked AutoEncoder. Our work provides a cost-effective solution for enhancing the resolution scalability of ViTs, paving the way for more versatile and efficient high-resolution image processing.

View on arXivView PDF

Code Implementations(1)

kyegomez/ViTARCommunity61%
MIT

Implementation of ViTaR: ViTAR: Vision Transformer with Any Resolution in PyTorch

411Shell, PythonMar 28, 20241 years agoMIT

Similar Papers

Cite this paper

@article{fan2024vitar,
  title  = {ViTAR: Vision Transformer with Any Resolution},
  author = {Qihang Fan and Quanzeng You and Xiaotian Han and Yongfei Liu and Yunzhe Tao and Huaibo Huang and Ran He and Hongxia Yang},
  year   = {2024},
  eprint = {2403.18361},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.18361v2}
}

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/2403.18361.svg)](https://codeofpaper.com/paper/2403.18361)

Discussion