Skip to content


Object tracking is a task that involves identifying the location and class of objects, then assigning a unique ID to that detection in video streams.

The output of tracker is the same as detection with an added object ID.

Available Trackers

The following tracking algorithms have been implemented and can be enabled by passing tracker=tracker_type.yaml

The default tracker is BoT-SORT.


Use a trained YOLOv8n/YOLOv8n-seg model to run tracker on video streams.

from ultralytics import YOLO

# Load a model
model = YOLO('')  # load an official detection model
model = YOLO('')  # load an official segmentation model
model = YOLO('path/to/')  # load a custom model

# Track with the model
results = model.track(source="", show=True) 
results = model.track(source="", show=True, tracker="bytetrack.yaml") 
yolo track source=""  # official detection model
yolo track source=...   # official segmentation model
yolo track model=path/to/ source=...  # custom model
yolo track model=path/to/  tracker="bytetrack.yaml" # bytetrack tracker

As in the above usage, we support both the detection and segmentation models for tracking and the only thing you need to do is loading the corresponding (detection or segmentation) model.



Tracking shares the configuration with predict, i.e conf, iou, show. More configurations please refer to predict page.

from ultralytics import YOLO

model = YOLO('')
results = model.track(source="", conf=0.3, iou=0.5, show=True) 
yolo track source="" conf=0.3, iou=0.5 show


We also support using a modified tracker config file, just copy a config file i.e custom_tracker.yaml from ultralytics/tracker/cfg and modify any configurations(expect the tracker_type) you need to.

from ultralytics import YOLO

model = YOLO('')
results = model.track(source="", tracker='custom_tracker.yaml') 
yolo track source="" tracker='custom_tracker.yaml'

Please refer to ultralytics/tracker/cfg page