YOLOX: Exceeding YOLO Series in 2021
Paper β’ 2107.08430 β’ Published
The official ONNX export of YOLOX-S from Megvii's YOLOX 0.1.1rc0 release, an anchor-free YOLO detector trained on COCO (80 classes). Apache-2.0 code and weights, a permissive alternative to AGPL-licensed YOLOv8 and YOLO26.
Mirrored for use with inference4j, an inference-only AI library for Java.
try (ObjectDetector detector = YoloXDetector.s().build()) {
List<Detection> detections = detector.detect(Path.of("street.jpg"));
detections.forEach(d -> System.out.printf("%s (%.0f%%) at [%.0f, %.0f, %.0f, %.0f]%n",
d.label(), d.confidence() * 100,
d.box().x1(), d.box().y1(), d.box().x2(), d.box().y2()));
}
| Property | Value |
|---|---|
| Architecture | YOLOX-S (anchor-free, decoupled head), 9.0M parameters |
| Task | Object detection (COCO 80 classes) |
| COCO AP | 40.5 (val2017, 640x640, as reported by the YOLOX authors) |
| Input | images: [1, 3, 640, 640] float32, static |
| Pre-processing | Letterbox to the top-left corner: scale r = min(640 / h, 640 / w), bilinear resize to (int(w * r), int(h * r)), pad right and bottom with 114. Raw 0-255 BGR, no mean/std, NCHW float32 |
| Output | output: [1, 8400, 85]: per anchor point [x, y, w, h, objectness, 80 class scores], box not yet decoded |
| Post-processing | Decode per anchor point over strides 8, 16, 32 (row-major grid, stride 8 first): cx = (x + grid_x) * stride, cy = (y + grid_y) * stride, w = exp(w) * stride, h = exp(h) * stride. Score = objectness Γ class score (both already sigmoid), take the best class, divide boxes by r. NMS is not in the graph: the reference demo uses class-agnostic NMS at IoU 0.45 |
| Labels | COCO-80 in the usual order (0 = person ... 79 = toothbrush) |
| Original framework | PyTorch 1.7, ONNX opset 11 |
This model is licensed under the Apache License 2.0. Original model by Megvii (Ge et al., YOLOX: Exceeding YOLO Series in 2021, arXiv:2107.08430).
| Part | Origin |
|---|---|
| Code | Megvii-BaseDetection/YOLOX, Apache-2.0 |
| Weights | yolox_s.pth, YOLOX 0.1.1rc0 release, Apache-2.0 |
| ONNX export | yolox_s.onnx, the official export from the same release |
| Training data | COCO 2017 train (80 classes), trained from scratch: the YOLOX paper drops ImageNet pre-training |
| Changes in this mirror | None: files copied unchanged |