/yolo:yolo-exportfrom Ultralytics YOLO
Exports Ultralytics YOLO models to ONNX, TensorRT, CoreML, OpenVINO, and edge NPU formats. Covers Platform export tab and Python/CLI workflows with quantization and benchmarking.
Ships in Ultralytics YOLO. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Open a completed model's Export tab, select a format, configure its arguments, and click Start Export. Platform runs CPU exports directly and asks for a target GPU where the format requires one (notably TensorRT); download the artifact when the job completes. For TensorRT, select the deployment device's GPU family or Jetson target; if its TensorRT/CUDA versions differ from the device's, export locally on that device instead.
Use Platform when you do not want to install each exporter toolchain locally. Use the Python/CLI path below for custom calibration, repeatable automation, local hardware builds, or immediate parity validation. See Platform model export.
from ultralytics import YOLO
model = YOLO("runs/detect/train/weights/best.pt")
path = model.export(format="onnx") # returns the exported file/dir path
yolo export model=best.pt format=onnx
Exports load straight back into YOLO() for predict/val — same API:
model = YOLO("best.onnx") # or best.engine, best_openvino_model/, ...
| Target | format= | Why |
|---|---|---|
| NVIDIA GPU / Jetson | engine (TensorRT) | fastest on NVIDIA; build on the deployment device — engines are not portable across GPUs/TRT versions |
| Intel CPU/iGPU/NPU | openvino | up to 3× CPU speedup on Intel; run with device=cpu/xpu/npu (intel:* names are deprecated) |
| Apple iOS/macOS | coreml | broad OS coverage, Vision/iOS/Flutter support |
| Apple iOS 27+/macOS 27+ | coreai | native .aimodel; iOS/Flutter SDKs default to coreml; export on Apple silicon macOS 26+ or x86_64 Linux |
| Android | litert (renamed from tflite) or ncnn | NCNN strong on ARM |
| Raspberry Pi | ncnn | best ARM CPU latency |
| PyTorch Edge | executorch | |
| STM32 microcontrollers | stedgeai | ONNX for ST Edge AI Core; quantize=8 for INT8; keep the _stedgeai.onnx ending |
| Cross-platform / unsure | onnx | runs everywhere; start here, specialize when latency demands |
| NPUs (Rockchip/Qualcomm/Hailo/Huawei/Sony/Axelera/DeepX/AMD/NXP) | rknn / qnn / hailo / ascend / imx / axelera / deepx / xilinx / nxp | name= selects the exact chip for rknn/qnn/hailo/ascend/xilinx |
Full local export matrix with per-format supported args: format-matrix.md (this folder).
| Arg | Default | Notes |
|---|---|---|
imgsz | model | inherited from the loaded model; set explicitly to the deployment shape |
quantize | None | precision request: 16/fp16, 8/int8/w8a8, w8a16, w8a32, or 32/fp32; support, speed, size, and accuracy are backend-dependent — see format-matrix.md and benchmark the target |
data | None | representative calibration data when required; use >300 images generally and 500+ for TensorRT. Omission selects a small task default, so pass deployment-representative data explicitly |
dynamic | False | variable input shape/batch where supported; check format-matrix.md and benchmark the target |
batch | 1 | max batch baked into the export |
simplify | True | simplify ONNX graph |
opset | None | compatible ONNX opset selected automatically when unset; pin lower if the consumer runtime complains |
nms | None | None: raw outputs for external NMS (YOLO26 too, except axelera); True embeds NMS where format-matrix.md lists nms; False selects the YOLO26/YOLOv10 NMS-free head, else raw outputs |
workspace | None | TensorRT builder GiB — lower if the build OOMs |
device | None | TensorRT needs a GPU (auto-set to device=0 when unset); a GPU also speeds INT8 calibration |
fraction | 1.0 | fraction of calibration data used |
yolo val model=best.pt data=data.yaml batch=1 rect=False # baseline at the exported artifact's settings
yolo val model=best.onnx data=data.yaml batch=1 rect=False # compare the same task metric with the baseline
A fixed-shape export validates with rect=False and, except TorchScript, at its export batch (1 by default), so give the .pt baseline the same two arguments or its rectangular batching changes the numbers. Acceptable differences depend on the task, model, backend, precision, and calibration data. Investigate unexpected gaps by matching imgsz and pre/post-processing and, where required, using representative calibration data. Also compare one prediction with .pt.
yolo benchmark model=best.pt data=data.yaml imgsz=640 # all formats at default precision
yolo benchmark model=best.pt data=data.yaml format=engine quantize=16 device=0 imgsz=640 # targeted FP16
Produces the task metric + latency per exportable format on this machine. Repeat for each supported precision and benchmark on deployment hardware, not your dev box.
nms: the default nms=None emits raw [4+nc, anchors] heads (xywh boxes + class scores; litert, nxp, and edgetpu normalize boxes to 0–1) for every YOLO model, YOLO26 included, so you run NMS (RT-DETR emits [N, 6] rows of normalized xywh, conf, cls and needs no NMS; INT8 rknn emits per-scale head tensors that its bundled tail.onnx decodes first; hailo embeds HailoRT NMS for YOLOv8/YOLO11 detect and otherwise returns head tensors to decode on the host; imx instead always embeds NMS, and the axelera runtime decodes the .axm feature maps on the host, with no NMS step for YOLO26/YOLOv10). nms=False on YOLO26/YOLOv10 emits NMS-free [max_det, 6] rows [x1,y1,x2,y2,conf,cls], and nms=True embeds NMS with the same row layout where supported (CoreML detect instead returns confidence and coordinates arrays); some formats fall back to raw heads (format-matrix.md). Segment, pose, and OBB add task-specific outputs. Check export warnings and shapes.names map alongside the model.ultralytics.utils.triton.TritonRemoteModel for Triton; examples/ in the ultralytics repo has ONNXRuntime C++/Rust/Python references.| Symptom | Fix |
|---|---|
| Export crashes on missing package | most backends auto-install on first export; rerun. On Linux, TensorRT auto-installs as tensorrt-cu<torch CUDA major>; elsewhere install it per NVIDIA docs. Hailo (Dataflow Compiler) and Ascend (CANN atc) need their vendor SDK first |
Unsupported ONNX opset downstream | export with lower opset=, or upgrade the runtime |
| TensorRT build OOM/slow | lower workspace, batch=1, dynamic=False |
| Export much less accurate | imgsz mismatch; too little/unrepresentative calibration data; wrong custom pre/post-processing; use a supported higher precision or backend |
| Engine fails on another machine | TensorRT engines are device+version specific — rebuild on target |
| CoreML export fails on Windows | export on macOS or Linux |
| Core AI export is unavailable | requires macOS 26+ on Apple silicon or x86_64 Linux (glibc 2.34+), torch>=2.8, and Python 3.11–3.14; use CoreML for broader production support |
Deprecation warnings for half/int8/end2end/tflite | auto-forwarded (half→quantize=16, int8→quantize=8, end2end=True→nms=False, end2end=False→nms=None unless nms=True is also passed, tflite→litert) — switch to the new names |
format-matrix.md — all local export targets, artifacts produced, and supported args. Read when using any format beyond onnx/engine/openvino/coreml.If the installed version rejects an argument, trust the error text (format and quantize errors list valid values) and yolo cfg over this file.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
yolo, model-export, onnx, tensorrt, openvino, edge-deployment
npx claudepluginhub ultralytics/skills --plugin yolo8 skills in this plugin
/platform-cliUse when operating Ultralytics Platform from a terminal or script with the ul cloud CLI (ul cloud RESOURCE OPERATION key=value, PyPI package ultralytics-platform) — listing, creating, updating, cloning, or moving projects, datasets, and models; inspecting dataset images, statistics, metadata, duplicates, and similar images; starting and monitoring cloud training runs; per-image model validation analysis; downloading weights; exports, deployments, uploads, trash and restore, storage integrations, and account usage, storage, and billing; and building Agents (YOLO, LLM, gate, and alert workflows). For the Platform web UI or local yolo commands, see yolo; for choosing what to train and how to improve it, see yolo-training and yolo-tuning.
/yoloUse for ANY task involving Ultralytics Platform, the ultralytics Python package, yolo CLI, YOLO model weights (.pt), dataset annotation, training, validation, prediction, tracking, export, deployment, or the detect / segment / semantic / depth / classify / pose / OBB vision tasks.
/yolo-datasetsUse when uploading, annotating, building, converting, analyzing, or debugging datasets in Ultralytics Platform or local YOLO — Platform dataset management and Smart Annotation, data.yaml, YOLO label .txt formats, COCO/DOTA/mask conversion, auto-labeling, splits, validation, and errors like "no labels found" or mAP near 0. Covers detect, segment, semantic, depth, classify, pose, and OBB data.
/yolo-inferenceUse when testing, running, or deploying Ultralytics YOLO inference in Platform or code on images, video, webcams, or streams — Platform Predict and dedicated endpoints, model.predict()/yolo predict, Results API boxes/masks/keypoints, persistent tracking, annotated video, and Solutions such as counting, heatmaps, speed, queues, and parking. For optimized runtime exports, see yolo-export.
/yolo-modelsUse when choosing or comparing Ultralytics models in Platform or code — picking a model family (YOLO26/YOLO11/YOLOv8, YOLO-World, YOLOE, SAM/SAM2/FastSAM, RT-DETR, YOLO-NAS), size (n/s/m/l/x), task variant (-seg, -sem, -cls, -pose, -obb, -depth), pretrained checkpoint, open-vocabulary or promptable detection/segmentation, custom architecture, Platform Explore, or exact weight names and availability.
/yolo-trainingUse when training, fine-tuning, or validating Ultralytics YOLO models in Platform, cloud GPUs, or local code — model.train(), yolo train/val, remote metric streaming, epochs, batch, imgsz, devices, augmentation, multi-GPU, resumes, results, and fixing OOM, NaN loss, low mAP, or overfitting. For hyperparameter search and systematic improvement loops, see yolo-tuning.
Other plugins' skills for the same job