Computer Vision & Multimodal Learning Systems (Dive Deep)
Primary references:
- Computer Vision Hierarchy & Classical Processing — YouTube Lecture
- Scale-Invariant Feature Transform (SIFT) Implementation Notebook
- Affine SIFT (ASIFT) Technical Paper
- Speeded-Up Robust Features (SURF) Overview
- Oriented FAST and Rotated BRIEF (ORB) Introduction
- Harris Corner Detector Guide
- Canny Edge Detection Step-by-Step Tutorial
- Shape Matching Using Hu Moments
- Structural Similarity Index (SSIM) Image Comparison
- Feature-Based Image Alignment Using OpenCV
- Viola-Jones Object Detection Algorithm
- Focal Loss for Dense Object Detection (RetinaNet)
- DeepLab V3 Semantic Segmentation Tutorial
- MaX-DeepLab: Dual-Path Transformers for Panoptic Segmentation
- Vision Transformers (ViT) Paper & Paperspace Guide
- DETR: End-to-End Object Detection with Transformers
- DeNoising DETR (DINO) Technical Paper
- MLP-Mixer: An all-MLP Architecture for Vision
- Fourier Transform Applications in Deep Learning
- Neural Style Transfer Intuitive Guide
- Human Pose Estimation Guide
- Segment Anything Model (SAM) Breakdown
- SAM + XMem for Video Object Segmentation
- Generative Adversarial Networks (GANs) Original Paper
- Google ML Crash Course: GAN Problems
- V7 Labs Autoencoders Guide
- Variational Autoencoders (VAEs) Lecture & Notes
- Diffusion Models for Machine Learning Introduction
- MaskGIT: Masked Generative Image Transformer
- Attention Modules in CNNs (BAM and CBAM)
- Grad-CAM: Explanations from Deep Networks
- Saliency Maps and Interpretation Methods in Deep Learning
- OpenAI Contrastive Language-Image Pre-training (CLIP)
- BLIP: Bootstrapping Language-Image Pre-training
Overview
Computer vision encompasses algorithms, architectures, and pipelines designed to extract high-level semantic understanding, geometric structure, and generative control from digital images and videos. This document establishes an end-to-end technical reference spanning classical feature engineering, dense spatial segmentation, state-of-the-art transformer backbones, attention visualization, and multimodal generative architectures.
The field has evolved from hand-crafted filters, corners, edges, and local descriptors into learned convolutional, transformer-based, generative, and multimodal systems. Classical methods remain valuable because they are interpretable, data-efficient, and useful for geometric reasoning. Deep models dominate modern perception because they learn hierarchical representations directly from data.
Part 1: Classical Computer Vision & Feature Engineering
Computer vision hierarchy
Processing pipelines in computer vision are traditionally categorized into three hierarchical levels:
- Low-level vision (image-to-image): Operations such as filtering, blurring, sharpening, edge extraction, and optical-flow estimation that transform or analyze primitive pixel data.
- Intermediate-level vision (image-to-features): Extraction of symbolic features, contours, regions, and local descriptors from preprocessed image patches to support object recognition and 3D interpretation.
- High-level vision (features-to-analysis): Semantic clustering, classification, activity recognition, scene understanding, and intent interpretation.
Raw image
|
v
Low-level vision
- filtering
- gradients
- edges
- optical flow
|
v
Intermediate-level vision
- corners
- contours
- regions
- local descriptors
|
v
High-level vision
- classification
- detection
- segmentation
- scene understanding
This hierarchy is a useful mental model, although modern deep networks often learn several levels jointly rather than following it explicitly.
Local feature detectors and descriptors
Local features provide compact representations that can be matched across changes in viewpoint, scale, rotation, and illumination. A local feature pipeline generally has two components:
- Detector: finds repeatable image locations, such as corners, blobs, or extrema.
- Descriptor: converts the local neighborhood into a vector or binary signature for matching.
Scale-Invariant Feature Transform (SIFT)
Scale-Invariant Feature Transform, or SIFT, detects scale-space extrema using a Difference of Gaussians (DoG) pyramid. Keypoints are filtered to remove low-contrast responses and edge artifacts. Descriptors are built from gradient orientation histograms over local sub-regions, producing a 128-dimensional vector. ai.googleblog
Image
|
v
Gaussian pyramid
|
v
Difference of Gaussians
|
v
Scale-space extrema
|
v
Keypoint localization and filtering
|
v
Orientation assignment
|
v
128-dimensional SIFT descriptor
SIFT is robust to scale and rotation, but it is computationally more expensive than modern binary-feature methods.
Affine SIFT (ASIFT)
Affine SIFT, or ASIFT, extends SIFT by simulating a comprehensive set of camera-axis orientation parameters—commonly described as latitude and longitude—before applying standard SIFT. This provides stronger invariance to affine viewpoint changes than SIFT alone.
ASIFT is useful when the camera viewpoint changes substantially, but it multiplies the number of images that must be processed and therefore increases computation.
Speeded-Up Robust Features (SURF)
Speeded-Up Robust Features, or SURF, approximates Hessian-matrix determinants using box filters evaluated rapidly through integral images, also called summed-area tables. SURF produces 64-dimensional descriptors and was designed to be faster than SIFT while retaining reasonable robustness.
| Method | Descriptor type | Typical dimension | Main strength |
|---|---|---|---|
| SIFT | Floating-point gradient histogram | 128 | Strong scale and rotation robustness |
| ASIFT | SIFT over simulated viewpoints | 128 | Strong affine invariance |
| SURF | Floating-point descriptor | 64 | Faster Hessian-based detection |
| ORB | Binary descriptor | 256 bits | Fast, lightweight, license-friendly |
Oriented FAST and Rotated BRIEF (ORB)
Oriented FAST and Rotated BRIEF, or ORB, combines the FAST keypoint detector with a BRIEF binary descriptor. It adds multi-scale image pyramids and orientation assignment to improve rotation invariance. ORB is widely used in real-time systems because binary descriptors are efficient to compute and match.
FAST detector
|
v
Multi-scale pyramid
|
v
Orientation assignment
|
v
Rotated BRIEF descriptor
|
v
Binary feature matching
ORB is often preferred for embedded and real-time applications where SIFT or SURF may be too slow or license-restricted.
Edge detection and image enhancement
Canny edge detection
Canny edge detection is a multi-stage edge detector:
- Apply Gaussian smoothing to suppress noise.
- Compute image gradients, commonly with Sobel operators.
- Apply non-maximum suppression along gradient directions.
- Apply hysteresis thresholding using high and low thresholds to connect edge segments.
where:
- $I$ is the input image.
- $G_x$ and $G_y$ are horizontal and vertical gradients.
- $G$ is gradient magnitude.
- $\theta$ is gradient direction.
Non-maximum suppression keeps only local maxima along the gradient direction. Hysteresis thresholding connects weak edges to strong edges, reducing fragmented edge maps.
Harris corner detector
The Harris corner detector identifies points where intensity changes significantly in multiple directions. It computes a structure tensor from local image gradients:
\[M = \sum_{x,y} w(x,y) \begin{bmatrix} I_x^2 & I_x I_y \\ I_x I_y & I_y^2 \end{bmatrix}\]where:
- $I_x$ and $I_y$ are image gradients.
- $w(x,y)$ is a windowing function, often Gaussian.
The Harris response is commonly computed as:
\[R = \det(M) - k \cdot \text{trace}(M)^2\]where $k$ is a sensitivity parameter, often around 0.04 to 0.06.
Corners produce large positive Harris responses because the eigenvalues of $M$ are both large. Edges produce one large and one small eigenvalue. Flat regions produce two small eigenvalues.
Structural Similarity Index (SSIM)
Structural Similarity Index, or SSIM, evaluates perceived structural degradation between two images by comparing luminance, contrast, and structure. SSIM values fall within $[-1, 1]$, where $1$ denotes identical structure.
\[\text{SSIM}(x,y) = \frac{ (2\mu_x\mu_y + C_1)(2\sigma_{xy} + C_2) }{ (\mu_x^2 + \mu_y^2 + C_1)(\sigma_x^2 + \sigma_y^2 + C_2) }\]where:
- $x$ and $y$ are image patches.
- $\mu_x$ and $\mu_y$ are local means.
- $\sigma_x^2$ and $\sigma_y^2$ are local variances.
- $\sigma_{xy}$ is local covariance.
- $C_1$ and $C_2$ stabilize division.
SSIM is generally more perceptually meaningful than mean squared error (MSE), although neither metric perfectly captures human perception.
Geometric alignment
Homography
A homography relates two views of the same planar surface in 3D space. It is a $3 \times 3$ projective transformation:
\[\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} \sim H \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}\]where:
- $(x, y)$ is a point in the first image.
- $(x’, y’)$ is the corresponding point in the second image.
- $H$ is a $3 \times 3$ homography matrix.
- $\sim$ denotes equality up to scale.
A homography has eight degrees of freedom after scale normalization. At least four non-collinear point correspondences are required to estimate it.
RANSAC
Random Sample Consensus, or RANSAC, estimates geometric models while rejecting outliers.
Repeat:
1. Randomly select minimum number of correspondences
2. Estimate homography
3. Count inliers within error threshold
4. Keep model with most inliers
5. Refit model using all inliers
RANSAC is robust to incorrect feature matches, but it is stochastic and may require many iterations when the outlier ratio is high.
Part 2: Dense Prediction, Object Detection, and Segmentation
Object detection fundamentals
Object detection answers two questions:
- What objects are present?
- Where are they located?
Traditional detectors often use sliding windows, hand-crafted features, and classifiers. Modern detectors use convolutional or transformer backbones, learned region proposals or object queries, and differentiable losses.
Focal loss and RetinaNet
Single-stage detectors evaluate dense grids of candidate anchor boxes but suffer from extreme class imbalance during training, where background regions dominate foreground objects. Focal loss dynamically scales cross-entropy loss based on prediction confidence to down-weight easy background examples. ai.googleblog
Given the model’s estimated probability $p_t$ for the ground-truth class, focal loss is:
\[\text{FL}(p_t) = -\alpha_t(1 - p_t)^\gamma \log(p_t)\]where:
- $p_t$ is the predicted probability for the ground-truth class.
- $\alpha_t$ balances class frequencies.
- $\gamma$ is the focusing parameter.
- Larger $\gamma$ reduces the contribution of easy examples.
RetinaNet uses $\alpha = 0.25$ and $\gamma = 2$ in its original formulation. ai.googleblog
Easy background example:
p_t close to 1
(1 - p_t)^gamma close to 0
Loss contribution small
Hard foreground example:
p_t low
(1 - p_t)^gamma close to 1
Loss contribution large
Semantic segmentation
Semantic segmentation assigns a class label to every pixel.
Input image
|
v
Encoder / backbone
|
v
Multi-scale feature extraction
|
v
Decoder / upsampling
|
v
Per-pixel class probabilities
DeepLab V3
DeepLab V3 uses atrous, or dilated, convolutions to expand the receptive field without reducing spatial resolution. It also uses Atrous Spatial Pyramid Pooling (ASPP) with dilation rates $$ to capture multi-scale contextual features. ai.googleblog
Input image
|
v
Backbone CNN
|
v
ASPP with dilated convolutions
|
v
Feature fusion
|
v
Upsampling
|
v
Per-pixel segmentation mask
Atrous convolution inserts gaps between kernel elements, allowing the network to enlarge its receptive field without adding parameters or reducing resolution.
Panoptic segmentation
Panoptic segmentation unifies semantic segmentation and instance segmentation. It assigns a class label to every pixel and distinguishes individual object instances for countable categories such as people, cars, and animals. ai.googleblog
| Task | Output |
|---|---|
| Semantic segmentation | One class label per pixel |
| Instance segmentation | One mask per object instance |
| Panoptic segmentation | Non-overlapping masks with class labels for both things and stuff |
MaX-DeepLab
MaX-DeepLab is a fully end-to-end panoptic segmentation model that directly predicts class-labeled masks using a mask transformer. It removes many hand-designed intermediate components, such as anchor design, box assignment, non-maximum suppression, and thing-stuff merging. ai.googleblog
Its dual-path architecture combines:
- A convolutional pixel path.
- A global memory path.
- Dual-path transformer blocks that allow CNN layers to read from and write to global memory. ai.googleblog
Input image
|
+--> CNN pixel path ----+
| |
+--> Global memory path-+
| |
v v
Dual-path transformer blocks
|
v
Stacked-hourglass decoder
|
v
Mask set + class predictions
|
v
Panoptic segmentation output
MaX-DeepLab directly predicts $N$ masks and $N$ classes, optimized with a Panoptic Quality-style objective and one-to-one matching between predicted and ground-truth masks. ai.googleblog
Google reported that MaX-DeepLab achieved 51.3% Panoptic Quality on the COCO test-dev set without test-time augmentation, a 7.1% Panoptic Quality gain over Axial-DeepLab in the box-free regime. ai.googleblog
Part 3: Vision Transformers and Modern Architectures
Vision Transformer (ViT)
Vision Transformers adapt the standard natural-language-processing transformer encoder to image recognition by processing non-overlapping flattened image patches. ai.googleblog
Input image
|
+-- Split into patches --> [Patch 1, Patch 2, ..., Patch N]
|
+-- Linear projection --> Patch embeddings + learnable [class] token
|
+-- Position encoding --> Add spatial information
|
+-- Transformer encoder --> Multi-head self-attention + MLP blocks
|
+-- Classification head --> Read [class] token output
For an image of size $H \times W \times C$, patch size $P$, and embedding dimension $D$, the number of patches is:
\[N = \frac{H}{P} \times \frac{W}{P}\]Each patch is flattened and linearly projected into a $D$-dimensional token embedding.
Self-attention computes relationships among all patch tokens:
\[\text{Attention}(Q,K,V) = \text{softmax}\left(\frac{QK^T}{\sqrt{d_k}}\right)V\]where:
- $Q$, $K$, and $V$ are query, key, and value matrices.
- $d_k$ is the key dimension.
The main trade-off is that standard self-attention has quadratic complexity in the number of tokens:
\[O(N^2)\]This becomes expensive for high-resolution images or small patch sizes.
Detection Transformer (DETR)
DETR casts object detection directly as a set-prediction problem, eliminating hand-crafted components such as anchor generation and non-maximum suppression. It uses a convolutional backbone, a transformer encoder-decoder, and a fixed set of $N$ learned object queries. ai.googleblog
Input image
|
v
CNN backbone
|
v
Transformer encoder
|
v
Transformer decoder
|
+-- Object query 1 --> box + class
+-- Object query 2 --> box + class
+-- ...
+-- Object query N --> box + class
DETR uses bipartite matching with the Hungarian algorithm to assign each prediction to at most one ground-truth object. This removes duplicate detections and avoids non-maximum suppression.
DeNoising DETR (DINO)
DeNoising DETR, or DINO, improves DETR-style detectors by introducing denoising training. During training, the model receives noised ground-truth boxes and learns to reconstruct the original boxes, improving query initialization and convergence.
Ground-truth boxes
|
v
Add controlled noise
|
v
Noisy box queries
|
v
Transformer decoder
|
v
Reconstructed boxes
DINO retains the end-to-end set-prediction formulation while improving training stability and detection performance.
MLP-Mixer
MLP-Mixer is an all-MLP vision architecture. Instead of using self-attention, it alternates:
- Token-mixing MLPs across patch positions.
- Channel-mixing MLPs across feature channels.
Input patches
|
v
Patch normalization
|
v
Token-mixing MLP
|
v
Channel-mixing MLP
|
v
Repeated blocks
|
v
Classification head
MLP-Mixer demonstrates that attention is not strictly required for strong image classification, although transformers generally remain more flexible for many vision-language and dense-prediction tasks.
Part 4: Generative Computer Vision Models
Autoencoders
An autoencoder learns a compressed latent representation of an input and reconstructs the input from that representation.
Input image x
|
v
Encoder E(x)
|
v
Latent code z
|
v
Decoder D(z)
|
v
Reconstruction x_hat
The reconstruction objective is commonly:
\[\mathcal{L}_{\text{recon}} = \|x - D(E(x))\|^2\]Autoencoders are useful for denoising, compression, anomaly detection, and representation learning. A standard autoencoder does not necessarily learn a well-structured generative latent space.
Variational Autoencoders (VAEs)
A Variational Autoencoder parameterizes an approximate latent distribution $q_\phi(z \mid x)$ by predicting a mean $\mu$ and variance $\sigma^2$. To enable backpropagation through stochastic sampling, it uses the reparameterization trick:
\[z = \mu + \sigma \odot \epsilon, \qquad \epsilon \sim \mathcal{N}(0, I)\]where:
- $z$ is the latent variable.
- $\mu$ is the predicted mean.
- $\sigma$ is the predicted standard deviation.
- $\epsilon$ is sampled noise.
- $\odot$ denotes element-wise multiplication.
The VAE optimizes the Evidence Lower Bound (ELBO):
\[\mathcal{L}_{\text{VAE}} = \mathbb{E}_{q_\phi(z \mid x)} \left[ -\log p_\theta(x \mid z) \right] + D_{\text{KL}} \left( q_\phi(z \mid x) \parallel p(z) \right)\]where:
- $p_\theta(x \mid z)$ is the decoder likelihood.
- $p(z)$ is the prior, commonly $\mathcal{N}(0, I)$.
- $D_{\text{KL}}$ is the Kullback-Leibler divergence.
The first term encourages accurate reconstruction. The KL term regularizes the latent distribution toward the prior.
Generative Adversarial Networks (GANs)
A Generative Adversarial Network trains two networks in competition:
- A generator $G$ maps noise $z$ to an image.
- A discriminator $D$ distinguishes real images from generated images.
Noise z
|
v
Generator G
|
v
Fake image
|
+--> Discriminator D --> real or fake
|
Real image ------------------^
The original minimax objective is:
\[\min_G \max_D \mathbb{E}_{x \sim p_{\text{data}}} [\log D(x)] + \mathbb{E}_{z \sim p_z} [\log(1 - D(G(z)))]\]where:
- $x$ is a real image.
- $z$ is a latent noise vector.
- $G(z)$ is a generated image.
- $D(x)$ is the discriminator’s probability that $x$ is real.
GANs can produce sharp images but are notoriously unstable. Common problems include mode collapse, non-convergence, vanishing gradients, and sensitivity to hyperparameters.
Diffusion models
Diffusion models generate data by learning to reverse a fixed Markov chain of forward Gaussian noising steps. Starting from a data sample $x_0$, noise is progressively added across $T$ timesteps to produce $x_1, \ldots, x_T$. ai.googleblog
Forward diffusion:
x_0 -> x_1 -> x_2 -> ... -> x_T
Reverse denoising:
x_T -> x_T-1 -> ... -> x_1 -> x_0
The forward process is commonly:
\[q(x_t \mid x_{t-1}) = \mathcal{N} \left( x_t; \sqrt{1 - \beta_t}x_{t-1}, \beta_t I \right)\]where:
- $\beta_t$ is a variance schedule.
- $x_t$ is the noisy sample at timestep $t$.
The model learns the reverse process:
\[p_\theta(x_{t-1} \mid x_t)\]typically by predicting the noise added at each step.
Diffusion models generally produce high-quality samples and train more stably than GANs, but they require multiple denoising steps at inference, increasing latency.
MaskGIT
MaskGIT is a masked generative image transformer. It first encodes an image into discrete visual tokens, then generates an image by iteratively predicting and unmasking tokens.
Image
|
v
Visual tokenizer
|
v
Masked token sequence
|
v
Transformer predicts masked tokens
|
v
Iterative unmasking
|
v
Generated image
MaskGIT can generate images with fewer sampling iterations than autoregressive token models because it predicts multiple tokens in parallel at each step.
Part 5: Attention Mechanisms and Explainability
Channel and spatial attention
Attention modules help convolutional networks emphasize informative channels and spatial locations.
Bottleneck Attention Module (BAM)
The Bottleneck Attention Module computes attention at network bottlenecks using parallel channel and spatial sub-modules. It suppresses irrelevant low-level background features and emphasizes task-relevant information.
Feature map F
|
+--> Channel attention --> M_c
|
+--> Spatial attention --> M_s
|
v
Refined feature map
F' = F + F * M_c * M_s
Convolutional Block Attention Module (CBAM)
CBAM applies channel attention followed by spatial attention.
Feature map F
|
v
Channel attention
- average pooling
- max pooling
- shared MLP
|
v
Spatial attention
- channel-wise pooling
- convolution
- sigmoid
|
v
Refined feature map
Channel attention answers: “Which feature channels matter?”
Spatial attention answers: “Which image locations matter?”
Grad-CAM
Gradient-weighted Class Activation Mapping, or Grad-CAM, produces coarse localization heatmaps by computing gradients of a target class score $y^c$ with respect to feature maps $A^k$ from a chosen convolutional layer. ai.googleblog
The importance weight for feature map $k$ is:
\[\alpha_k^c = \frac{1}{Z} \sum_i \sum_j \frac{\partial y^c}{\partial A_{i,j}^k}\]where:
- $y^c$ is the score for class $c$.
- $A_{i,j}^k$ is activation at spatial position $(i,j)$ in feature map $k$.
- $Z$ is the number of spatial positions.
The final heatmap is:
\[L_{\text{Grad-CAM}}^c = \text{ReLU} \left( \sum_k \alpha_k^c A^k \right)\]ReLU retains only features with a positive influence on the target class.
Input image
|
v
CNN feature maps
|
v
Target-class gradients
|
v
Global-average-pooled weights
|
v
Weighted feature-map combination
|
v
ReLU
|
v
Class activation heatmap
Grad-CAM is useful for debugging, but it is an explanation method, not proof of causality.
Saliency maps
Saliency maps highlight input pixels that most influence a model’s prediction. A simple saliency method computes the gradient of the class score with respect to the input image:
\[S = \left| \frac{\partial y^c}{\partial x} \right|\]where:
- $y^c$ is the score for class $c$.
- $x$ is the input image.
- $S$ is the saliency map.
Large gradient magnitudes indicate input locations where a small change would most affect the class score.
Part 6: Multimodal Learning
Contrastive Language-Image Pre-training (CLIP)
Contrastive Language-Image Pre-training, or CLIP, jointly trains an image encoder and a text encoder on web-scale image-caption pairs using a symmetric contrastive loss. It maximizes cosine similarity between matching image-text pairs while minimizing similarity across incorrect pairings in the batch. ai.googleblog
Image batch:
[I1, I2, ..., IN]
Text batch:
[T1, T2, ..., TN]
Similarity matrix:
T1 T2 T3
I1 [ high low low ]
I2 [ low high low ]
I3 [ low low high]
For a batch of $N$ image-text pairs, the image-to-text contrastive loss is:
\[\mathcal{L}_{I \rightarrow T} = -\frac{1}{N} \sum_{i=1}^{N} \log \frac{ \exp(\text{sim}(I_i, T_i)/\tau) }{ \sum_{j=1}^{N} \exp(\text{sim}(I_i, T_j)/\tau) }\]where:
- $I_i$ is an image embedding.
- $T_j$ is a text embedding.
- $\text{sim}$ is cosine similarity.
- $\tau$ is a learned temperature parameter.
CLIP enables zero-shot classification by comparing an image embedding with text embeddings for candidate labels.
BLIP
Bootstrapping Language-Image Pre-training, or BLIP, extends CLIP’s dual-encoder alignment with a unified encoder-decoder mixture architecture. It supports both multimodal understanding tasks, such as retrieval and classification, and generative tasks, such as captioning and visual question answering. ai.googleblog
Image + text
|
v
Shared multimodal backbone
|
+--> Image-text contrastive learning
|
+--> Image-text matching
|
+--> Language modeling / captioning
BLIP also introduces synthetic caption bootstrapping: it generates captions for web images, filters noisy text, and uses the improved data to enhance pre-training.
Segment Anything Model (SAM)
The Segment Anything Model, or SAM, is a promptable segmentation foundation model. It can produce segmentation masks from prompts such as points, boxes, or text, depending on the deployment configuration.
Image + prompt
|
v
Image encoder
|
v
Prompt encoder
|
v
Mask decoder
|
v
Segmentation masks
SAM is useful for interactive segmentation, dataset annotation, and video object segmentation when combined with a memory-based tracker such as XMem.
Part 7: Applications
Image alignment
Feature-based image alignment uses local features and geometric model estimation:
Image A and Image B
|
v
Detect keypoints
|
v
Compute descriptors
|
v
Match descriptors
|
v
Estimate homography with RANSAC
|
v
Warp Image B to Image A
This is the foundation of panorama stitching, document alignment, augmented reality, and image registration.
Neural style transfer
Neural style transfer combines:
- Content representation from one image.
- Style representation from another image.
- Optimization or feed-forward generation to synthesize a stylized output.
Content image
|
+--> Content loss
|
Style image
|
+--> Style loss
|
v
Generated image
The original optimization approach minimizes content reconstruction error while matching Gram-matrix statistics of style features.
Human pose estimation
Human pose estimation detects body keypoints and connects them into a skeleton.
Input image
|
v
Human detector
|
v
Keypoint heatmaps
|
v
Keypoint decoding
|
v
Skeleton
Applications include fitness analysis, sports analytics, animation, augmented reality, and human-computer interaction.
Video object segmentation
Video object segmentation tracks and segments an object across frames.
First-frame mask
|
v
SAM segmentation
|
v
XMem memory module
|
v
Per-frame object mask
SAM provides strong promptable segmentation, while a memory module such as XMem helps maintain object identity across frames.
Part 8: Limitations and Open Questions
Computational complexity
Attention-based mechanisms such as standard Vision Transformers and dense transformer decoders incur quadratic complexity relative to spatial resolution or token count:
\[O(N^2)\]where $N$ is the number of tokens. This makes high-resolution images, video, and dense prediction expensive.
Small object detection
Global reasoning models can struggle with small objects that occupy only a few pixels. Feature pyramid networks, high-resolution feature maps, multi-scale heads, and local attention mechanisms can help.
Generative model limitations
| Model family | Main limitation |
|---|---|
| GANs | Mode collapse, unstable training, convergence failures |
| VAEs | Blurry reconstructions and weaker sample quality |
| Diffusion models | Multi-step sampling increases inference latency |
| Autoregressive models | Sequential token generation is slow |
| Masked generative models | Requires discrete tokenization and iterative decoding |
Interpretability limitations
Grad-CAM and saliency maps are useful diagnostic tools, but they do not prove causal explanations. They can highlight correlations, be sensitive to architecture and input perturbations, and fail to capture higher-level reasoning.
Data and bias
Vision models inherit biases from training data. Multimodal models can associate demographic attributes, objects, scenes, and captions in ways that produce unfair or unsafe behavior. Evaluation must include demographic slices, geographic coverage, adversarial cases, and failure analysis.
Final Technical Takeaways
- Hierarchical progression: Low-level operators such as Canny, Harris, SIFT, and ORB provide geometric foundations, while convolutional and transformer backbones deliver high-level semantic abstraction.
- Feature matching: SIFT, ASIFT, SURF, and ORB remain useful for alignment, retrieval, and geometric vision, especially when labeled data is limited.
- Hard constraints matter: Focal loss addresses extreme foreground-background imbalance in dense object detection.
- End-to-end set prediction: DETR, DINO, and MaX-DeepLab reduce reliance on anchors, boxes, and non-maximum suppression by using learned queries, bipartite matching, and mask transformers. ai.googleblog
- Attention improves selectivity: BAM and CBAM refine features by emphasizing important channels and spatial locations.
- Explainability is approximate: Grad-CAM and saliency maps provide useful diagnostics but are not causal proof.
- Multimodal alignment: CLIP learns a shared vision-language embedding space, while BLIP extends this toward captioning and visual question answering.
- Main trade-off: Transformers and diffusion models provide strong capability but require more compute, memory, and inference time than classical or convolutional alternatives.
- Broader implication: Modern computer vision is a layered system: geometric foundations, learned perception, generative modeling, multimodal alignment, and explainability must be designed together.