TensorX
返回文献探索

Paper · arXiv 2307.06304

Patch n' Pack: NaViT, a Vision Transformer for any Aspect Ratio and Resolution

Mostafa Dehghani, Basil Mustafa, Josip Djolonga, Jonathan Heek, Matthias Minderer, Mathilde Caron, Andreas Steiner, Joan Puigcerver, Robert Geirhos, Ibrahim Alabdulmohsin, Avital Oliver, Piotr Padlewski, Alexey Gritsenko, Mario Lučić, Neil Houlsby

36 upvotesJuly 12, 2023arXiv 预印本
AI 摘要

NaViT, a flexible Vision Transformer, processes images of arbitrary resolutions and aspect ratios, improving training efficiency and performance across various computer vision tasks.

Vision TransformerViTsequence packingflexible sequence-based modelinglarge-scale supervised and contrastive image-text pretrainingimage classificationvideo classificationobject detectionsemantic segmentationrobustnessfairness

Abstract

The ubiquitous and demonstrably suboptimal choice of resizing images to a fixed resolution before processing them with computer vision models has not yet been successfully challenged. However, models such as the Vision Transformer (ViT) offer flexible sequence-based modeling, and hence varying input sequence lengths. We take advantage of this with NaViT (Native Resolution ViT) which uses sequence packing during training to process inputs of arbitrary resolutions and aspect ratios. Alongside flexible model usage, we demonstrate improved training efficiency for large-scale supervised and contrastive image-text pretraining. NaViT can be efficiently transferred to standard tasks such as image and video classification, object detection, and semantic segmentation and leads to improved results on robustness and fairness benchmarks. At inference time, the input resolution flexibility can be used to smoothly navigate the test-time cost-performance trade-off. We believe that NaViT marks a departure from the standard, CNN-designed, input and modelling pipeline used by most computer vision models, and represents a promising direction for ViTs.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Patch n' Pack: NaViT, a Vision Transformer for any Aspect Ratio and Resolution | TensorX