ViTs [1]} have recently outperformed Convolutional Neural Networks (CNNs) for various computer vision tasks, including image classification [2]}, [3]}, object detection [4]}, and text-to-image generation [5]}. Adapted from the Transformer models for NLP tasks, ViT tokenizes images into patches before passing them into a layer-wise attention architecture. Unlike CNNs, which use a spatial bias to look only at neighboring pixels, ViTs perform computation across all pairs of patches, leading to generally higher computational complexity.
