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.
Camera frames stay strictly on your device. Capture a snapshot to detect objects.
Camera idle.
Loading a curated scene…
Select a box to inspect its query rank and coordinates.
Confidence calibration histogram (all candidates ≥ 0.15)
| Feature stride | Grid map | Encoder tokens | Target scale | Detections | Mean score |
|---|---|---|---|---|---|
| Run the detector to inspect multi-scale stride assignment. | |||||
| Class | Group | Count | Best score | Mean score | Frame area |
|---|---|---|---|---|---|
| Run the detector to populate class counts. | |||||
| 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
Basics
Compare Objects365-pretrained metrics vs COCO-only R50vd, run top-K query selectivity ablations (K=10..300), and inspect aspect/scale breakdowns.
Practical
FIFO batch scene audit across multiple images with mid-batch Cancel, area coverage %, target checklists, and CSV/JSON/COCO exports.
Wild
Stress-test R50vd (O365)'s 300 queries against scale, border crop, occlusion, blur, low light, and JPEG blockiness with live IoU drift.
Multi-model
Pit O365-pretrained R50vd against COCO-only R50vd at the identical 45.46 MB budget to measure the zero-cost pretraining gain live.