DETR (ResNet-50 / ResNet-101)
DETR (ResNet-50 and ResNet-101, COCO) from Facebook Research: end-to-end boxes and classes from 100 object queries, no NMS. Commercially usable.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
detr-r50-coco | synthetic (800x1344) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 55.5 62.0 12.4 9.93 9.27 4.40 | 491 / 540 459 / 558 280 / 332 218 / 272 233 / 292 182 (engine) |
detr-r101-coco | synthetic (800x1344) | original (fp32) original portable kernels | 78.9 80.8 18.7 13.7 | 564 / 634 531 / 650 316 / 368 254 / 328 |
Details
- Original code: https://github.com/facebookresearch/detr at
29901c51d7fe - Code licence: Apache-2.0 (permissive); files:
LICENSE - Weights licence: Apache-2.0
- Licence evidence: https://github.com/facebookresearch/detr/blob/29901c51d7fe8712168b8d0d64351170bc0f83e0/README.md (License section)
- Training data: COCO 2017 (train, instance annotations), ImageNet-1k (ILSVRC 2012 classification) (COCO 2017 train (500 epochs); the ResNet backbone was initialised from torchvision's ImageNet-1k model)
- Options:
score_threshold= 0.05 (0.0 to 1.0),max_detections= 100 (>= 1) - Kernel libraries:
cudnn_hacc - Variants:
detr-r50-coco,detr-r101-coco - Outputs: boxes, scores, labels; label_set:
coco-80 - Input size: any H x W >= 32, padded to a multiple of 32
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
detr-r50-coco3000x4000 (0.6 GiB peak allocated, 0.6 reserved);detr-r101-coco3000x4000 (0.6 GiB peak allocated, 0.7 reserved) detr-r50-coco800x1344, first call: portable + torch.compile 22 s (cold Inductor cache), TensorRT fp16 33 s (ONNX + engine).detr-r50-cocooriginal (fp32) 800x1344: incl. CPU resize + host copy (official pipeline)detr-r50-cocooriginal 800x1344: torch.autocast(fp16) around the forward; incl. CPU resize + host copy (official pipeline)detr-r101-cocooriginal (fp32) 800x1344: incl. CPU resize + host copy (official pipeline)detr-r101-cocooriginal 800x1344: torch.autocast(fp16) around the forward; incl. CPU resize + host copy (official pipeline)detr-r50-cocoload / first call: original 2.55 s / 0.827 s, portable 0.7 s / 0.439 s, kernels 0.28† s / 0.032 sdetr-r101-cocoload / first call: original 0.95 s / 0.063 s, portable 0.81 s / 0.019 s, kernels 0.22† s / 0.014 s- † measured in the speed sweep after the portable load (or an earlier size) in the same process: file cache and kernels are warm, so the time is lower than a fresh start.
- Protocol, median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls
Measured
pycocotools COCOeval of the top 100 detections per image. Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | kernels | note |
|---|---|---|---|---|---|---|
detr-r50-coco | COCO val2017, every 10th image, box mAP | 43.59 | 43.53 | 43.59 | 43.62 | |
detr-r101-coco | COCO val2017, every 10th image, box mAP | 44.04 | 44.00 | 44.11 | 44.05 |
Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.
Parity
CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.2 and p99 <= 1.0 (absolute error of the output boxes).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
detr-r50-coco | 0.02003 / 0.04454 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400 |
detr-r101-coco | 0.03227 / 0.07451 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400 |