Skip to content

Vision Transformer (ViT)

An architecture that applies the transformer to images. Instead of words — image fragments that are processed just like tokens of text.

How It Works

  1. The image is divided into square patches (e.g., 16×16 pixels).
  2. Each patch is converted into an embedding.
  3. Positional encoding is added to the patches.
  4. Then, standard transformer blocks with self-attention follow.

This way, the model reads the image as a sequence of visual chunks.

Why It Matters

Before ViT, computer vision was dominated by convolutional networks (CNN). ViT demonstrated that a pure transformer without convolutions can compete with them if there is enough data. This unites approaches to text and images.

See Also

← All Terms