Models
YOLO Models
Practical YOLO export and validation notes for MIGraphX.
YOLO models are common in video pipelines. The main integration concern is whether non-max suppression is inside the ONNX graph or handled in application code.
Export Shape
A common serving shape:
input: [batch, 3, 640, 640]
output: [batch, max_detections, fields]For an NMS-included export, many pipelines expect:
[batch, 300, 6]where the fields are usually box coordinates, score, and class.
Ultralytics-Style Export
Example:
yolo export \
model=yolo11s.pt \
format=onnx \
imgsz=640 \
opset=17 \
dynamic=True \
nms=True \
simplify=True \
max_det=300 \
batch=16Validate immediately:
migraphx-driver compile yolo11s.onnx --gpu
migraphx-driver verify yolo11s.onnx --gpu
migraphx-driver perf yolo11s.onnx --gpuNMS Choice
| NMS location | Benefit | Cost |
|---|---|---|
| In ONNX graph | simpler application output | depends on operator support and shape behavior |
| In application code | more portable and controllable | more postprocess code to maintain |
For a multi-vendor backend, application-side NMS can be easier to keep identical across TensorRT, MIGraphX, and CPU fallback.
Checklist
1. MIGraphX compile succeeds
2. output shape matches postprocess
3. sample detections match a reference run
4. latency is measured at target batch sizes
5. saved .mxr artifact loads and runs