Module 11 of 21
Natural Language Processing
Current Study Module
AI - Computer Vision
Cognitive Computing
Chapter 10Visual Perception

Computer Vision: Convolutions, Feature Pyramids, Object Detection & Vision Transformers

Computer Vision transforms raw discrete pixel matrices into high-level spatial and semantic understandings of physical reality. Explore the mathematical mechanics of 2D convolutions, receptive fields, real-time object detectors, and Vision Transformers (ViT).

1. The Mathematical Foundation: 2D Spatial Discrete Convolutions

Unlike fully connected layers that discard spatial geometry, a 2D convolution slides a parameterized kernel matrixK ∈ ℝ^(k_h × k_w) over input image tensor I to extract localized features:

S(i, j) = (I * K)(i, j) = ∑_m ∑_n I(i + m, j + n) · K(m, n) + b

Translation Equivariance

Shifting an object in the input image shifts the representation by the exact same amount in the feature map: f(g(x)) = g(f(x)).

Weight Sharing

The identical kernel weights are reused across the entire image space, reducing parameter counts from billions to thousands.

Hierarchical Receptive Field

Early layers detect low-level edges and Gabor-like gradients; deeper layers compose these into textures, object parts, and semantic categories.

2. Classification, Detection & Segmentation Architectures

Task LevelGranularityCore Benchmark ArchitecturesEvaluation Metric
Image ClassificationEntire image assigned a single labelResNet-50, EfficientNet, ConvNeXtTop-1 / Top-5 Accuracy
Object DetectionCategory label + Spatial 2D/3D Bounding BoxYOLOv8, Faster R-CNN, DETR (Transformer)mAP@0.5, mAP@0.5:0.95
Semantic SegmentationPer-pixel classification without object instance identityFCN, DeepLabV3+, SegFormerMean Intersection over Union (mIoU)
Instance SegmentationPer-pixel mask delineating individual distinct objectsMask R-CNN, Segment Anything Model (SAM)Mask AP

3. The Vision Transformer (ViT) Paradigm Shift

Introduced by Dosovitskiy et al. (2020), Vision Transformers apply pure standard Transformer encoders directly to visual data:

  1. An image H × W × C is partitioned into a sequence of non-overlapping 2D patches (e.g. 16×16 pixels).
  2. Each patch is flattened into a 1D vector and linearly projected into a D-dimensional embedding space.
  3. A learnable [CLS] token and 1D positional embeddings are prepended to the sequence.
  4. Standard multi-head self-attention computes global pairwise relationships across all visual patches without inductive convolutional bias, outperforming CNNs at internet-scale pretraining.

Explore Related Tools

Hand-picked utilities and calculators related to this tool.

Related Tools