Vision Transformer - Pytorch
A PyTorch implementation of the Vision Transformer (ViT) for image classification, plus many published variants and extensions of the architecture.
vit-pytorch is a PyTorch implementation of the Vision Transformer (ViT), an architecture that reaches strong vision classification results using a single transformer encoder instead of a convolutional network.
Beyond the base ViT, the repository implements many published variants and extensions, including Simple ViT, NaViT, Deep ViT, CaiT, Token-to-Token ViT, CCT, Cross ViT, PiT, LeViT, CvT, Twins SVT, CrossFormer, RegionViT, ScalableViT, SepViT, MaxViT, NesT, MobileViT, XCiT, masked autoencoders, masked image modeling variants, adaptive token sampling, patch merging, 3D ViT, ViViT, parallel ViT, learnable memory ViT, Dino and EsViT, along with distillation and attention-accessing utilities.
It installs with pip and is licensed under the MIT license.