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

Feature Pyramid Network (FPN)

Explore how Feature Pyramid Networks (FPN) enhance multi-scale object detection. Learn how Ultralytics YOLO26 uses advanced FPNs to detect small and large objects.

A Feature Pyramid Network (FPN) is a specialized architectural component used in modern computer vision (CV) systems to improve the detection of objects at various scales. It effectively solves a longstanding challenge in image analysis: recognizing both large, prominent structures and tiny, distant details within the same image. By generating a multi-scale representation of the input—conceptually similar to a pyramid—FPNs allow neural networks to extract rich semantic information at every level of resolution. This architecture typically sits between the backbone, which extracts raw features, and the detection head, which predicts object classes and bounding boxes.

Link to this sectionHow Feature Pyramid Networks Work#

The core innovation of the FPN lies in how it processes information. Traditional Convolutional Neural Networks (CNNs) naturally create a hierarchy of features where the input image is progressively downsampled. While this deepens the semantic understanding (knowing what is in the image), it often degrades spatial resolution (knowing exactly where it is), making small objects vanish.

FPNs address this through a three-step process:

  1. Bottom-Up Pathway: This is the standard feed-forward pass of the network, such as a Residual Network (ResNet). As the network processes the image, it creates feature maps that decrease in size but increase in semantic value.

  2. Top-Down Pathway: The network constructs a higher-resolution pyramid by upsampling the semantically rich features from the deeper layers. This step "hallucinates" strong context back into larger spatial maps.

  3. Lateral Connections: To recover the crisp details lost during downsampling, FPNs fuse the upsampled features with the original, high-resolution maps from the bottom-up pathway via lateral connections.

This combination results in a pyramid where every level has strong semantics and good localization, significantly boosting precision and recall across all object sizes.

Link to this sectionImportance in Object Detection Architectures#

FPNs are a cornerstone of modern object detection architectures. Before their introduction, models had to choose between speed (using only the final layer) or accuracy (processing an image pyramid, which is very slow). FPNs provide a best-of-both-worlds solution, enabling real-time inference without sacrificing small object detection capabilities.

This efficiency is crucial for advanced models like YOLO26, which utilizes sophisticated aggregation networks inspired by FPN principles (like PANet) to achieve state-of-the-art performance. The architecture ensures that whether the model is deployed on edge devices or powerful servers via the Ultralytics Platform, it maintains high accuracy across diverse datasets.

Link to this sectionReal-World Applications#

The multi-scale capability of FPNs makes them indispensable in industries where safety and precision are paramount.

  • AI in Automotive: Autonomous vehicles must simultaneously track large trucks nearby and small traffic lights or pedestrians in the distance. FPNs allow the perception stack to process these disparate scales in a single pass, ensuring timely decision-making. Datasets like nuScenes are often used to benchmark these capabilities.
  • Medical Image Analysis: In diagnostic imaging, detecting pathologies requires spotting anomalies that vary wildly in size. An FPN-equipped model can identify both large organ structures and tiny, early-stage tumors in MRI scans, aiding radiologists in making accurate diagnoses.
  • AI in Agriculture: Precision farming relies on detecting crops and pests from drone imagery. Since the altitude of the drone can vary, the size of plants in the image changes. FPNs help models generalize well, accurately performing object counting regardless of the camera height.

Link to this sectionFPN vs. Other Feature Aggregators#

It is helpful to distinguish the standard FPN from its evolved variants found in newer architectures.

  • FPN vs. PANet: While FPN adds a top-down path to enrich features, Path Aggregation Network (PANet) adds an extra bottom-up path on top of the FPN. This shortens the information path for low-level features, further improving localization, a technique often adapted in YOLO models.
  • FPN vs. BiFPN: found in EfficientDet, the Bi-directional Feature Pyramid Network (BiFPN) introduces learnable weights to different features and removes nodes with only one input, optimizing the network for efficiency.

Link to this sectionPractical Example#

Advanced libraries like ultralytics handle the complexity of FPN construction internally. When you load a model like YOLO26, the architecture automatically includes these feature aggregation layers to maximize performance.

from ultralytics import YOLO

# Load the YOLO26 model, which uses advanced feature pyramid principles internally
# The 'n' suffix indicates the nano version, optimized for speed
model = YOLO("yolo26n.pt")

# Perform inference on an image containing objects of various sizes
# The model's neck (FPN-based) aggregates features to detect small and large items
results = model("https://ultralytics.com/images/bus.jpg")

# Display results to see bounding boxes around buses (large) and people (small)
results[0].show()

Explore solutions

Real-time defect detection with Ultralytics YOLO

Defect Detection

YOLO-based vision AI detects defects in steel, PCBs, fabric, solar panels, and welds, with peer-reviewed accuracy up to 99.4% and up to 94.5% lower inspection cost.
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 defect detection with Ultralytics YOLO

Defect Detection

YOLO-based vision AI detects defects in steel, PCBs, fabric, solar panels, and welds, with peer-reviewed accuracy up to 99.4% and up to 94.5% lower inspection cost.
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 defect detection with Ultralytics YOLO

Defect Detection

YOLO-based vision AI detects defects in steel, PCBs, fabric, solar panels, and welds, with peer-reviewed accuracy up to 99.4% and up to 94.5% lower inspection cost.
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