Meet YOLO26: next-gen vision AI.
Ultralytics
Back to Ultralytics Glossary

Feature Maps

Explore how feature maps act as the eyes of CNNs. Learn how Ultralytics YOLO26 uses these internal representations to detect patterns and power computer vision.

A feature map is the fundamental output produced when a convolutional filter processes an input image or a preceding layer within a neural network. In the context of computer vision (CV), these maps serve as the internal representation of the data, highlighting specific patterns such as edges, textures, or complex geometric shapes that the model has learned to recognize. Essentially, feature maps act as the "eyes" of a Convolutional Neural Network (CNN), transforming raw pixel values into meaningful abstractions that facilitate tasks like object detection and classification.

Link to this sectionThe Mechanism Behind Feature Maps#

The creation of a feature map is driven by the mathematical operation known as convolution. During this process, a small matrix of learnable parameters, called a kernel or filter, slides across the input data. At every position, the kernel performs element-wise multiplication and summation, resulting in a single value in the output grid.

  • Pattern Activation: Each filter is trained to look for a specific feature. When the filter encounters that feature in the input, the resulting value in the feature map is high, indicating a strong activation.
  • Spatial Hierarchy: In deep learning (DL) architectures, feature maps are arranged hierarchically. Early layers produce maps that detect low-level details like edge detection lines and curves. Deeper layers combine these simple maps to form high-level representations of complex objects, such as faces or vehicles.
  • Dimensionality Changes: As data progresses through the network, operations like pooling layers typically reduce the spatial dimensions (height and width) of the feature maps while increasing the depth (number of channels). This process, often called dimensionality reduction, helps the model focus on the presence of features rather than their exact pixel location.

Link to this sectionReal-World Applications#

Feature maps are the engine room for modern AI applications, allowing systems to interpret visual data with human-like understanding.

  • Medical Diagnostics: In medical image analysis, models use feature maps to process X-rays or MRI scans. Early maps might highlight bone outlines, while deeper maps identify abnormalities like tumors or fractures, assisting doctors in AI in healthcare scenarios.
  • Autonomous Navigation: Self-driving cars rely heavily on feature maps generated by visual sensors. These maps allow the vehicle's onboard computer to distinguish between lanes, pedestrians, and traffic signs in real-time, which is critical for autonomous vehicles to operate safely.

Link to this sectionWorking with Feature Maps in Python#

While feature maps are internal structures, understanding their dimensions is crucial when designing architectures. The following PyTorch example demonstrates how a single convolutional layer transforms an input image into a feature map.

import torch
import torch.nn as nn

# Define a convolution layer: 1 input channel, 1 output filter, 3x3 kernel
conv_layer = nn.Conv2d(in_channels=1, out_channels=1, kernel_size=3, bias=False)

# Create a random dummy image (Batch Size=1, Channels=1, Height=5, Width=5)
input_image = torch.randn(1, 1, 5, 5)

# Pass the image through the layer to generate the feature map
feature_map = conv_layer(input_image)

print(f"Input shape: {input_image.shape}")
# The output shape will be smaller (3x3) due to the kernel size and no padding
print(f"Feature Map shape: {feature_map.shape}")

It is helpful to distinguish feature maps from similar terms to avoid confusion during model training:

  • Feature Map vs. Filter: A filter (or kernel) is the tool used to scan the image; it contains the model weights. The feature map is the result of that scan. You can think of the filter as the "lens" and the feature map as the "image" captured through that lens.
  • Feature Map vs. Embedding: While both represent data, feature maps typically retain spatial structures (height and width) suitable for semantic segmentation. In contrast, embeddings are usually flattened, 1D vectors that capture semantic meaning but discard spatial layout, often used in similarity search tasks.
  • Feature Map vs. Activation: An activation function (like ReLU) is applied to the values within a feature map to introduce non-linearity. The map exists both before and after this mathematical operation.

Link to this sectionRelevance to Ultralytics Models#

In advanced architectures like YOLO26, feature maps play a pivotal role in the "backbone" and "head" of the model. The backbone extracts features at different scales (feature pyramid), ensuring the model can detect both small and large objects effectively. Users leveraging the Ultralytics Platform for training can visualize how these models perform, indirectly observing the efficacy of the underlying feature maps through metrics like accuracy and recall. for optimizing these maps involves extensive training on annotated datasets, often utilizing techniques like feature extraction to transfer knowledge from pre-trained models to new tasks.

Explore solutions

Real-time AI that works with your team

AI in Robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI in Automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Real-time AI tailored to your operation

AI in Agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Real-time AI that works with your team

AI in Robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI in Automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Real-time AI tailored to your operation

AI in Agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Real-time AI that works with your team

AI in Robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI in Automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Real-time AI tailored to your operation

AI in Agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning