Pages and contents
Pages
Convolutions
A convolution applies a small learned filter across an image or feature map. At each spatial location, the filter combines information from a local neighborhood and produces a new feature value. This filter can be interpreted through the mathematical definition of a convolution, as the integral of the product of the two functions after one is reflected about the y-axis and shifted.
Convolutions For Image Processing
For an input feature map
a convolutional kernel has shape
When kernel size = 1, one kernel produces one output channel. Using different kernels produces
At output location and channel ,
Convolutions perform two operations at once:
β’ Spatial mixing: combining nearby image locations
β’ Channel mixing: combining different feature channels
Because the same kernel is reused across the image, convolutions can detect the same local pattern regardless of where it appears.
Channels
A channel is one learned feature dimension defined across the spatial grid.
An RGB image begins with three channels:
After several convolutional layers, the channels no longer correspond directly to colors. They become learned feature responses, which may encode patterns such as edges, textures, object parts, or semantic regions.
For a feature tensor
the spatial dimensions represent where, while the channel dimension represents what features are present.
At a fixed channel,
we obtain a two-dimensional activation map showing where that feature is active.
At a fixed spatial location,
we obtain a feature vector describing the image region around that location.
A useful interpretation is:
Spatial positions are locations, while channels form the learned vocabulary used to describe each location.
The meaning of a single channel is often not cleanly interpretable. Information is usually distributed across many channels rather than stored in one channel independently.
Receptive Fields
The receptive field of a feature is the region of the original image that can influence it.
A single convolution sees only a small neighborhood. Stacking convolutions causes deeper features to depend on progressively larger regions of the image.
Downsampling increases the receptive field more quickly. A feature at image resolution represents a much larger image region than a feature at resolution.
This produces a general pattern:
β’ Early, high-resolution features preserve edges and local texture
β’ Deeper, lower-resolution features encode larger structures and stronger semantics
Stride and Downsampling
A convolution with stride greater than one reduces spatial resolution.
For example, a stride-2 convolution approximately transforms
CNN backbones commonly reduce resolution while increasing channel count:
Lower spatial resolution reduces computation, while additional channels provide more capacity for semantic representation.
Convolutions
A convolution mixes channels without mixing neighboring spatial locations.
At every position,
It acts like the same linear layer applied independently at every pixel.
A convolution is commonly used to:
β’ Change the number of channels
β’ Project different feature maps into a shared feature dimension
β’ Fuse information across channels
β’ Reduce computation before a more expensive operation
Feature Pyramids
A feature pyramid is a collection of feature maps at several spatial resolutions, such as
The levels are not merely resized copies of one feature map. They are produced at different depths of the backbone and therefore have different receptive fields and semantic content.
Higher-resolution levels preserve:
β’ Small objects
β’ Fine boundaries
β’ Local texture
Lower-resolution levels provide:
β’ Larger receptive fields
β’ Stronger semantic abstraction
β’ Lower computational cost
Feature-pyramid architectures often combine coarse semantic features with fine spatial features, usually by upsampling the coarse maps and merging them with higher-resolution backbone outputs.
A feature pyramid therefore provides the model with representations of the same image at multiple spatial granularities.