use case · basics onnx-community/rtdetr_r50vd · q8 WASM Apache-2.0

Inside RT-DETR R50vd: NMS-Free Query Selection & Confidence Calibration

RT-DETR's 300 decoder queries each predict one box and 80 independent sigmoid class scores. Run one photo, then explore what those scores mean: how many objects survive each confidence threshold, whether any two queries ever claim the same object (the job NMS used to do), and how confidence changes with object size.

1 · Pick a photo and run one pass

Loading a sample photo…

Boxes flagged by the overlap audit are outlined in red.

2 · Confidence threshold sweep (0.15 → 0.85)

Every row re-filters the same cached pass. RT-DETR scores are per-class sigmoids trained with varifocal loss, so a well-localised object often lands around 0.4–0.7 rather than near 1.0 — a lower threshold than you would use for softmax detectors is normal. Press a row to apply it.

Detections surviving each threshold
ThresholdBoxesClassesMean scoreShare of candidates
Run the model to sweep.
Show the code — threshold sweep over cached candidates

3 · Duplicate-overlap audit: why there is no NMS

During training RT-DETR's loss uses Hungarian matching — a one-to-one assignment between ground-truth objects and queries — so a second query that piles onto an already-claimed object is penalised as "no object". At inference the model should therefore produce one box per object without any suppression step. This audit takes the boxes above the display threshold and lists every pair that overlaps beyond the IoU cut-off. Same-class pairs are true duplicates (what greedy NMS would delete); cross-class pairs are normal (a cat sitting on a sofa).

Boxes audited–
Same-class pairs–
Cross-class pairs–
Greedy NMS would remove–
Max same-class IoU–

Run the model to audit overlaps.

Overlapping pairs above the IoU cut-off
PairKindIoUScoresInspect
No pairs yet.
Show the code — same-class vs cross-class overlap audit with a greedy-NMS reference

4 · Small vs large objects

COCO's size buckets use absolute pixel area in the original image: small < 32², medium < 96², large ≥ 96². RT-DETR resizes every photo to 640×640, so small objects get only a handful of stride-8 feature cells — watch their confidence drop compared with large ones.

Detections above the display threshold, by COCO area bucket (original-image pixels)
BucketCountMean scoreClasses
Run the model to break down sizes.
Show the code — COCO small / medium / large area breakdown