--- license: apache-2.0 library_name: unity-sentis tags: - unity - sentis - on-device - object-detection - yolox --- # sentis-yolox YOLOX object detection converted to **Unity Inference Engine (Sentis)** FP16. ## Files ``` yolox_fp16.sentis YoloxDetector.cs # self-contained Unity Sentis inference (COCO labels) ``` ## Model I/O - **Input:** RGB NCHW `[1, 3, S, S]` in `[0, 1]` (read `S` from the model; the `[0,1]→[0,255]` scale is baked into the export). YOLOX is typically trained BGR, so a R↔B swizzle is usually needed. - **Output:** one tensor `[1, N, 5+C]` (or `[1, 5+C, N]`) where each candidate is `[cx, cy, w, h, objectness, class_0..class_{C-1}]`, scores already sigmoid-activated and boxes in input-pixel coordinates (export with the grid/stride decode baked in). NMS runs on the C# side. ## Inference A complete self-contained implementation lives in [`YoloxDetector.cs`](YoloxDetector.cs) (texture → tensor with optional R↔B swizzle, layout auto-detection, scoring, class-wise NMS, GPU warmup, 80 COCO labels inlined). Minimal usage: ```csharp var detector = new YoloxDetector(BackendType.GPUCompute); detector.Load(modelRoot); // folder holding yolox_fp16.sentis List dets = await detector.DetectAsync(frameTexture); // boxes in input-pixel space ``` > Do not substitute Ultralytics weights (`yolo*`), which are **AGPL-3.0**. This repo ships YOLOX only. ## License & attribution Apache-2.0. Converted from [Megvii-BaseDetection/YOLOX](https://github.com/Megvii-BaseDetection/YOLOX) (Apache-2.0).