Views
No views yet
| File | Params | Size | mAP (COCO val) | Inference cost |
|---|---|---|---|---|
yolox_nano.onnx | 0.9M | 3.5 MB | 25.8 | smallest, mobile/edge |
yolox_tiny.onnx | 5.1M | 20 MB | 32.8 | mobile / fast CPU |
yolox_s.onnx | 9.0M | 35 MB | 40.5 | recommended general default |
yolox_m.onnx | 25.3M | 97 MB | 46.9 | balanced |
yolox_l.onnx | 54.2M | 207 MB | 49.7 | quality > speed |
yolox_x.onnx | 99.1M | 378 MB | 51.1 | maximum accuracy |
yolox_darknet.onnx | 63.7M | 244 MB | 47.7 | Darknet backbone variant, mostly historical |
1import onnxruntime as ort
2import numpy as np
3
4sess = ort.InferenceSession("yolox_s.onnx")
5
6# Input: [1, 3, 640, 640] float32, RGB, NOT normalized (YOLOX expects raw [0,255]).
7# Letterbox-pad images to 640x640 maintaining aspect ratio before feeding.
8outputs = sess.run(None, {"images": img_tensor})[0]
9
10# Outputs: [1, 8400, 85]
11# 8400 = anchor predictions (P3/P4/P5 grids combined)
12# 85 = (cx, cy, w, h, obj_conf, *80 class probs)
13# Decode by multiplying obj_conf × max(class_probs), apply NMS.yolox_nano or yolox_tinyyolox_s (the recommended default)yolox_l or yolox_xyolox_darknet is included for reproducibility but the CSPDarknet-backbone variants above generally supersede it.LICENSE file included.