Skip to content

Register now for

# Multi-object Tracking Datasets Overview

Multi-object tracking is a critical component in video analytics that identifies objects and maintains unique IDs for each detected object across video frames. Ultralytics YOLO provides powerful tracking capabilities that can be applied to various domains including surveillance, sports analytics, and traffic monitoring.

## Dataset Format (Coming Soon)

Multi-Object Detector doesn't need standalone training and directly supports pre-trained detection, segmentation or Pose models. Support for training trackers alone is coming soon.

## Available Trackers

Ultralytics YOLO supports the following tracking algorithms:

- BoT-SORT - Use `botsort.yaml` to enable this tracker (default)
- ByteTrack - Use `bytetrack.yaml` to enable this tracker

## Usage

Example

Python CLI

    from ultralytics import YOLO

    model = YOLO("yolo11n.pt")
    results = model.track(source="https://youtu.be/LNwODJXcvt4", conf=0.3, iou=0.5, show=True)

    yolo track model=yolo11n.pt source="https://youtu.be/LNwODJXcvt4" conf=0.3, iou=0.5 show

## Persisting Tracks Between Frames

For continuous tracking across video frames, you can use the `persist=True` parameter:

Example

Python

    import cv2

    from ultralytics import YOLO

    # Load the YOLO model
    model = YOLO("yolo11n.pt")

    # Open the video file
    cap = cv2.VideoCapture("path/to/video.mp4")

    while cap.isOpened():
        success, frame = cap.read()
        if success:
            # Run tracking with persistence between frames
            results = model.track(frame, persist=True)

            # Visualize the results
            annotated_frame = results[0].plot()
            cv2.imshow("Tracking", annotated_frame)

            if cv2.waitKey(1) & 0xFF == ord("q"):
                break
        else:
            break

    cap.release()
    cv2.destroyAllWindows()

## FAQ

### How do I use Multi-Object Tracking with Ultralytics YOLO?

To use Multi-Object Tracking with Ultralytics YOLO, you can start by using the Python or CLI examples provided. Here is how you can get started:

Example

Python CLI

    from ultralytics import YOLO

    model = YOLO("yolo11n.pt")  # Load the YOLO11 model
    results = model.track(source="https://youtu.be/LNwODJXcvt4", conf=0.3, iou=0.5, show=True)

    yolo track model=yolo11n.pt source="https://youtu.be/LNwODJXcvt4" conf=0.3 iou=0.5 show

These commands load the YOLO11 model and use it for tracking objects in the given video source with specific confidence (`conf`) and Intersection over Union (`iou`) thresholds. For more details, refer to the track mode documentation.

### What are the upcoming features for training trackers in Ultralytics?

Ultralytics is continuously enhancing its AI models. An upcoming feature will enable the training of standalone trackers. Until then, Multi-Object Detector leverages pre-trained detection, segmentation, or Pose models for tracking without requiring standalone training. Stay updated by following our blog or checking the upcoming features.

### Why should I use Ultralytics YOLO for multi-object tracking?

Ultralytics YOLO is a state-of-the-art object detection model known for its real-time performance and high accuracy. Using YOLO for multi-object tracking provides several advantages:

- Real-time tracking: Achieve efficient and high-speed tracking ideal for dynamic environments.
- Flexibility with pre-trained models: No need to train from scratch; simply use pre-trained detection, segmentation, or Pose models.
- Ease of use: Simple API integration with both Python and CLI makes setting up tracking pipelines straightforward.
- Extensive documentation and community support: Ultralytics provides comprehensive documentation and an active community forum to troubleshoot issues and enhance your tracking models.

For more details on setting up and using YOLO for tracking, visit our track usage guide.

### Can I use custom datasets for multi-object tracking with Ultralytics YOLO?

Yes, you can use custom datasets for multi-object tracking with Ultralytics YOLO. While support for standalone tracker training is an upcoming feature, you can already use pre-trained models on your custom datasets. Prepare your datasets in the appropriate format compatible with YOLO and follow the documentation to integrate them.

### How do I interpret the results from the Ultralytics YOLO tracking model?

After running a tracking job with Ultralytics YOLO, the results include various data points such as tracked object IDs, their bounding boxes, and the confidence scores. Here's a brief overview of how to interpret these results:

- Tracked IDs: Each object is assigned a unique ID, which helps in tracking it across frames.
- Bounding boxes: These indicate the location of tracked objects within the frame.
- Confidence scores: These reflect the model's confidence in detecting the tracked object.

For detailed guidance on interpreting and visualizing these results, refer to the results handling guide.

### How can I customize the tracker configuration?

You can customize the tracker by creating a modified version of the tracker configuration file. Copy an existing tracker config file from ultralytics/cfg/trackers, modify the parameters as needed, and specify this file when running the tracker:

    from ultralytics import YOLO

    model = YOLO("yolo11n.pt")
    results = model.track(source="video.mp4", tracker="custom_tracker.yaml")

📅 Created 1 year ago ✏️ Updated 2 months ago

## Comments