Patch n' Pack: 任意のアスペクト比と解像度に対応するVision Transformer、NaViT
Patch n' Pack: NaViT, a Vision Transformer for any Aspect Ratio and Resolution
July 12, 2023
著者: 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
cs.AI
要旨
コンピュータビジョンモデルで処理する前に画像を固定解像度にリサイズするという、広く普及しているが明らかに最適とは言えない選択肢は、これまで成功裏に挑戦されていない。しかし、Vision Transformer(ViT)のようなモデルは、柔軟なシーケンスベースのモデリングを提供し、それゆえに可変の入力シーケンス長を可能にする。我々はこれを利用して、NaViT(Native Resolution ViT)を開発した。NaViTは、訓練中にシーケンスパッキングを使用して、任意の解像度とアスペクト比の入力を処理する。柔軟なモデル使用に加えて、大規模な教師あり学習とコントラスティブな画像-テキスト事前学習における訓練効率の向上を実証する。NaViTは、画像および動画分類、物体検出、セマンティックセグメンテーションといった標準タスクに効率的に転移可能であり、ロバストネスと公平性のベンチマークで改善された結果をもたらす。推論時には、入力解像度の柔軟性を活用して、テスト時のコストとパフォーマンスのトレードオフをスムーズに調整できる。我々は、NaViTが、ほとんどのコンピュータビジョンモデルが採用しているCNN設計の入力およびモデリングパイプラインからの脱却を示し、ViTの有望な方向性を表していると信じる。
English
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.