1. Initialise RF-DETR Nano locally
Backend honesty (pinned to WASM q8, 28.83 MB): Empirical
Chrome testing showed that webgpu + fp16 (54.36 MB) silently
returns [] (zero detections) due to 16-bit float overflow/underflow inside
DINOv2 / deformable-attention box logits. This demo deliberately runs CPU WASM
q8 everywhere so detections stay reliable on every desktop and mobile device.
2. Pick a photo, upload a file, or capture from webcam
Initialise RF-DETR Nano above, then click Detect objects.
Active image: Domestic Cat (1200×1600 · Smirkybec · CC BY-SA 4.0)
Detected Classes & Tally
One WASM pass fetches every candidate down to 0.15; scrubbing the
threshold slider updates boxes and counts instantaneously without re-running inference.
Click any box on the canvas to inspect it below.
See inside — raw vs clamped boxes & DINOv2 ONNX weights
RFDetrForObjectDetection resizes each frame to 384×384 via
RTDetrImageProcessor (rescaled without mean/std normalization), runs a
DINOv2 Vision Transformer backbone with windowed attention + deformable DETR decoder
queries, and returns pixel-space boxes. Wide background boxes occasionally project slightly
outside the frame (e.g. xmin < 0); we preserve the raw prediction below and
clamp every rendered/exported coordinate cleanly into [0, width] × [0, height].
Detected Bounding Boxes (active threshold)
| # | Class | Score | Clamped Box [x1,y1,x2,y2] | Size | Bounds |
|---|---|---|---|---|---|
| Run detection to inspect returned bounding boxes. | |||||
ONNX Artifact Breakdown (onnx-community/rfdetr_nano-ONNX)
| File | Precision | Size | Status |
|---|---|---|---|
onnx/model_quantized.onnx |
q8 (int8/uint8) |
28.83 MB | Active WASM default |
onnx/model.onnx |
fp32 |
108.07 MB | Reference full precision |
onnx/model_fp16.onnx |
fp16 |
54.36 MB | Disabled on WebGPU (returns []) |
onnx/model_q4.onnx |
q4 |
25.04 MB | Experimental 4-bit |
Use-case ladder — go deeper with RF-DETR Nano
Threshold, Box-Geometry & Class Filter Lab
Scrub confidence from 0.15 to 0.90 over cached detections, filter COCO class chips, click boxes or rows for pixel geometry, and inspect the real worker code.
PracticalDataset Auto-Annotator & Batch Exporter
Batch-label multiple photos and local uploads, toggle individual boxes to accept or drop them, and export COCO JSON, YOLO .txt, or formula-safe CSV.
WildLive Object Spotlight, Bokeh & Cutout Magnifier
Click detected objects to spotlight them, blur the background with bokeh, privacy-pixelate people locally, or download individual object PNG cutouts.
Multi-modelDINOv2 RF-DETR Nano vs CNN DETR-ResNet-50 Arena
Benchmark both detectors side by side on the same photo: live latency speedup, greedy IoU box matching, unique detections, and dual solid/dashed overlay.
At a glance & model reference
| Upstream Model | roboflow/rf-detr (Roboflow RF-DETR Nano COCO · license Apache-2.0) |
|---|---|
| Browser ONNX Repo | onnx-community/rfdetr_nano-ONNX |
| Task & Pipeline | object-detection via pipeline("object-detection", ...) |
| Architecture | RFDetrForObjectDetection — DINOv2 ViT backbone + deformable DETR decoder · 384×384 input · 80 COCO classes |
| Runtime & Backend | Shared @huggingface/transformers@3.7.5 via Web Worker · pinned to CPU WASM q8 (28.83 MB; WebGPU fp16 disabled due to logit overflow) |