YOLO26-cls: Optimized for AMD ROCm
YOLO26-cls is a real-time image classification model that predicts a class over the 1000 ImageNet categories in a single forward pass. This repository packages inference for image classification using ONNX Runtime, exported and validated for AMD ROCm so it runs efficiently on AMD GPUs, CPUs, and NPUs.
This is based on the implementation of YOLO26 found here. This repository contains configurations and scripts optimized for AMD® ROCm™ platforms. You can use the yolo26_classify AMD scripts to reproduce results or export with custom configurations. More details on model performance can be found here.
Task Overview
Task: Image classification
Dataset: ImageNet-1000 label space (a sample set — the imagenette subset — is staged under datasets/samples/ for visual evaluation)
Output metrics: Throughput (inferences/sec), latency (mean/P95/P99 ms), per-operator profiling breakdown
Model variants: Default is n (nano). Override with
MODEL_SIZE=n/s/m/l/x— note the classify download list shipsn/s/m/lweights only, soMODEL_SIZE=xmay not resolve to a hosted weight.
AMD ROCm Optimization
This model export has been adapted and validated for AMD Instinct™ / Radeon™ GPUs running ROCm, as well as AMD CPUs and AMD Ryzen AI NPUs. Key points:
- Validated backends: ONNX Runtime across CPU (FP32), GPU (MIGraphX Execution Provider — FP32/FP16/BF16/INT8), and NPU (VitisAI Execution Provider — BF16).
- No code changes required versus the upstream Ultralytics YOLO26-cls implementation — only environment/runtime configuration differs.
| Runtime | Precision | Backend | Hardware | Notes |
|---|---|---|---|---|
| ONNX Runtime | FP32 | CPU Execution Provider | AMD CPU | — |
| ONNX Runtime | FP32 / FP16 / BF16 / INT8 | MIGraphX Execution Provider | AMD Instinct™ / Radeon™ GPU (ROCm) | — |
| ONNX Runtime | BF16 | VitisAI Execution Provider | AMD Ryzen AI NPU | — |
Getting Started
For setup instructions, evaluation scripts, and custom configuration options, see the yolo26_classify on GitHub.
Model Details
Model Type: Image classification (single-pass CNN classifier)
Base Model: YOLO26-cls (Ultralytics), size n (nano) default
Model Stats:
- Input (
images):(1, 3, 224, 224)float32 - Output (
output0):(1, 1000)float32 - Model sizes:
n/s/m/lship pretrained classify weights (xmay not resolve to a hosted weight) - Precision tested: FP32 (CPU); FP32, FP16, BF16, INT8 (GPU); BF16 (NPU)
Accuracy Pipeline
Accuracy evaluation is not yet implemented for this model. The bundled imagenette subset (10 ImageNet classes, staged under datasets/samples/) is used only for visual top-5 sanity checks via annotated overlays, not full ImageNet-1000 accuracy scoring.
Dig Deeper
Want to explore the full evaluation scripts, config options, and other AMD-optimized model examples?
📂 View the full project on GitHub
The GitHub repository includes:
- Setup and prerequisites for ROCm environments
- Per-operator latency profiling scripts (including NPU AI Analyzer integration)
- Sample-image evaluation with annotated top-5 class overlays
- Benchmarking and reproduction instructions across CPU, GPU, and NPU
