Overview
YOLOX is an anchor-free member of the YOLO family developed by Megvii, designed to close the gap between research and industrial object detection. Unlike earlier YOLO versions, YOLOX removes predefined anchor boxes and instead predicts objects directly, which simplifies the design and reduces the number of heuristic tuning parameters (e.g., anchor sizes) needed for a new dataset.
Two architectural changes distinguish YOLOX from anchor-based YOLO detectors: a decoupled head that separates classification and localization into independent branches (improving convergence and accuracy over the coupled head used in YOLOv3/v4/v5), and SimOTA, an advanced label-assignment strategy that formulates matching between predictions and ground-truth boxes as an optimal-transport problem to pick better positive samples during training.
This model is optimized for deployment on Texas Instruments edge devices, providing production-ready object detection for industrial automation, smart cameras, robotics, and IoT vision applications. It offers a range of variants β from the lightweight yolox-nano to the high-accuracy yolox-x β covering a wide accuracy/compute trade-off space.
Model Variants
| Model | Model ID | Input Size | mAP[.5:.95]% | Validated Devices | Config |
|---|---|---|---|---|---|
yolox_nano |
od-mh8009 |
416Γ416 | 24.8 | TDA4VH, TDA4VL | yolox_nano_config.yaml |
yolox_tiny |
od-mh8010 |
416Γ416 | 32.8 | TDA4VH, TDA4VL | yolox_tiny_config.yaml |
yolox_s |
- | 640Γ640 | - | - | N/A |
yolox_m |
od-mh8011 |
640Γ640 | 46.9 | TDA4VH, TDA4VL | yolox_m_config.yaml |
yolox_l |
od-mh8012 |
640Γ640 | 49.7 | TDA4VH, TDA4VL | yolox_l_config.yaml |
yolox_x |
od-mh8013 |
640Γ640 | 51.2 | TDA4VH, TDA4VL | yolox_x_config.yaml |
yolox_darknet53 |
od-mh8014 |
640Γ640 | 47.4 | TDA4VH, TDA4VL | yolox_darknet53_config.yaml |
Recommended for edge deployment: yolox_nano (smallest, best accuracy/compute trade-off)
yolox_scurrently ships only as an ONNX export (yolox_s.onnx) with no TIDL config YAML available in this folder.
Quick Start
Prerequisites
pip install onnx>=1.22.0
pip install onnxruntime>=1.23.2
pip install onnxsim # For model simplification
Export the Model
# Prepare a specific variant (downloads pre-built ONNX, or falls back to
# downloading the .pth checkpoint and converting it locally)
python prepare_model.py --model yolox_nano
# Prepare multiple variants at once
python prepare_model.py --model yolox_nano yolox_tiny yolox_m
# Prepare every supported variant
python prepare_model.py --model all
# Force re-download even if the ONNX/PTH file already exists locally
python prepare_model.py --model yolox_nano --force-download
# Prepare and verify accuracy on COCO val2017
python prepare_model.py --model yolox_nano --verify --num-val-images 500
# List all supported variants and their local download status
python prepare_model.py --list-models
The script automatically:
- Reads the source URL from each variant's
.onnx.linkfile and downloads the pre-built ONNX from GitHub releases - Falls back to downloading the PyTorch checkpoint from the
.pth.linkfile and converting it to ONNX locally (via the official YOLOXyolox.exp.get_expAPI) if the pre-built ONNX is unavailable - Runs ONNX shape inference and hard-codes the batch dimension to 1
- Optionally simplifies the model using
onnx-simplifier - Optionally verifies accuracy on COCO val2017 using
pycocotools, reporting mAP@[0.50:0.95] and mAP@0.50
Supported --model values: yolox_nano, yolox_tiny, yolox_s, yolox_m, yolox_l, yolox_x, yolox_darknet53, or all.
Compile and Infer uing edgeai-tidlrunner
Note: Run the commands below from inside the
tidlrunnerdirectory (the cloned edgeai-tidlrunner repository), with--config_pathpointing to this model's config file.
Compile using edgeai-tidlrunner - on PC
cd /path/to/edgeai-tidlrunner
tidlrunner-cli compile --target_device J784S4 \
--config_path /path/to/yolox_nano_config.yaml
Run Inference Benchmark - on device
cd /path/to/edgeai-tidlrunner
tidlrunner-cli infer --target_device J784S4 \
--config_path /path/to/yolox_nano_config.yaml
Compile and Infer using edgeai-tidl-tools (Advanced):
Follow the instructions at https://github.com/TexasInstruments/edgeai-tidl-tools
Deploy using edgeai-tidl-tools:
Deplyment can be done using edgeai-tidl-tools. For ONNX models, onnxruntime-tidl with TIDL acceleration can be used. Consult the documentation of edgeai-tidl-tools for more details.
Citation
If you use YOLOX in your research, please cite:
@article{yolox2021,
title={YOLOX: Exceeding YOLO Series in 2021},
author={Ge, Zheng and Liu, Songtao and Wang, Feng and Li, Zeming and Sun, Jian},
journal={arXiv preprint arXiv:2107.08430},
year={2021}
}
π Resources
| Resource | Link |
|---|---|
| Paper | arXiv:2107.08430 |
| Source Code | Megvii-BaseDetection/YOLOX |
| edgeai-tidl-tools | GitHub |
| edgeai-tidlrunner | GitHub |
| EdgeAI SDK | Documentation |
| EdgeAI Ecosystem | GitHub |
Related Models
|
RTMDet Real-time single-stage detector Distillation-enhanced backbone |
YOLOv8 Anchor-free single-stage detector Improved training pipeline |
YOLO11 Latest Ultralytics YOLO Refined efficiency/accuracy |
RT-DETRv2 Real-time DETR-based detector Transformer decoder head |
Maintained by: Texas Instruments EdgeAI Team
Last Updated: August 2026