Skip to content
object-detection · vision WASM q8 · 45.5 MB ResNet-50-vd · Objects365 → COCO 300 queries · NMS-free Apache-2.0

RT-DETR R50vd (Objects365 → COCO) — Live Detection & Diagnostics Lab

Baidu's RT-DETR-R50vd pairs a 50-layer ResNet-vd backbone (depths [3, 4, 6, 3], 42M params, 136 GFLOPs) pretrained on Objects365 and fine-tuned on 80 COCO classes (55.3 AP / 37.9 APS on COCO val2017 — +2.2 AP and +3.1 APS over COCO-only R50vd at the identical 45.46 MB weight budget). Runs on-device in a Web Worker via Transformers.js 3.7.5 (CPU WASM q8, onnx/model_quantized.onnx) — photos never leave your browser.

At a glance

Upstream model PekingU/rtdetr_r50vd_coco_o365 (42M params, 136 GFLOPs, 55.3 COCO AP / 73.4 AP50)
Browser ONNX repo onnx-community/rtdetr_r50vd_coco_o365 → onnx/model_quantized.onnx
Pipeline task object-detection (pipeline("object-detection", "onnx-community/rtdetr_r50vd_coco_o365"))
Architecture RTDetrForObjectDetection (rt_detr): ResNet-50-vd [3, 4, 6, 3] → hybrid encoder (encoder_hidden_dim: 256, strides [8, 16, 32], AIFI + CCFM) → 6-layer decoder (d_model: 256), 300 queries, 640×640 input
Output [{ label, score, box: { xmin, ymin, xmax, ymax } }] — 80 sigmoid class logits per query, NMS-free one-to-one Hungarian matching
Quantization & size q8: 45.46 MB (onnx/model_quantized.onnx & onnx/model_int8.onnx both 45,463,461 B; fp16 87.98 MB · q4 146.24 MB · fp32 175.42 MB unused)
Runtime & backend Shared ../../lib/webai.js (Transformers.js 3.7.5) · CPU WASM in a module Web Worker
Labels & license 80 COCO classes (sofa, tvmonitor, diningtable, pottedplant, motorbike, aeroplane) · Apache-2.0

Live object detection lab

One pass captures all candidate queries scoring ≥ 0.15 so confidence thresholding and COCO supercategory filtering update instantaneously on the main thread. Click or Tab to any canvas box overlay or box button below to inspect its exact query rank and pixel bounds.

Loading a curated scene…

Select a box to inspect its query rank and coordinates.

Backend / dtype–
Inference–
Queries ≥ 0.15–
Shown–
Classes–
Same-class dupes–
Non-finite–

Confidence calibration histogram (all candidates ≥ 0.15)

Hybrid encoder stride diagnostics (640×640 multi-scale feature assignment)
Feature stride Grid map Encoder tokens Target scale Detections Mean score
Run the detector to inspect multi-scale stride assignment.
Per-class counts & area share above threshold
Class Group Count Best score Mean score Frame area
Run the detector to populate class counts.
Query / box inspector (bounded frame pixels)
Query rank Class Score Box [x1, y1, x2, y2] Size (W×H)
No detections yet.

See inside — zero-cost Objects365 pretraining at 45.46 MB

Unlike stepping up from R50vd to R101vd (which nearly doubles weights from 45.46 MB to 79.80 MB and compute from 136 to 259 GFLOPs), RT-DETR-R50vd (O365 → COCO) keeps the exact same ResNet-50-vd [3, 4, 6, 3] backbone, encoder_hidden_dim: 256 hybrid encoder across strides [8, 16, 32] (8,400 multi-scale tokens), and 300-query 6-layer decoder as COCO-only rtdetr-r50vd. Pretraining on Objects365 (365 everyday categories, 1.7M+ images) before 24-epoch COCO fine-tuning improves rare-class, occluded, and small-object recall (+2.2 AP overall, +3.1 APS) with zero extra bytes or inference latency.

Show the code — epoch-guarded pipeline load in worker.js
Show the code — hybrid encoder stride-8 / 16 / 32 query diagnostic

Use-case ladder

References