object-detection · vision · DINOv2 + deformable DETR · WASM q8 · 28.8 MB · Apache-2.0

Roboflow RF-DETR Nano

Roboflow's real-time transformer object detector pairing a pretrained DINOv2 Vision Transformer backbone with a lightweight deformable DETR decoder at 384×384 resolution across 80 COCO categories. Runs 100% locally in your browser on CPU WebAssembly (q8, 28.8 MB) with zero server uploads, instant client-side confidence filtering, and automatic bounding-box clamping.

roboflow/rf-detr onnx-community/rfdetr_nano-ONNX object-detection WASM q8 · 28.8 MB Apache-2.0

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

0.45

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.

Run detection to see class counts.
BackendWASM q8
Latency–
Shown / Raw–
Distinct Classes–
Union Coverage–
Clamped Boxes–

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)

Clamped pixel coordinates and confidence scores for the current frame
# 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)

Verified Hugging Face ONNX files and browser status
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

At a glance & model reference

Verified upstream model card and runtime contract
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)