Explainer
How computer vision works: CNNs, detection and ViTs
In computer vision, convolutional neural networks slide small learned filters across an image and have been especially successful at image recognition.[1][2] In 2012 AlexNet beat the previous best image-classification results by a wide margin,[3] and a 2020 paper showed that vision transformers, which treat an image as a sequence of patches, could match state-of-the-art convolutional networks.[4] Accuracy can still vary by group: NIST found demographic differences in most face recognition algorithms it tested.[5]
This page assumes the basics in how neural networks work. It covers how vision models are built and tested, not any one product.
From pixels to labels
A basic vision task is image recognition, also called image classification: assigning an image a label, such as which species of flower it shows.[6] Vision models learn this from labelled examples, and when labelled images are scarce, data augmentation creates extra training examples by rotating, stretching and reflecting each picture.[7]
Convolutional neural networks
A convolutional neural network (CNN) looks at an image through a small window of learned numbers, called a filter, that slides across the picture.[1] The same filter is reused everywhere, so the model only has to learn a few weights, which saves a great deal of memory.[1] Pooling layers then summarise each area by keeping its strongest or average value, which helps the model recognise an object wherever it appears.[8] CNNs have been especially successful at image recognition.[2]
A convolutional layer passes a small matrix called a convolutional filter along the input matrix; the model learns only the filter’s weights, which sharply reduces training memory.[1] A typical CNN combines convolutional, pooling and dense layers, with pooling taking the maximum or average across each pooled area to enforce translational invariance.[8] Depth brought its own training problems: the 2015 ResNet paper introduced residual learning so networks substantially deeper than before could be trained, evaluated nets up to 152 layers deep on ImageNet, and won the ILSVRC 2015 classification task with 3.57% test error.[9]
The 2012 turning point
In 2012 the AlexNet paper trained a deep CNN with 60 million parameters on 1.3 million ImageNet images in 1,000 classes, reporting error rates considerably better than the previous state of the art.[3] It used an efficient GPU implementation to make training faster.[3] For how that result fits the wider story, see the history of AI.
Finding and outlining objects
Object detection finds objects and draws a box, called a bounding box, around each one. Models are scored on how much their predicted box overlaps the true one, a measure called intersection over union.[10] Segmentation goes further and marks out each object as a mask; Meta AI’s Segment Anything dataset alone holds over 1 billion masks.[11]
A bounding box gives the (x, y) coordinates of a rectangle around an area of interest, and intersection over union (IoU) scores a predicted box against the ground truth from 0 to 1.[10] The 2015 YOLO paper recast detection as a single regression problem: one network predicts boxes and class probabilities from the full image in one pass, and its base model ran at 45 frames per second.[12] Its authors reported more localization errors than state-of-the-art systems but far fewer false detections where nothing exists.[13] For segmentation, Meta AI’s 2023 Segment Anything project released a promptable model, SAM, with a dataset of over 1 billion masks on 11 million licensed images, designed to transfer zero-shot to new tasks.[11]
Vision transformers and multimodal models
In 2020 the Vision Transformer (ViT) paper showed that a pure transformer applied to a sequence of image patches can perform very well at classification.[4] With large-scale pre-training it matched state-of-the-art convolutional networks while needing substantially less compute to train.[4] The same idea, splitting images into patch tokens, lets multimodal models handle pictures and text together; see multimodal AI explained.[14]
Where vision systems go wrong
Face recognition systems can be less accurate for some groups of people than others.[5] In a 2019 study, NIST ran 18.27 million images of 8.49 million people through 189 mostly commercial face recognition algorithms from 99 developers.[15] It found demographic differentials in the majority of them.[5] False positive differences, where two different people are wrongly matched, were much larger than false negative ones, and false positive rates often varied by factors of 10 to beyond 100 across demographic groups.[5]
Read next
Next in the crash course
How diffusion models work: from noise to images
How diffusion models learn to turn random noise into images, audio and video: the forward and reverse process, guidance, latent diffusion and faster sampling.
Questions readers ask
What is a convolutional neural network?
A neural network with at least one convolutional layer, in which a small matrix of learned weights called a filter slides across the image. A typical CNN combines convolutional, pooling and dense layers, and CNNs have been especially successful at image recognition.[1][8][2]
What is the difference between image classification, object detection and segmentation?
Classification (also called image recognition) labels a whole image. Detection draws bounding boxes around objects and names them. Segmentation outlines objects with pixel masks, as in Meta AI's Segment Anything model.[6][10][11]
What is a vision transformer?
A transformer model applied to an image cut into a sequence of patches. The 2020 ViT paper found it could match state-of-the-art convolutional networks on image classification while needing substantially less compute to train.[4]
Sources
· 15 claims from 8 publishers
Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.
- [1]
In a convolutional layer, a small matrix called a convolutional filter passes along the input matrix; because the model only learns the weights in the filter, convolutions greatly reduce the memory needed for training. reportedas of 2026-11-21
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: convolutional layer (retrieved 2026-11-21)
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: convolution (retrieved 2026-11-21)
- [2]
Convolutional neural networks contain at least one convolutional layer and have been especially successful at problems such as image recognition, while recurrent neural networks feed hidden-layer values from one run into the next, making them useful for sequences. reportedas of 2026-11-07
- Machine Learning Glossary · Google for Developers · Secondary source · Glossary, convolutional neural network (retrieved 2026-11-07)
- Machine Learning Glossary · Google for Developers · Secondary source · Glossary, recurrent neural network (retrieved 2026-11-07)
- [3]
The 2012 AlexNet paper trained a deep convolutional neural network with 60 million parameters on 1.3 million ImageNet images in 1,000 classes, reporting error rates considerably better than the previous state of the art and using an efficient GPU implementation to speed up training. confirmedas of 2012-12-03
- ImageNet Classification with Deep Convolutional Neural Networks · NeurIPS 2012 (Krizhevsky, Sutskever and Hinton) · Primary source · 2012-12-03 · Abstract (retrieved 2026-11-21)
- ImageNet Classification with Deep Convolutional Neural Networks · NeurIPS 2012 (Krizhevsky, Sutskever and Hinton) · Primary source · 2012-12-03 · Abstract (retrieved 2026-11-21)
- ImageNet Classification with Deep Convolutional Neural Networks · NeurIPS 2012 (Krizhevsky, Sutskever and Hinton) · Primary source · 2012-12-03 · Abstract (retrieved 2026-11-21)
- [4]
The 2020 Vision Transformer (ViT) paper showed that a pure Transformer applied to sequences of image patches can perform very well at image classification, matching state-of-the-art convolutional networks with substantially less training compute when pre-trained on large datasets. confirmedas of 2020-10-22
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale (ICLR 2021) · International Conference on Learning Representations · Primary source · 2021-05-03 · Abstract (retrieved 2026-11-22)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale (ICLR 2021) · International Conference on Learning Representations · Primary source · 2021-05-03 · Abstract (retrieved 2026-11-22)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale · arXiv · Secondary source · 2020-10-22 · Abstract (retrieved 2026-11-07)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale · arXiv · Secondary source · 2020-10-22 · Abstract (retrieved 2026-11-07)
- [5]
NIST found demographic differentials in the majority of the face recognition algorithms it evaluated; false positive differentials (wrongly associating two different people) were much larger than false negative ones, with false positive rates often varying by factors of 10 to beyond 100 across demographics. confirmedas of 2019-12-19
- Face Recognition Vendor Test (FRVT) Part 3: Demographic Effects (NISTIR 8280) · National Institute of Standards and Technology · Primary source · 2019-12-19 · NISTIR 8280, Executive summary (retrieved 2026-11-21)
- Face Recognition Vendor Test (FRVT) Part 3: Demographic Effects (NISTIR 8280) · National Institute of Standards and Technology · Primary source · 2019-12-19 · NISTIR 8280, Results overview (retrieved 2026-11-21)
- Face Recognition Vendor Test (FRVT) Part 3: Demographic Effects (NISTIR 8280) · National Institute of Standards and Technology · Primary source · 2019-12-19 · NISTIR 8280, Executive summary (retrieved 2026-11-21)
- Face Recognition Vendor Test (FRVT) Part 3: Demographic Effects (NISTIR 8280) · National Institute of Standards and Technology · Primary source · 2019-12-19 · NISTIR 8280, Executive summary (retrieved 2026-11-21)
- [6]
Google's machine learning glossary notes that image recognition is also known as image classification, giving the example of a model that distinguishes flower species. reportedas of 2026-11-21
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: keypoints (retrieved 2026-11-21)
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: image recognition (retrieved 2026-11-21)
- [7]
When labeled images are scarce, data augmentation can rotate, stretch and reflect each image to produce many variants for training. reportedas of 2026-11-21
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: data augmentation (retrieved 2026-11-21)
- [8]
A typical convolutional neural network combines convolutional layers, pooling layers and dense layers; pooling usually takes the maximum or average value across an area and helps enforce translational invariance. reportedas of 2026-11-21
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: convolutional neural network (retrieved 2026-11-21)
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: pooling (retrieved 2026-11-21)
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: pooling (retrieved 2026-11-21)
- [9]
The 2015 ResNet paper introduced residual learning to ease training of much deeper networks, evaluated nets up to 152 layers deep on ImageNet, and won first place in the ILSVRC 2015 classification task with 3.57% error on the ImageNet test set. reportedas of 2015-12-10
- Deep Residual Learning for Image Recognition · arXiv (He et al.) · Secondary source · 2015-12-10 · Abstract (retrieved 2026-11-21)
- Deep Residual Learning for Image Recognition · arXiv (He et al.) · Secondary source · 2015-12-10 · Abstract (retrieved 2026-11-21)
- Deep Residual Learning for Image Recognition · arXiv (He et al.) · Secondary source · 2015-12-10 · Abstract (retrieved 2026-11-21)
- [10]
In object detection, a bounding box gives the coordinates of a rectangle around an area of interest, and intersection over union (IoU) measures how well a predicted box matches the ground-truth box, from 0 for no overlap to 1 for an exact match. reportedas of 2026-11-21
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: bounding box (retrieved 2026-11-21)
- Machine Learning Glossary: Image Models · Google for Developers · Secondary source · Glossary entry: intersection over union (retrieved 2026-11-21)
- [11]
Meta AI's 2023 Segment Anything project released a promptable segmentation model (SAM) and a dataset of over 1 billion masks on 11 million licensed images, designed to transfer zero-shot to new image distributions and tasks. reportedas of 2023-04-05
- Segment Anything · arXiv (Kirillov et al., Meta AI) · Secondary source · 2023-04-05 · Abstract (retrieved 2026-11-21)
- Segment Anything · arXiv (Kirillov et al., Meta AI) · Secondary source · 2023-04-05 · Abstract (retrieved 2026-11-21)
- [12]
The 2015 YOLO paper framed object detection as a single regression problem, with one neural network predicting bounding boxes and class probabilities from the full image in one evaluation; its base model ran at 45 frames per second. reportedas of 2015-06-08
- You Only Look Once: Unified, Real-Time Object Detection · arXiv (Redmon et al.) · Secondary source · 2015-06-08 · Abstract (retrieved 2026-11-21)
- You Only Look Once: Unified, Real-Time Object Detection · arXiv (Redmon et al.) · Secondary source · 2015-06-08 · Abstract (retrieved 2026-11-21)
- [13]
The YOLO authors reported that, compared with state-of-the-art detectors, their model made more localization errors but was far less likely to predict objects where none existed. reportedas of 2015-06-08
- You Only Look Once: Unified, Real-Time Object Detection · arXiv (Redmon et al.) · Secondary source · 2015-06-08 · Abstract (retrieved 2026-11-21)
- [14]
Google's glossary says most modern foundation models are multimodal, and their tokenizers might turn text into subwords and images into small patches before converting all the tokens into a single shared embedding space. reportedas of 2026-11-14
- Machine Learning Glossary · Google for Developers · Secondary source · Glossary, tokenizer (retrieved 2026-11-07)
- Machine Learning Glossary · Google for Developers · Secondary source · Glossary, tokenizer (retrieved 2026-11-07)
- Machine Learning Glossary · Google for Developers · Secondary source · Glossary, tokenizer (retrieved 2026-11-07)
- [15]
NIST's 2019 study of demographic effects in face recognition ran 18.27 million images of 8.49 million people through 189 mostly commercial algorithms from 99 developers. confirmedas of 2019-12-19
- Face Recognition Vendor Test (FRVT) Part 3: Demographic Effects (NISTIR 8280) · National Institute of Standards and Technology · Primary source · 2019-12-19 · NISTIR 8280, Executive summary (retrieved 2026-11-21)
Revision history (1)
- Page created.
Created Nov 21, 2026. Last reviewed by an editor on Nov 22, 2026. Next scheduled review: Jul 13, 2027.
Cite this page
"How computer vision works: CNNs, detection and ViTs." ContentLora, updated Nov 21, 2026. https://contentlora.com/explain/how-computer-vision-works
Spotted an error? Suggest a correction or emailcorrections@contentlora.com.