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

Object Tracking

Learn how object tracking works in computer vision. Discover how to use Ultralytics YOLO26 to identify and monitor objects with unique IDs for real-time analysis.

Object tracking is a dynamic process in computer vision (CV) that involves identifying specific entities in a video and monitoring their movement across a sequence of frames. Unlike static image analysis, which treats each snapshot in isolation, tracking introduces the dimension of time. This allows artificial intelligence (AI) systems to assign a unique identification number (ID) to each detected item—such as a car, a person, or an animal—and maintain that identity as the object moves, changes orientation, or is temporarily obscured. This capability is the cornerstone of advanced video understanding, enabling machines to analyze behavior, calculate trajectories, and derive actionable insights from raw footage.

Link to this sectionHow Object Tracking Works#

Modern tracking systems generally utilize a "tracking-by-detection" paradigm. This workflow combines powerful detection models with specialized algorithms to associate detections over time. The process typically follows three main stages:

  1. Detection: In every frame, an object detection model, such as the state-of-the-art YOLO26, scans the image to locate objects of interest. The model outputs bounding boxes that define the spatial extent of each object.

  2. Motion Prediction: Algorithms like the Kalman Filter estimate the future position of an object based on its current velocity and trajectory. This prediction reduces the search space for the next frame, making the system more efficient.

  3. Data Association: The system matches new detections to existing tracks using optimization methods like the Hungarian algorithm. This step often relies on metrics like Intersection over Union (IoU) to measure how much a predicted box overlaps with a new detection. Advanced trackers may also use visual feature extraction to re-identify objects that look similar.

Link to this sectionObject Tracking vs. Object Detection#

While these terms are closely related, they serve distinct functions within the machine learning (ML) pipeline.

  • Object Detection answers the question, "What is present in this image and where?" It is stateless, meaning it has no memory of previous frames. If a car drives through a video, a detector sees a "car" in frame 1 and a "car" in frame 2, but does not know they are the same vehicle.
  • Object Tracking answers the question, "Where is this specific object going?" It is stateful. It connects the "car" in frame 1 to the "car" in frame 2, allowing the system to log that "Car ID #42" is moving left to right. This is essential for tasks like predictive modeling and counting.

Link to this sectionReal-World Applications#

The ability to maintain object identity enables complex real-time inference applications across various industries.

  • Intelligent Transportation Systems: Tracking is vital for autonomous vehicles to navigate safely. By tracking pedestrians and other vehicles, cars can predict potential collisions. Furthermore, traffic engineers use these systems for speed estimation to enforce safety regulations and optimize traffic flow.
  • Retail Analytics: Brick-and-mortar stores use AI in retail to understand customer behavior. Tracking allows store managers to perform object counting to measure foot traffic, analyze dwell times in front of displays using heatmaps, and optimize queue management to reduce wait times.
  • Sports Analysis: In professional sports, coaches use tracking combined with pose estimation to analyze player biomechanics and team formations. This data provides a competitive edge by revealing patterns that are invisible to the naked eye.

Link to this sectionImplementing Tracking with Python#

Ultralytics makes it simple to implement high-performance tracking. The track mode in the library automatically handles detection, motion prediction, and ID assignment. The example below shows how to use the Ultralytics Platform compatible YOLO26 model to track objects in a video.

from ultralytics import YOLO

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

# Track objects in a video file or webcam (source=0)
# 'show=True' displays the video with bounding boxes and unique IDs
results = model.track(source="https://ultralytics.com/images/bus.jpg", show=True)

# Access the unique tracking IDs from the results
if results[0].boxes.id is not None:
    print(f"Detected Track IDs: {results[0].boxes.id.cpu().numpy()}")

To fully understand the ecosystem of tracking, it is helpful to explore instance segmentation, which tracks the precise pixel-level contours of an object rather than just a box. Additionally, Multi-Object Tracking (MOT) challenges often involve widely used benchmarks like MOTChallenge to evaluate how well algorithms handle crowded scenes and occlusions. For deployment in production environments, developers often utilize tools like NVIDIA DeepStream or OpenCV to integrate these models into efficient pipelines.

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