Vision Beyond Classification
Vision Beyond Classification
Why Classification Is Not Enough
Visual scenes contain far more information than a small set of category labels. Human perception captures rich details about:
The identities and locations of objects
The number of objects present
The relationships between objects
Object poses and orientations
The camera viewpoint
Motion and changes over time
The physical structure and layout of the scene
Vision is especially important because a large proportion of information about the surrounding world is obtained through sight. However, a standard image classifier produces only a sparse description. For example, an image classifier such as ResNet-50 might label a scene with terms such as “bicycle” and “garden.” These labels may be correct but still fail to describe the scene adequately.
A richer interpretation might identify:
Two bicycles rather than one
People associated with the bicycles
The orientation of each bicycle and person
The unusual fact that one bicycle and person appear upside down
The camera’s top-down viewpoint
The fact that the image was captured from above, possibly by a drone
The spatial relationships among the objects
This illustrates the distinction between classification and scene understanding. Classification identifies broad categories, whereas scene understanding attempts to parse the complete visual situation.
Human-level scene understanding requires a system to infer the objects, attributes, spatial relationships, poses, viewpoint, and other meaningful structure present in a visual environment.
Achieving this capability would support many applications:
Assistive technology: helping visually impaired people navigate environments
Virtual and augmented reality: understanding real-world scenes so that virtual content can interact with them
Robotics: allowing robots to perceive and interact with objects
Autonomous vehicles: interpreting roads, vehicles, pedestrians, and traffic situations
Neuroscience: providing computational models that may improve understanding of biological vision
Designing such a system is difficult because many interconnected decisions must be made:
Which visual tasks should be solved?
In what order should the tasks be addressed?
What form should the input take?
What structure should the output have?
Which assumptions or priors about the world should be built into the model?
Should the model learn everything end-to-end?
How can accuracy be improved without making the system too slow or energy-intensive?
The design space is therefore extremely large.
Extending the Deep Learning Framework
Deep learning can be viewed as a flexible computational framework consisting of:
Input nodes, which receive data such as images or videos
Computational nodes, which transform the data
Output nodes, which produce predictions
A loss function, which compares predictions with desired targets and provides a training signal
The same general framework can be adapted to different visual tasks by changing:
The input representation
The output representation
The loss function
The type and amount of supervision
The progression beyond supervised image classification can be understood by replacing the components of the phrase “supervised image classification”:
Replace classification to obtain different visual tasks
Replace image to use pairs of images or videos
Replace supervised to use weaker or self-generated forms of supervision
Visual Tasks Beyond Classification
Visual tasks can be arranged according to the granularity of the scene description they produce.
Classification: one or a few labels for the entire image
Object detection: object categories and approximate locations
Semantic segmentation: a category label for every pixel
Instance segmentation: a separate mask for every individual object
Other important tasks include image captioning and pose estimation.
Image Captioning
In image captioning, a system receives an image and generates a language description, such as:
“Two beach chairs under an umbrella on the beach.”
This can be formulated in two ways:
Closed-set prediction: the system chooses one answer from a fixed list of possible descriptions
Free-form generation: the system generates a new sentence using a language model
Free-form generation is more difficult because the system must produce a meaningful sequence of words rather than select a single predefined class. However, it can also be more expressive and useful.
Human Pose Estimation
Pose estimation identifies key points on the human body, such as:
Head
Shoulders
Elbows
Hands
Hips
Knees
Feet
Tracking these key points allows a system to infer the position and configuration of people in a scene. Pose estimation is useful in applications such as:
Video games
Motion capture
Human-computer interaction
Sports analysis
Robotics
Activity recognition
Object Detection
Definition
Object detection is a multitask problem that combines:
Classification: determining the category of each object
Localization: determining where each object is located in the image
For example, a detector might determine that an object is a sheep and place a bounding box around it.
Inputs and Outputs
The input is generally an RGB image represented by:
Height
Width
Three color channels
For each object, the desired output includes:
A class label
A bounding box
A class label may be represented using a one-hot vector. If there are K possible classes, the vector contains zeros everywhere except at the index corresponding to the object’s class.
A bounding box is commonly parameterized by four continuous values:
The x-coordinate of the center
The y-coordinate of the center
The height
The width
The complete output must contain a variable-length list of objects because different images contain different numbers of objects.
A detection dataset therefore stores, for each image:
The RGB image
A list of ground-truth objects
The one-hot class label of each object
The four bounding-box coordinates of each object
Classification Versus Regression
Classification and bounding-box prediction require different types of outputs.
Classification
Classification maps an input to one of several predefined categories.
Output: discrete
Example: cat, car, chair
Loss: commonly cross entropy
Labels have no meaningful numerical order
Confusing a cat with a chair is not naturally “less wrong” than confusing a cat with a car. The categories are discrete and unordered.
Regression
Regression maps an input to one or more continuous numerical values.
Output: continuous
Example: bounding-box coordinates
Loss: often quadratic or mean-squared error
Numerical outputs have an ordering
A predicted bounding box can be judged as too far left, too far right, too large, or too small. These differences provide a meaningful directional training signal.
If t is the ground-truth bounding box and x is the predicted bounding box, a simple quadratic loss is:
For a dataset with multiple samples, the mean squared error can be minimized:
The continuous nature of bounding-box coordinates makes regression appropriate for localization.
Assigning Predictions to Objects
A major difficulty arises when an image contains multiple objects. The system may produce several predictions, but each prediction must be matched to the correct ground-truth object.
Simply assigning each prediction to the nearest ground-truth box can produce ambiguous or unstable matches. A common strategy is therefore to divide detection into two stages:
Classification or objectness prediction: determine which candidate regions are likely to contain objects
Regression: refine the coordinates of those candidate regions
This converts the difficult global localization problem into a coarse-to-fine problem.
Discretizing the Bounding-Box Space
Continuous coordinate prediction can be made easier by discretizing the possible locations and sizes.
Center Coordinates
Anchor points are distributed uniformly over the image. These anchors provide candidate center locations.
Height and Width
Candidate boxes are generated using different:
Scales
Aspect ratios
If there are A candidate shapes for each anchor, the total number of initial candidates is related to the number of anchors multiplied by A.
The system first predicts whether each candidate contains an object. It then retains the most promising candidates and applies regression to refine their coordinates.
This resembles a “hot and cold” search:
The first stage identifies the general region where an object is located
The second stage makes a precise prediction within that region
Two-Stage Object Detection: Faster R-CNN
Overall Structure
Faster R-CNN is a two-stage detector. Its main stages are:
Generate promising candidate regions
Classify and refine those regions
The image first passes through convolutional layers involving operations such as:
Convolution
ReLU activation
Pooling
These layers produce feature maps. A region proposal branch then uses the feature maps to identify candidate bounding boxes.
The features corresponding to the selected regions are extracted and passed to later layers that:
Classify the object
Refine the bounding-box coordinates through regression
Region Proposal Network
The first stage is called a Region Proposal Network, or RPN.
For each anchor and candidate box shape, the RPN predicts an objectness score:
High score: the region likely contains an object
Low score: the region likely contains background
The RPN does not initially need to identify the object category. It only determines whether an object is present.
The highest-scoring candidate boxes are retained and passed to the second stage.
Training Procedure
The region proposal operation involves selecting and cropping candidate regions. This selection is generally non-differentiable because it involves discrete choices such as ranking and retaining only certain boxes.
As a result, gradients cannot easily be backpropagated through the entire process. In particular, the candidate boxes are often fixed or generated separately rather than learned fully through end-to-end differentiation.
Training is therefore commonly separated into stages:
Train the Region Proposal Network using objectness labels
Insert the trained proposal network into the larger detector
Train the classification and bounding-box regression components
An objectness label is assigned by checking whether a candidate box overlaps sufficiently with a ground-truth box.
The overlap is often measured using intersection over union, discussed later.
Advantages and Limitations
Advantages:
Strong detection accuracy
Effective candidate selection
Coarse-to-fine localization
Limitations:
More complicated training
Multiple stages
Non-differentiable candidate-selection operations
Lower speed than many one-stage detectors
Faster R-CNN can run at several frames per second, but a simpler end-to-end detector can be faster and easier to train.
One-Stage Object Detection: RetinaNet
Overall Structure
RetinaNet is a one-stage detector. It predicts object classes and bounding-box coordinates directly from convolutional feature maps without a separate region proposal stage.
Unlike a detector that uses features at only one spatial resolution, RetinaNet uses a hierarchy of features at multiple resolutions. Predictions are made at different scales so that objects of different sizes can be detected.
The prediction heads typically produce:
Class predictions with approximately K×A outputs
Bounding-box predictions with approximately 4×A outputs
Here:
K is the number of object classes
A is the number of anchor shapes
4 represents the four bounding-box coordinates
The Class Imbalance Problem
A one-stage detector evaluates a very large number of candidate boxes. Most of these candidates correspond to background rather than objects.
This creates a severe imbalance:
A small number of positive examples contain objects
A very large number of negative examples contain only background
If all examples contribute equally to the classification loss, the easy background examples dominate the training signal. The model may achieve a low average loss while learning relatively little about the difficult object examples.
Hard Negative Mining
One strategy for handling class imbalance is hard negative mining.
The process is:
Construct a training set containing all or many positive examples
Select a manageable subset of background negatives
Train the detector on this more balanced set
Test the detector on unseen images
Identify false positives
Add those difficult negative examples to the training set
Retrain the detector
Repeat the procedure if necessary
The false positives are valuable because they are difficult examples that the detector incorrectly classifies as objects.
Hard negative mining can improve learning, but it is complicated because the training set must be repeatedly updated.
Focal Loss
RetinaNet uses a simpler solution called focal loss. Instead of manually selecting difficult negatives, focal loss changes the classification loss so that easy, correctly classified examples receive less weight.
A typical focal loss has the form:
where:
pt is the predicted probability assigned to the correct class
α balances the importance of positive and negative examples
γ controls how strongly easy examples are down-weighted
When the model is already confident and correct, pt is large. Therefore, the factor (1−pt)γ becomes small, reducing the contribution of that example.
When the model is uncertain or incorrect, pt is small, so the example retains a larger loss and a stronger influence on learning.
Focal loss focuses training on difficult examples while reducing the contribution of numerous easy background examples.
RetinaNet provides:
End-to-end training
No separate region proposal stage
Simpler optimization
Faster operation than the two-stage approach in the discussed comparison
Strong detection accuracy
Semantic Segmentation
Motivation
Bounding boxes provide only a rough approximation of an object’s shape. They may include large amounts of background, especially for objects with irregular shapes or extended poses.
For example, a person standing with arms spread may receive a very wide bounding box. Many pixels inside the box may belong to the background rather than the person.
Semantic segmentation gives a more precise representation by assigning a class label to every pixel.
Definition
Semantic segmentation is the task of predicting a category for each pixel in an image.
Possible pixel labels might include:
Person
Sheep
Dog
Car
Road
Sky
Background
Unlike image classification, which produces one label for the entire image, semantic segmentation produces a dense spatial output.
If the input has height H and width W, and there are K classes, the output can be viewed as a tensor of dimensions:
At each pixel location, the network produces a probability distribution over the K possible classes.
Pooling and the Need for Upsampling
Convolutional networks commonly use pooling to reduce spatial resolution. Pooling has two major purposes:
Reduce computational cost
Increase the receptive field of deeper units
A larger receptive field allows a unit to incorporate more context and learn more abstract features.
For a pooling window, the output may contain:
The mean value
The maximum value
However, repeated pooling causes the feature maps to become spatially small. A semantic segmentation system must restore the output to the original image resolution.
This requires an upsampling or “unpooling” process.
Nearest-Neighbor Upsampling
The simplest approach is nearest-neighbor upsampling:
Take a value in the low-resolution feature map
Copy it into the corresponding region of a larger feature map
Repeat for all values
This produces a larger output but often results in coarse, block-like or blobby predictions.
Unpooling with Indices
During max pooling, the system can preserve the location of the maximum value within each pooling window. These locations are sometimes called argmax indices.
During unpooling:
The pooled value is placed back at the location where the maximum occurred
The remaining positions are left empty
A convolutional layer fills in and smooths the resulting feature map
This preserves more spatial information than simple nearest-neighbor copying.
Deconvolution or Transposed Convolution
Another approach uses a learned upsampling operation commonly called deconvolution or transposed convolution. It learns how to reconstruct higher-resolution feature maps from lower-resolution representations.
These methods attempt to recover sharper boundaries and spatial details that can be lost during pooling.
U-Net for Semantic Segmentation
Encoder-Decoder Structure
U-Net is an encoder-decoder architecture originally designed for medical image segmentation.
Encoder
The encoder processes the input through repeated blocks of:
Convolution
ReLU activation
Pooling
It gradually reduces spatial resolution while increasing the level of abstraction.
Bottleneck
At the bottleneck:
Spatial resolution is low
The representation contains broad contextual information
Features have large receptive fields
Decoder
The decoder progressively upsamples the representation to recover the original spatial resolution.
The final output has the same spatial dimensions as the input, with a class distribution at each pixel.
Skip Connections
U-Net uses long skip connections between encoder and decoder layers at matching spatial resolutions.
These connections are important for two reasons:
They restore high-frequency spatial details lost during pooling
They make gradient propagation easier during training
The encoder captures semantic information but may lose precise boundaries. The skip connections provide the decoder with earlier, higher-resolution features that preserve object contours and fine details.
The architecture therefore combines:
Deep, abstract features from the bottleneck
Detailed spatial features from earlier encoder layers
Training Objective
The network predicts a probability distribution over classes at every pixel. The same cross-entropy principle used in classification can be applied independently at each location.
If yi,k indicates whether pixel i belongs to class k, and pi,k is the predicted probability, the pixelwise cross-entropy can be written as:
where:
N is the number of pixels
K is the number of classes
The loss is averaged over all spatial locations.
Instance Segmentation
Semantic segmentation does not distinguish between different objects belonging to the same class. If two sheep overlap, semantic segmentation may produce one connected region labeled sheep, without indicating where one sheep ends and the other begins.
Instance segmentation solves this problem by combining:
Object detection
Semantic segmentation
It identifies:
The class of each object
The location of each object
A separate pixel mask for every individual instance
Thus, two overlapping sheep receive two distinct masks even though they share the same semantic class.
Mask R-CNN is an important example of an instance segmentation method. It extends object detection by predicting a segmentation mask for each detected object.
Evaluating Visual Models
Classification Accuracy
Classification is often evaluated using accuracy:
Top-One Accuracy
A prediction is correct only if the highest-probability class is the ground-truth class.
Top-Five Accuracy
A prediction is considered correct if the ground-truth class appears among the model’s five highest-probability predictions.
Top-five accuracy is useful when:
Classes are visually similar
The distinction is difficult even for humans
Several predictions are plausible
Intersection over Union
The training loss for object detection may be mean squared error on box coordinates, but that loss is not ideal for evaluation.
A fixed coordinate error affects objects differently. For example:
A ten-pixel error may be a small fraction of a large object
The same ten-pixel error may cover most of a small object
Quadratic coordinate loss is therefore biased against small objects.
A more meaningful evaluation measure is intersection over union, or IoU:
IoU ranges from 0 to 1:
0: no overlap
1: perfect overlap
IoU can be applied to bounding boxes and segmentation masks.
Although IoU is useful for evaluation, it is not always used directly for training because its computation may involve non-differentiable operations such as maximum and minimum functions. Some methods approximate IoU with differentiable alternatives so that it can also serve as a training objective.
Training and evaluation with different measures can produce unexpected results because optimizing one objective does not necessarily optimize the other.
Benchmarks
Benchmark datasets make it possible to compare methods objectively and measure progress.
Important examples include:
Cityscapes
Cityscapes focuses on semantic segmentation in urban environments. It contains city scenes recorded in multiple German cities and includes detailed ground-truth annotations.
COCO
COCO is a broad benchmark supporting several tasks, including:
Object detection
Semantic segmentation
Image captioning
Public evaluation platforms allow researchers to submit models and receive standardized performance measurements. This improves scientific comparison because models are evaluated by a consistent external procedure.
Transfer Learning
Definition
Transfer learning reuses knowledge learned for one task or domain to improve performance on another task or domain.
A domain can be described by a feature space and the probability distribution followed by those features.
A task includes:
A set of ground-truth labels
A function that maps input features to predictions
The function is trained so that its predictions match the ground truth.
Visual tasks share many useful features. For example:
Classification learns object appearance
Object detection needs object appearance plus localization
Semantic segmentation also benefits from object and texture representations
Consequently, it is inefficient to train every new model from random initialization.
Transfer Across Tasks
Suppose an image classifier has already been trained and an object detector is now required.
The process can be:
Start with the pretrained image-classification network
Remove or replace the final classification layers
Add layers appropriate for object detection
Initialize the retained layers with the classifier’s weights
Train the newly added layers from scratch
Fine-tune the transferred layers or keep them frozen
The earlier layers generally learn broadly useful features such as:
Edges
Textures
Shapes
Local patterns
Object parts
The final layers are more task-specific and therefore usually need to be replaced.
Transfer learning saves:
Training time
Computational resources
Energy
Required amounts of labeled data
Most modern visual models are initialized from a pretrained image classifier rather than trained entirely from scratch.
Taskonomy
Taskonomy studies relationships among many visual tasks, including:
Object classification
Semantic segmentation
Surface-normal estimation
Two-dimensional keypoint prediction
Three-dimensional keypoint prediction
Colorization
It investigates which tasks are useful as sources for learning other tasks and whether tasks should be learned in a particular order.
This approach helps identify task dependencies and possible training curricula.
Transfer Across Domains
Transfer learning can also occur between domains.
A major example is training a robot in simulation and deploying it in the real world. Learning to solve a Rubik’s Cube with a robotic hand directly in the real world would be expensive and risky because:
Large amounts of data would be required
The robot may make damaging movements early in training
Physical experiments are slow and costly
Instead:
Train the robotic system in simulation
Randomize simulated conditions extensively
Transfer the learned model to the physical robot
Fine-tune or adapt it to real-world conditions
The simulation is the source domain, and the physical environment is the target domain.
Domain Randomization
Domain randomization exposes the model to many simulated variations, such as changes in:
Object appearance
Lighting
Camera position
Texture
Object placement
Motion
Background
Physical parameters
The goal is to prevent the model from relying on details specific to one simulation and instead make it learn robust features that transfer to the real world.
Data augmentation applies a related principle to existing data by using transformations such as:
Cropping
Rotation
Translation
Jittering
Scaling
Lighting changes
These transformations enlarge the effective training distribution and improve robustness.
Hard negative mining can also help identify which variations are most useful or which simulated cases cause the model to fail.
Learning from More Than a Single Image
Why Motion Matters
Static images provide only one observation of a scene. Videos provide temporal information and reveal how objects and viewpoints change.
Evidence from people recovering sight later in life demonstrates that object recognition is not immediately solved by receiving visual input. Individuals who already understood objects through other senses initially relied heavily on simple visual cues.
They performed relatively well when:
Objects were fully separated
Contours clearly identified the objects
Objects had distinct colors
They struggled when:
Objects overlapped
Object boundaries were ambiguous
Depth relationships were important
Natural scenes contained clutter
When overlapping objects were shown moving in different directions, performance improved substantially. Motion provided an additional cue for separating objects.
This suggests that object perception relies on multiple signals:
Contours
Color
Depth
Relative motion
Motion is especially important during the process of learning to see.
Evidence from Chicks
Experiments with chicks compared two forms of visual exposure:
Temporally smooth video sequences
Frames from the same sequences presented in a random temporal order
Chicks exposed to smoothly moving objects learned representations that were robust to transformations they had not directly encountered during training.
Chicks exposed to temporally disordered frames tended to overfit to the viewpoints and transformations present in the training data. They were less able to recognize objects from new viewpoints.
This supports the idea that natural temporal continuity acts as a form of data augmentation. Videos naturally include:
Translation
Scale changes
Three-dimensional rotation
Camera movement
Lighting changes
Smooth viewpoint changes
A model trained on videos can learn representations that remain stable under these transformations.
Optical Flow Estimation
Definition
Optical flow estimation determines how pixels move between two images.
Given a pair of images, the system estimates, for every pixel in the first image, where that pixel moved in the second image.
The output is dense and continuous. At each pixel, the model predicts a displacement vector:
where:
ux is displacement in the horizontal direction
uy is displacement in the vertical direction
The predicted flow therefore has two channels, one for each displacement direction.
Optical flow can reveal:
Object motion
Camera motion
Motion boundaries
Which pixels likely belong to the same moving object
FlowNet
FlowNet is an encoder-decoder architecture for optical flow estimation.
Encoder
The model receives two images and processes them through convolutional layers. The encoder extracts increasingly abstract features.
Decoder
The decoder upsamples the representation until it reaches the spatial resolution of the input images.
Unlike U-Net, the original architecture discussed here did not use long skip connections, although such connections could help preserve spatial detail.
Training
Optical flow can be trained with a supervised Euclidean loss:
where:
f^i is the predicted flow vector
fi is the ground-truth flow vector
N is the number of pixels
Synthetic Ground Truth
Pixel-level motion labels are extremely difficult for humans to annotate. It is not practical to show two images and ask a person to specify the destination of every pixel.
Instead, synthetic datasets can generate exact motion labels automatically:
Start with real background images
Use three-dimensional models of objects
Render different views of those objects
Overlay the rendered objects on the backgrounds
Compute the exact movement between the rendered views
The Flying Chairs dataset used rendered chair models to create images with known optical flow.
Although the scenes are artificial, the motion relationships are realistic. Pixels belonging to the same object move coherently, allowing a model to learn useful motion representations.
This is an example of simulation-to-real transfer.
Video Models
Applying Image Models Frame by Frame
The simplest video strategy is to apply an image model independently to every frame.
For example, a semantic segmentation network can process each video frame separately.
This approach is easy to implement and can produce reasonable results, but it ignores temporal information. Independent predictions may flicker from one frame to the next because the model does not use previous predictions or the smoothness of real-world motion.
A temporally consistent system should account for the fact that:
Objects generally move continuously
Their positions do not change arbitrarily between adjacent frames
Predictions should remain stable unless the visual evidence changes
Three-Dimensional Convolutions
A video can be represented as a volume with dimensions:
Height
Width
Time
Color channels
Instead of using a two-dimensional convolutional kernel, a video model can use a three-dimensional kernel that extends across space and time.
A 3D convolution slides across:
Horizontal position
Vertical position
Temporal position
The result is a volume of spatiotemporal features.
The standard convolutional concepts also apply:
Stride
Padding
Dilation
Receptive field
Causality
A standard 3D convolution is generally non-causal. If the temporal kernel is symmetric, calculating an activation at time t may require frames from both:
The past
The future
This is acceptable for offline processing, such as classifying an already-recorded video.
It is not appropriate for real-time systems because future frames are unavailable. Real-time applications include:
Robotics
Autonomous vehicles
Interactive systems
A causal alternative uses a masked 3D convolution. The mask sets to zero the filter weights that would access future frames. The output at time t then depends only on the current and past frames.
Action Recognition
Definition
Action recognition assigns a label to an action occurring in a video.
The input can include:
A sequence of RGB frames
Optionally, externally computed optical flow
The output is a class label such as “cricket shot.”
A video input can be represented as a volume with:
Temporal length T
Spatial dimensions H and W
Three color channels
Kinetics Dataset
The Kinetics dataset is a large-scale action-recognition benchmark.
It contains:
Hundreds of thousands of training videos
Hundreds of action classes
Short video clips
Videos collected from curated online sources
Clips of approximately ten seconds, with roughly 250 frames at 25 frames per second
Its scale is intended to be comparable to large image datasets, making it useful for training deep video models.
Two-Stream Temporal Modeling
A strong action-recognition model can use two temporal resolutions:
A low-frame-rate stream
A high-frame-rate stream
Low-Frame-Rate Stream
This stream processes fewer frames but uses more feature channels. It captures slowly changing and abstract information, such as:
Object categories
Scene structure
The presence of a person or chair
Objects generally remain recognizable even when only every several frames is examined.
High-Frame-Rate Stream
This stream processes frames at a higher temporal rate but uses fewer features. It focuses on:
Rapid motion
Short-term changes
Fine temporal structure
Fast actions
The two streams are merged at multiple points, and their final representations are concatenated to make the action prediction.
This design is inspired by the human visual system, which is thought to use multiple complementary processing pathways.
It also resembles the multiscale strategy used in object detection and semantic segmentation:
Image models use multiple spatial resolutions
Video models use multiple temporal resolutions
Transfer Learning for Video Models
A pretrained image classifier can initialize a video model, even when the video model uses 3D convolutions.
The difficulty is that:
Image filters are two-dimensional
Video filters are three-dimensional
A practical solution is to replicate or tile the two-dimensional weights along the temporal dimension.
If a two-dimensional filter is repeated across time, it represents a model observing a static scene across multiple frames. This provides a sensible initialization because a stationary sequence is a valid video.
The model can then be trained further to learn:
Motion
Temporal changes
Object interactions
Action-specific dynamics
Challenges of Video Processing
Video models offer important advantages but require more resources.
Memory
A single training example may contain hundreds of frames. This is much larger than a single image and may not fit easily into GPU memory.
Computation
Three-dimensional convolutions require substantially more computation than two-dimensional convolutions.
Latency
Large video models may be too slow for real-time processing.
Energy
The computational requirements lead to high energy consumption. Modern GPUs used for vision tasks can consume substantially more power than the human brain, despite the brain performing many tasks simultaneously.
Improving Efficiency
Research on efficient video models draws inspiration from both neuroscience and computer architecture.
Parallelism
The human brain performs many computations in parallel. Computer processors use similar principles through:
Pipelining
Parallel execution units
Breaking large instructions into smaller operations
Neural networks can also be designed to maximize parallelism across network depth and branches. Greater parallelism can improve:
Throughput
Latency
Hardware utilization
Exploiting Temporal Redundancy
Adjacent frames in a high-frame-rate video are often very similar. Processing every frame at full resolution and with the same computational effort is wasteful.
Efficient models can exploit this redundancy by:
Processing some frames less frequently
Reusing features from nearby frames
Reducing computation during visually stable periods
Allocating more computation only when substantial changes occur
This is related to biological blinking. Humans blink not only to clean the eyes but also more frequently than necessary for cleaning. One possible explanation is that blinking temporarily reduces visual processing and therefore lowers energy use.
Learning Beyond Strong Supervision
The Cost of Annotation
Dense visual labels are expensive to obtain.
For image segmentation, an annotator may need to:
Trace object boundaries
Assign each region a semantic class
Separate different objects
Repeat the process across many images
For video segmentation, this work must be repeated across many frames. A video containing approximately 250 frames can require roughly 250 times the annotation effort of a single frame.
Because of this, annotation itself has become an important research problem.
Key-Frame Annotation and Label Propagation
One approach is to annotate only selected key frames. A model then propagates the labels through the remaining frames using:
Temporal smoothness
Estimated motion
Optical flow
Object tracking
This reduces annotation effort while still producing labels for a larger portion of the video.
Metric Learning
Standard supervised learning usually learns a direct mapping from inputs to labels or continuous values.
Metric learning instead learns a representation in which distances reflect meaningful relationships.
For example, a face-recognition system may know only whether two images show:
The same person
Different people
The images may be very different in pixel space because of changes in:
Lighting
Pose
Expression
Camera viewpoint
Background
A metric-learning model maps each image into an embedding space where:
Images of the same person are close together
Images of different people are far apart
This learned embedding can support:
Image retrieval
Face recognition
Clustering
Medical-data analysis
Discovering meaningful differences between examples
Contrastive Loss
Contrastive learning uses pairs of examples. Let:
y=1 indicate that two examples belong to the same category
y=0 indicate that they belong to different categories
d be the distance between their embeddings
m be a margin
A common contrastive loss is:
For a same-class pair:
The loss increases as the distance increases
The model is encouraged to bring the embeddings closer
For a different-class pair:
The model is encouraged to separate the embeddings
Once the distance exceeds the margin m, the loss becomes zero
The margin prevents the model from wasting effort pushing already-separated examples infinitely far apart.
Limitation
A fixed margin forces all categories to have similar separation structures. Some categories may naturally be more variable than others, so requiring every class to fit within an equally sized region can make training unstable.
Triplet Loss
Triplet loss uses three examples:
An anchor
A positive example from the same class
A negative example from a different class
The goal is to ensure that the positive is closer to the anchor than the negative by at least a margin α:
where:
d(a,p) is the distance between the anchor and positive
d(a,n) is the distance between the anchor and negative
The loss encourages a relative ordering rather than a fixed absolute distance.
This allows different classes to occupy regions with different sizes and levels of variation. The negative example only needs to be farther away than the positive by the required margin.
Hard Example Selection
The choice of pairs or triplets strongly affects training. Examples that are too easy provide little learning signal. Hard negative mining is therefore important in metric learning as well.
Useful training examples include:
Same-class examples that are far apart
Different-class examples that are unusually close
Cases that the model currently confuses
Self-Supervised Representation Learning
A powerful form of self-supervision can generate labels automatically through data augmentation.
Instead of labeling whether two images show the same person, the system labels whether two transformed examples came from the same original image.
The process is:
Start with an image
Apply different random transformations
Treat all transformed versions as positive pairs
Use transformations of another image as negative examples
Train an embedding model to group views of the same image together
Possible transformations include:
Cropping
Rotation
Scaling
Color changes
Jittering
Other image augmentations
The labels are generated automatically, so no human annotation is required.
The resulting representation can approach the quality of representations learned through fully supervised large-scale image classification. This is important because it suggests that useful visual structure can be learned without manually assigning semantic labels to every example.
Open Questions in Computer Vision
What Does It Mean to Solve Vision?
Computer vision has successful models for many individual tasks, including:
Object detection
Semantic segmentation
Optical flow estimation
Action recognition
Image captioning
Pose estimation
However, success on a benchmark does not necessarily mean that vision has been solved. A model may perform well on one dataset but fail when:
The environment changes
The camera viewpoint changes
The object categories differ
The data distribution shifts
The model encounters unusual combinations of objects
A major unresolved issue is how to define and benchmark human-level scene understanding.
Scaling to Multiple Tasks
Most models are designed for one task at a time. A general visual system should ideally perform many tasks simultaneously, as humans do.
Such a system might need to:
Detect objects
Segment them
Estimate depth and pose
Track motion
Recognize actions
Describe the scene
Support real-time decision-making
This may require:
Model parallelism
Shared representations
More flexible architectures
Specialized computational branches
Improved hardware
Reduced dependence on labeled data
Representations for Action
A representation that is useful for perception may not be sufficient for action.
For example, semantic segmentation identifies the class of every pixel, but it may not communicate:
Which parts of an object can be grasped
How an object will move if pushed
Whether an object is stable
How a person is likely to act
What action an autonomous agent should take
The field therefore continues to investigate representations that connect perception to interaction and control. Keypoint-based representations are one possibility, particularly when tested in control tasks.
Real-Time Intelligent Agents
The ultimate goal is not merely to label images but to build intelligent agents that:
Perceive the world continuously
Learn from natural visual experience
Use motion and temporal context
Operate efficiently
Act in real time
Interact safely with physical environments
Static images can make visual learning more difficult because they remove temporal cues that naturally support object recognition and invariance. Video-based learning may therefore provide a more natural path toward robust visual intelligence.
Vision systems should ultimately be designed around moving visual input, efficient temporal processing, weak or self-generated supervision, and the needs of agents interacting with the real world.

Ask anything
We've read this whole study set, so questions about it get the best answers.