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

Extended Kalman Filter (EKF)

Explore the Extended Kalman Filter (EKF) for non-linear state estimation. Learn how it enhances object tracking in Ultralytics YOLO26 and autonomous systems.

The Extended Kalman Filter (EKF) is a robust mathematical algorithm designed to estimate the state of a dynamic system that behaves non-linearly. While the standard Kalman Filter (KF) provides an optimal solution for systems moving in straight lines or following simple linear equations, real-world physics is rarely that predictable. Most physical objects, such as a drone fighting wind resistance or a robotic arm rotating on multiple axes, follow curved or complex paths. The EKF addresses this complexity by creating a linear approximation of the system at a specific point in time, allowing engineers and data scientists to apply efficient filtering techniques to predictive modeling tasks even when the underlying mechanics are complicated.

Link to this sectionMechanism and Linearization#

To handle complex dynamics, the EKF employs a mathematical process called linearization, which essentially estimates the slope of a function at the current operating point. This often involves calculating a Jacobian matrix to approximate how the system changes over short intervals. The algorithm operates in a recursive loop consisting of two main phases: prediction and update. In the prediction phase, the filter projects the current state forward using a physical model of motion. In the update phase, it corrects this projection using new, often noisy data from sensors like gyroscopes or accelerometers. This continuous cycle of predicting and correcting helps reduce data noise and provides a smoother, more accurate estimate of the true state than any single sensor could provide alone.

Link to this sectionRelevance in Computer Vision#

In the realm of computer vision (CV), the Extended Kalman Filter plays a critical role in maintaining the identity of moving items. Advanced models like YOLO26 are exceptional at detecting objects in single frames, but they do not inherently understand motion continuity over time. By integrating an EKF or similar logic, an object tracking system can predict where a bounding box should appear in the next video frame based on its previous velocity and trajectory. This is particularly useful for handling occlusions, where an object is temporarily blocked from view; the filter keeps the "track" alive by estimating the object's position until it is visible again, a technique essential for robust multi-object tracking (MOT).

Link to this sectionReal-World Applications#

The versatility of the EKF makes it a cornerstone technology in various high-tech industries where machine learning (ML) intersects with physical hardware:

  • Autonomous Vehicles: Self-driving cars rely on sensor fusion to navigate safely. An EKF merges distinct data streams from Global Positioning Systems (GPS), LiDAR, and radar to calculate the vehicle's precise position and orientation on the road, compensating for signal dropouts or environmental noise.
  • Robotics: Robots operating in unstructured environments use Simultaneous Localization and Mapping (SLAM) algorithms. The EKF helps a robot build a map of a room while simultaneously determining its own location within that map, correcting for wheel slippage or sensor drift to ensure accurate movement.
  • Pose Estimation: In applications like virtual reality or sports analytics, tracking human joints requires smoothing out jittery keypoints. EKF algorithms refine the output of deep learning models to create fluid, natural motion animations for action recognition systems.

It is helpful to distinguish the Extended Kalman Filter from related filtering methods to understand its specific utility:

  • EKF vs. Kalman Filter (KF): The standard KF is mathematically optimal and computationally cheaper but fails when systems are highly non-linear. The EKF extends the KF to work with non-linear systems via approximation.
  • EKF vs. Particle Filter: A Particle Filter manages non-linearity and non-Gaussian noise very well by using many random samples (particles) to represent probability. However, it requires significantly more computational power, making the EKF a preferred choice for resource-constrained embedded systems.
  • EKF vs. Unscented Kalman Filter (UKF): The Unscented Kalman Filter offers a middle ground, using deterministic sampling points to handle non-linearity without the complex calculus required by the EKF, though the EKF remains an industry standard for many control systems.

Link to this sectionImplementation Example#

In the ultralytics package, tracking algorithms use Kalman filtering concepts internally to smooth trajectories and associate detections across frames. While you do not manually code the EKF matrix math when using high-level tools, understanding that it powers the tracker helps in configuring parameters for the Ultralytics Platform.

Here is how to initiate a tracker with a YOLO model, which utilizes these filtering techniques for state estimation:

from ultralytics import YOLO

# Load the latest YOLO26 model (nano version for speed)
model = YOLO("yolo26n.pt")

# Track objects in a video source
# Trackers like BoT-SORT or ByteTrack use Kalman filtering logic internally
results = model.track(source="https://ultralytics.com/images/bus.jpg", tracker="botsort.yaml")

# Print the ID of the tracked objects
for r in results:
    if r.boxes.id is not None:
        print(f"Track IDs: {r.boxes.id.numpy()}")

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