AI engineering glossary · Computer vision
What is patch embedding?
Patch embedding: The first step of a vision transformer: cut the image into equal square patches, flatten each and project it with a learned linear layer into a vector, giving the tokens the transformer reads.
Patch embedding: an example
A 16 x 16 x 3 patch has 768 raw values, which is projected to a 768-dimensional embedding in ViT-Base.
Related terms
- Vision transformer
- Position embedding
- Image tokens
More Computer vision terms
- Pixel
- Pooling layer
- Precision and recall for detection
- Pretrained backbone
- R-CNN
- Random crop
- RANSAC
- Receptive field
Where you learn it
Patch embedding is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.