object-detection Β· vision 4.48 MB q8 WASM Β· ~200 ms 80 COCO Classes Β· FDR License: Apache-2.0

D-FINE Nano COCO β€” Ultra-Compact Real-Time Object Detector

The smallest member of the ICLR 2025 D-FINE family (DFineForObjectDetection with an HGNetv2 backbone and 32-bin Fine-Grained Distribution Refinement) running all 80 COCO classes 100% locally in a Web Worker in just 4.48 MB (q8 CPU WASM) via shared Transformers.js pipeline("object-detection").

At a glance

Upstream model ustc-community/dfine-nano-coco (ICLR 2025 D-FINE: Fine-grained Distribution Refinement)
Loaded ONNX repo onnx-community/dfine_n_coco-ONNX
Pipeline task object-detection
Architecture & FDR DFineForObjectDetection (d_fine, hgnet_v2 backbone, d_model: 128, decoder_layers: 3, max_num_bins: 32, RTDetrImageProcessor 640Γ—640, 300 queries) Β· 80 COCO classes
Backend & size CPU WASM q8 default β€” 4.48 MB (4,477,982 B onnx/model_quantized.onnx); optional fp16 (7.87 MB) and fp32 (15.26 MB) on Basics. Runs in every browser, zero GPU required.
License Apache-2.0 (code & weights; trained on MS-COCO 2017)

Interactive 80-Class Real-Time Detector

Pick a sample photo, drop/paste your own image, or snap a live camera frame. Hover or click any bounding box on the canvas (or use the class filter chips) to inspect exact COCO labels, confidence scores, pixel coordinates, and frame area.

Initialising model loader…

Hover or click a bounding box on the canvas (or select a row below) to inspect coordinates and score.

Detected boxes–
Unique classes–
Inference time–
Throughput–
Backend / dtypewasm Β· q8
NaN count–
Detected COCO objects (click Focus to highlight a box on the canvas)
# COCO Class Group Score Box [xmin, ymin, xmax, ymax] Area % Inspect
Prepare D-FINE Nano COCO above to run 80-class detection.

See inside D-FINE Nano: Why 4.48 MB still localizes sharply

Instead of regressing box offsets as single point estimates, D-FINE predicts a 32-bin probability distribution per edge across 3 decoder layers and iteratively refines residuals via Fine-Grained Distribution Refinement (FDR) distilled from a larger teacher (GO-LSD). Explore the live worker and post-processing functions executing in your browser below:

Show the code β€” worker.js: ensureLoaded() (shared 3.7.5 WASM q8 + epoch guards)
Show the code β€” worker.js: detectImage() (80-class inference + NaN/None guards)
Show the code β€” dfine-nano-core.mjs: postProcessDetections() (clamping & IoU dedup)

Why it matters

At 4.48 MB quantized on CPU WASM and ~200 ms latency, D-FINE Nano COCO is smaller than many hero web images yet delivers full 80-class localization:

Explore the 5-route use-case ladder

References & model card