All families

NaFlexViT

8 models, image classification. Fewest parameters first.

NaFlexViT is the NaFlex Vision Transformer in the timm library, described there as an improved version of the Vision Transformer. It encapsulates embedding and position encoding in a single module, and it supports NaFlex inputs of variable aspect ratio and resolution. It also supports the variable patch size of FlexiViT and the fractional or factorized position embedding of NaViT.

Read more

The underlying design comes from the original Vision Transformer paper, which splits an image into fixed-size patches, linearly embeds each one, adds position embeddings and feeds the resulting sequence to a standard Transformer encoder. That paper reports that, when pre-trained on large amounts of data, the Vision Transformer compared well with the convolutional networks of its time while requiring substantially fewer computational resources to train.

The base-size models differ in pooling and position embedding: global average pooling or MAP attention pooling, with aspect-preserving and factorized position embeddings as options. The description of the SO150M2 model adds that it uses explicit patch coordinates and valid token masking.

AI-written summary; not reviewed by a person. Corrections welcome.

Paper: Original Vision Transformer

Filter and sort these in the model list