YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
ByteTrack ONNX Models
ONNX exports of pretrained ByteTrack models from the official ByteTrack repository.
Original repository:
Included Models
| Model | Description |
|---|---|
| bytetrack_ablation.onnx | Ablation model from paper |
| bytetrack_x_mot17.onnx | Highest accuracy MOT17 model |
| bytetrack_l_mot17.onnx | Large model |
| bytetrack_m_mot17.onnx | Medium model |
| bytetrack_s_mot17.onnx | Small production-friendly model |
| bytetrack_x_mot20.onnx | MOT20 model |
Some models may also include:
model.onnx.data
This file contains external tensor weights for large ONNX exports. Keep it beside the .onnx file.
Export Notes
These models were exported using:
- PyTorch
- Official ByteTrack export script
- ONNX Runtime compatible format
The original ByteTrack repository required small compatibility fixes for modern PyTorch versions.
Input Shape
These exports use static input shapes.
Example:
[1, 3, 608, 1088]
Meaning:
- batch size = 1
- channels = 3 (RGB)
- height = 608
- width = 1088
Your input must exactly match the exported shape unless you re-export with dynamic axes.
ONNX Runtime Inference Example
import onnxruntime as ort
import numpy as np
session = ort.InferenceSession(
"bytetrack_s_mot17.onnx",
providers=["CPUExecutionProvider"]
)
img = np.random.rand(
1,
3,
608,
1088
).astype(np.float32)
outputs = session.run(
None,
{"images": img}
)
print(outputs[0].shape)
Expected output:
(1, 13566, 6)
TensorRT
These models can be converted to TensorRT engines using:
- trtexec
- TensorRT Python API
- DeepStream
Example:
trtexec \
--onnx=bytetrack_s_mot17.onnx \
--saveEngine=bytetrack_s.engine
Production Notes
Recommended models:
| Scenario | Recommended Model |
|---|---|
| Maximum accuracy | bytetrack_x_mot17 |
| Balanced production deployment | bytetrack_m_mot17 |
| Lightweight deployment | bytetrack_s_mot17 |
The s model is generally the best balance between:
- speed
- VRAM usage
- latency
- tracking quality
Important
ByteTrack itself is only the tracker.
These ONNX models contain the detector component used alongside ByteTrack tracking logic.
Typical pipeline:
video frame
โ detector inference
โ ByteTrack association/tracking
โ tracked objects
Credits
ByteTrack Paper:
@article{zhang2022bytetrack,
title={ByteTrack: Multi-Object Tracking by Associating Every Detection Box},
author={Zhang, Yifu and Sun, Peize and Jiang, Yi and Yu, Dongdong and Weng, Fucheng and Yuan, Zehuan and Luo, Ping and Liu, Wenyu and Wang, Xinggang},
booktitle={ECCV},
year={2022}
}
Official repository: