File size: 1,804 Bytes
eb76679 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ---
license: apache-2.0
tags:
- onnx
- object-detection
- rf-detr
- pet-detection
library_name: onnx
pipeline_tag: object-detection
---
# RF-DETR Small (ONNX) — pet detection for Gallery
ONNX export of [RF-DETR](https://github.com/roboflow/rf-detr) Small by Roboflow, used by
[Gallery](https://github.com/open-noodle/gallery) for pet detection.
Unmodified COCO-pretrained weights. No fine-tuning.
## Files
| Path | Description |
| ---------------------- | -------------------------------- |
| `detection/model.onnx` | RF-DETR Small, opset 17, batch 1 |
## Inference contract
Getting any of this wrong degrades output silently rather than erroring.
**Input** — `input`, shape `[1, 3, 512, 512]`, float32:
1. Decode to **RGB** (not BGR)
2. Resize to 512×512 — plain square resize, **not** letterboxed
3. Scale to `[0, 1]`
4. Normalise with ImageNet statistics: mean `[0.485, 0.456, 0.406]`, std `[0.229, 0.224, 0.225]`
5. Transpose HWC → CHW, add batch dimension
**Output** — two tensors:
| Name | Shape | Meaning |
| -------- | -------------- | ---------------------------------------------- |
| `dets` | `[1, 300, 4]` | Boxes as cx, cy, w, h — normalised to `[0, 1]` |
| `labels` | `[1, 300, 91]` | Class logits, **pre-sigmoid** |
Apply sigmoid to `labels`, then threshold. Classes use the **91-class COCO id space**
(90 categories plus background), not the contiguous 80-class space YOLO uses — so
`bird=16, cat=17, dog=18, horse=19, sheep=20, cow=21`.
The 300 queries are already deduplicated. **No NMS step is required.**
## License
Apache-2.0, inherited from RF-DETR. See the
[upstream repository](https://github.com/roboflow/rf-detr) for full terms.
|