rfdetr-small / README.md
Deeds67's picture
Upload folder using huggingface_hub
eb76679 verified
|
Raw
History Blame Contribute Delete
1.8 kB
---
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.