# RF-DETR: the first real-time detector past 60 AP, and every size is cut from a supernet

> Satyajit Ghana — Head of Engineering @ Inkers Technology
> canonical: https://ai.satyajit.si/articles/rf-detr
> date: 2026-10-02
> tags: computer-vision, object-detection, vision-transformers, tensorrt, benchmarks, inference

A DETR predicts a fixed set of boxes in one shot, matches them to the ground truth with a bipartite assignment, and skips non-maximum suppression entirely. That design has been elegant since 2020 and slow since 2020. [RF-DETR](https://github.com/roboflow/rf-detr) (Roboflow: Robinson, Robicheaux, Popov, Ramanan, Peri; [arXiv 2511.09554](https://arxiv.org/abs/2511.09554), ICLR 2026) is a DETR that is fast enough to call real-time: a DINOv2 vision-transformer backbone, a deformable-attention decoder, and a weight-sharing neural architecture search (NAS) that trains one network from which the published sizes are read. RF-DETR-2XL is, by the authors' claim, the first real-time detector past 60 AP on COCO.

Object detection is where I spend a lot of time, so I wanted to know what the headline is made of. The first version of this page read the paper and the repository against each other; this one runs the code. I installed the Apache-2.0 `rfdetr` package at the release this page was written against, evaluated the official Nano and Small weights on all 5,000 COCO val2017 images on an RTX 3090, counted their parameters, timed them, and turned the NAS knobs on the released checkpoints to see how much of "pick your operating point after training" survives in what you can download.

| | |
|---|---|
| Repo | [roboflow/rf-detr](https://github.com/roboflow/rf-detr) · I pinned v1.11.1 (2026-09-30); 1.12.1 was tagged 2026-11-12 |
| Paper | [arXiv 2511.09554](https://arxiv.org/abs/2511.09554) v2, "RF-DETR: Neural Architecture Search for Real-Time Detection Transformers" (ICLR 2026) |
| Tasks | detection, instance segmentation, keypoint detection (preview), one API |
| Backbone | DINOv2 ViT-S for N/S/M/L, ViT-B for XL/2XL (replaces LW-DETR's CAEv2) |
| License | `rfdetr` package + N/S/M/L detectors + all Seg + keypoint = Apache-2.0; XL/2XL detection (`rfdetr_plus`) = PML 1.0 |
| Headline | 2XL: 60.1 COCO AP50:95 at 17.2 ms (T4, TensorRT, FP16, batch 1) |

<RepoCard repo="roboflow/rf-detr" />

## Why "real-time DETR" used to be an oxymoron

A classical detector (YOLO, Faster R-CNN) predicts a dense grid of candidate boxes, then runs non-maximum suppression, a hand-tuned post-process whose cost grows with how crowded the frame is. DETR (2020) threw it out. It carries a fixed number of learned *object queries*, lets them attend to image features through a transformer decoder, and emits exactly that many boxes. Training uses the Hungarian algorithm to find the one-to-one matching of predictions to ground truth with the lowest total cost, so each query learns to claim at most one object. No grid, no duplicates, no NMS.

The original DETR needed hundreds of epochs and ran nowhere near real time. [Deformable DETR](https://arxiv.org/abs/2010.04159) (attend to a few sampled points), then RT-DETR, [LW-DETR](https://arxiv.org/abs/2406.03459) and D-FINE cut it down to single-digit milliseconds on a T4. RF-DETR keeps LW-DETR's deformable decoder and changes the backbone, to [DINOv2](https://arxiv.org/abs/2304.07193), and the way the whole thing is sized.

<Figure src="https://media.thesatyajit.com/ai/articles/rf-detr/fig1.png?v=33a4fd803f01d7fe" alt="RF-DETR architecture diagram. On the left, image patches are summed with positional embeddings and fed into a ViT backbone whose first block runs two windowed encoder layers followed by a non-windowed encoder layer, then blocks 2 through 4; the backbone emits multi-scale feature maps. A projector and a bilinear upsample feed a query-selection step that initializes query embeddings. A stack of decoder groups each run six layers of self-attention, deformable cross-attention, and a feed-forward network. The final decoder output goes to a detection head with separate class and box heads, producing a labeled bounding box, and to a segmentation head of depthwise convolutions and feed-forward layers that produces an instance mask." caption="RF-DETR: a DINOv2 ViT backbone with interleaved windowed and non-windowed attention, a projector, and a deformable-attention decoder feeding class, box, and (optional) mask heads. Detection and segmentation losses are applied at every decoder layer so layers can be dropped at inference (RF-DETR, Figure 2)." />

Read it left to right. Patches plus positional embeddings go into the ViT. Inside each backbone block, *windowed* layers (self-attention restricted to a tile of tokens, cheap) alternate with a *non-windowed* layer (global attention, expensive, mixes information across the image). A projector passes the backbone features to the decoder. The decoder is *two-stage*: the encoder output scores every feature-map cell, the most confident cells become the starting boxes for the queries, and the decoder layers refine them with self-attention among queries, deformable cross-attention into the image and a feed-forward network. Class and box heads turn each query into a label and a rectangle. Losses are applied at *every* decoder layer, which is what makes it safe to drop decoder layers at inference.

<Video
  src="https://ai.satyajit.si/articles/rf-detr/clip1"
  poster="https://media.thesatyajit.com/ai/articles/rf-detr/clip1-poster.jpg?v=bfc91f3f703fd9be"
  alt="An animated walkthrough on a photo of a dog on a couch. A grid of 1,296 cells over the image is shown with the caption '1296 to 300': the 300 most confident cells become starting guesses called queries. Then the decoder refines a box labelled dog 0.90, and lines show each query reading the others in a decoder layer."
  caption="The two-stage start: the 36 x 36 = 1,296 cells of a 576-pixel Medium input are scored, the 300 most confident become queries, and the decoder refines them. Video from @AlexBodner_'s post on X."
/>

## The DINOv2 backbone

LW-DETR used a CAEv2 backbone. RF-DETR swaps it for DINOv2, a ViT self-supervised on a large curated image corpus. The paper's motivating complaint is that specialist detectors overfit COCO through bespoke architectures, learning-rate and augmentation schedules, then fall over on datasets with a different object count, class count or imaging modality. A backbone pretrained at internet scale arrives already knowing what surfaces, textures and boundaries look like. In the paper's backbone ablation, DINOv2 beats CAEv2 by 2.4% under identical pretraining and hyperparameters.

The cost: DINOv2's encoder has 12 layers to CAEv2's 10, and the authors "make up for this latency using NAS". They also found SAM2's Hiera-S backbone considerably *slower* than its size suggests, because a plain ViT gets TensorRT's fused attention kernels and Hiera does not.

Two training details make the transplant work. The learning rate drops to 1e-4 (LW-DETR used 4e-4) with a per-layer multiplicative decay of 0.8, so the early backbone layers barely move and DINOv2's features survive. And the multi-scale projector uses layer norm instead of batch norm, which costs a little accuracy but lets the whole thing train on consumer GPUs with gradient accumulation.

## One supernet, many sizes

Classical NAS trains a candidate, measures it and repeats, per device. RF-DETR uses the Once-For-All trick: train one over-parameterised network whose sub-networks share weights, sampling a random configuration at every step, so every sub-network is trained a little all the time. The paper notes a side effect: this "architecture augmentation" regularises the model, enough that adding weight-sharing NAS improves even the base configuration, whose patch size 14 is not in the search grid.

<Figure src="https://media.thesatyajit.com/ai/articles/rf-detr/fig2.png?v=7fb93b4ab3d53210" alt="Five-panel diagram of RF-DETR's NAS search space, each panel a tunable knob with an arrow showing the accuracy-latency tradeoff. Panel a, patch embedding interpolation: an 8 by 8 patch grid gives smaller patches, more tokens, more accuracy; a 32 by 32 grid gives larger patches, fewer tokens, faster. Panel b, decoder layers: fewer layers are faster, more layers are more accurate. Panel c, query dropping: fewer queries are faster, more queries are more accurate. Panel d, resolution interpolation: a lower-resolution feature grid is faster, higher resolution is more accurate. Panel e, number of windows: fewer windows are more accurate, more windows are faster." caption="The five tunable knobs of RF-DETR's weight-sharing NAS: patch size, decoder depth, query count, input resolution, and windows per attention block. Each slides accuracy against latency, and the search evaluates their grid (RF-DETR, Figure 3)." />

The five knobs are input resolution, patch size, decoder layers, query count and windows per windowed-attention block. Resolution and patch size are varied during training, with positional embeddings pre-allocated for the largest resolution over the smallest patch and interpolated down. Decoder layers and queries are only dropped at inference. The search evaluates **6,468 configurations**: 11 resolutions × 7 patch sizes × 7 decoder-layer counts × 3 window settings × 4 query settings. That grid is a search over a trained network, with no retraining per point.

<Video
  src="https://ai.satyajit.si/articles/rf-detr/clip2"
  poster="https://media.thesatyajit.com/ai/articles/rf-detr/clip2-poster.jpg?v=dcf8fbb1481d3220"
  alt="A pipeline diagram reading 576 px, patches 16 px, backbone 12 blocks, queries 300, decoder 4 layers, boxes. Five dials appear under it labelled resolution 11, patch size 7, windows 3, queries 4 and decoder layers 7, and the equation 11 x 7 x 3 x 4 x 7 = 6468 is written beneath."
  caption="The search grid as the paper counts it. Video from @AlexBodner_'s post on X."
/>

There are two supernets, not one. The paper's own configuration table (its Table 7) puts N, S, M and L on DINOv2-S and XL and 2XL on DINOv2-B, and the paper's Figure 1 draws one continuous curve per backbone. "Every point on a curve comes from a single training run" is the claim, and it is a per-backbone claim.

It costs something: a NAS run takes two to four times as long as one non-NAS baseline, and the paper estimates the search at about 10,000 GPU-hours (200 T4s for 48 hours), against retraining a separate model for every size and latency target.

## What the released code contains

I read `src/rfdetr/config.py` at v1.11.1 for the five knobs. They are all there as `ModelConfig` fields: `resolution`, `patch_size`, `num_windows`, `dec_layers`, `num_queries`. For N through L, `config.py` sets them exactly as the paper's Table 7 (its detection-config table) does. XL and 2XL live in the separate `rfdetr_plus` package, so those two rows are Table 7's:

| Size | Backbone | Resolution | Patch | Windows | Decoder layers | Queries |
|---|---|---|---|---|---|---|
| N | DINOv2-S | 384 | 16 | 2 | 2 | 300 |
| S | DINOv2-S | 512 | 16 | 2 | 3 | 300 |
| M | DINOv2-S | 576 | 16 | 2 | 4 | 300 |
| L | DINOv2-S | 704 | 16 | 2 | 4 | 300 |
| XL | DINOv2-B | 700 | 20 | 1 | 5 | 300 |
| 2XL | DINOv2-B | 880 | 20 | 2 | 5 | 300 |

N through L differ only in resolution and decoder depth. The segmentation variants move the other knobs: patch 12, one window for Seg-N, 100 queries for Seg-N and Seg-S and 200 for Seg-M and Seg-L.

What the repository does *not* contain is the search. There is no supernet training loop, no configuration sampler, no code that grids over 6,468 points. The README says the same method "is now available on the Roboflow platform", and its docs folder carries a chart comparing "Platform NAS" with "Paper NAS". The open package ships the points the search picked, not the search.

## Running it

Setup on the 3090 box: `rfdetr==1.11.1` with torch 2.7.1 (the package needs transformers 5.x, which needs torch 2.6 or newer), the official `rf-detr-nano.pth` and `rf-detr-small.pth`, the 5,000 val2017 images. I scored the released weights three ways. First, the package's public `predict()` with `threshold=0.0` and its default top-300 selection, boxes scored with pycocotools. Second, the same with one change to `predict()`'s resize (below). Third, the package's own evaluator, `model.evaluate(split="val", dataset_file="coco", ...)`, which is the Lightning validation loop training uses. All three are FP32 PyTorch, not the TensorRT FP16 engine behind the README's latency column.

| AP50:95 / AP50 | README (SAB) | Paper Table 2 | `evaluate()` | `predict()` | `predict()`, antialiased resize |
|---|---|---|---|---|---|
| Nano | 48.4 / 67.6 | 48.0 / 67.0 | 48.46 / 67.60 | 48.03 / 67.10 | 48.43 / 67.55 |
| Small | 53.0 / 72.1 | 52.9 / 71.9 | 53.01 / 72.10 | 52.80 / 71.96 | 52.97 / 72.10 |

The package's evaluator reproduces the README within 0.06 AP on both sizes (48.46 against 48.4, 53.01 against 53.0). `predict()` lands 0.4 lower on Nano and 0.2 lower on Small. The whole difference is one line in `predict()`:

```python
# rfdetr/detr.py (1.11.1), inside predict()
# antialias=False matches the antialias-free bilinear resize (cv2.INTER_LINEAR)
# used by Albumentations during training — see issue #1203.
batch_tensor = torch.stack([F.resize(t, resize_to, antialias=False) for t in processed_images])
```

COCO images are about 640 pixels on the long side and Nano runs at 384, so the resize is a downscale, and antialiasing a downscale changes what the backbone sees. Patch that call to `antialias=True` and `predict()` scores 48.43, the README's number. The validation loop's `Resize` (`datasets/_torchvision.py`) resizes PIL images, which torchvision always antialiases, and its own comment says so; the inference API deliberately does not, to match the training augmentation. Which one your deployment matches depends on how it resizes, and on Nano it is worth 0.4 AP.

**Parameters.** `sum(p.numel() for p in model.parameters())` on the loaded `LWDETR` module gives 30,467,298 for Nano and 32,111,170 for Small, which round to the README's 30.5M and 32.1M. Medium and Large come out at 33,687,458 and 33,933,218 against the README's 33.7M and 33.9M. Splitting by tensor name shows what is in that number. The backbone is 23.27M in Nano and 23.44M in Small; the difference is positional embeddings for a 32 × 32 patch grid instead of 24 × 24. Each decoder layer is about 1.47M. And about 3.9M sits in tensors that LW-DETR's "group DETR" training trick replicates 13 times: the query features (`query_feat`, 13 × 300 × 256), the reference points, and the two-stage encoder heads (`enc_output`, `enc_out_class_embed`, `enc_out_bbox_embed`). At inference only the first group is used, so roughly 3.6M of Nano's 30.5M (12/13 of those tensors) never touch an image after training. The README's count is honest about what it is (`model.parameters()`), but it is not the number of weights an inference pass multiplies by.

**Latency.** The README's 2.3 ms (Nano) and 3.5 ms (Small) are T4, TensorRT, FP16, batch 1, through Roboflow's SAB harness. I did not build TensorRT engines. Through the package's own optimised path, `model.inference(dtype=torch.float16)`, which traces the model with TorchScript, the 3090 gives a median of 6.8 ms for Nano and 7.9 ms for Small over 300 back-to-back batch-1 passes, and 8.4 and 9.4 ms with the paper's 200 ms pause between passes. The `inductor` backend (CUDA graphs) failed to compile on torch 2.7.1. A bigger GPU coming out three times slower than a T4 is the point: at this size a TorchScript forward is bound by kernel launches on a busy CPU, not by the GPU, and the box was shared. The paper's latency story is a TensorRT story, and these numbers do not belong in the same table as the README's.

## Paper 48.0, README 48.4

The earlier version of this page said the README re-measured newer checkpoints in a different harness, and that the paper reported the configuration "as it stood at submission". The git history says otherwise. The README has listed Nano at 48.4 AP since commit `110df1cd` on 2025-07-23, four months before the paper's first arXiv version (2025-11-12), and that first version already said 48.0.

The explanation is in the paper's Appendix G. Its Table 15 lists each COCO detector twice: as mined from the supernet, and after a short fine-tune at that one configuration. Nano is 48.0 AP and 67.0 AP50 as mined, and the fine-tune adds +0.4 and +0.6: 48.4 and 67.6, the README's numbers. Small is 52.9 and 71.9 plus +0.1 and +0.2: 53.0 and 72.1. Medium adds +0.0, and the README and paper agree at 54.7. Table 2 in the body reports the mined models; the README reports the fine-tuned ones.

The downloadable checkpoints are the fine-tuned row, and the full COCO breakdown says so. Through the antialiased resize, my Nano run gives AP 48.4, AP50 67.5, AP75 51.8, small/medium/large 25.3 / 53.7 / 71.3. Table 15's fine-tuned Nano is 48.4, 67.6, 51.7, 25.3, 53.6, 71.3. Six numbers, none more than 0.1 apart. Small matches its fine-tuned row the same way (53.0, 72.1, 57.2, 31.8, 58.4, 73.0 against 53.0, 72.1, 57.2, 31.8, 58.5, 73.1). The mined Nano in Table 2 is 51.4 AP75 and 70.0 on large objects; no evaluation of the released file I ran gets there. The default `predict()` reproduces Table 2's AP and AP50 (48.0, 67.1) by coincidence, not its breakdown (51.0 AP75, 70.6 large).

The checkpoints carry their own training `args`, and they fit: COCO, a learning rate of 1e-6 (1.5e-6 on the encoder), multi-scale training off, one fixed resolution (384 for Nano, 512 for Small), a 60-epoch schedule saved at epoch 48 and epoch 40. Two fields do not fit anything (`num_classes=2`, `pretrain_weights=None`, on a 91-way COCO head), so I read the `args` as roughly right rather than exact. The two files are nearly the same network: across the 464 floating-point tensors they share with the same shape, Nano and Small differ by 0.24% in relative L2 norm, and the largest single-element difference anywhere is 0.010. Two sizes cut from one supernet, each fine-tuned at a tiny learning rate, is what that looks like.

So the margin over D-FINE-N (42.7) is 5.3 points for the mined Nano the paper describes and 5.7 for the checkpoint you download, measured the way the README measures it. The paper's appendix also says fine-tuning after NAS gives "limited benefit for COCO", and +0.4 is limited. The resize flag is worth the same 0.4 in the other direction, so check which resize your deployment uses before comparing it to either table.

## Turning the knobs on released weights

The paper's pitch is that once the supernet is trained you can move along the curve without retraining. The released checkpoints are not the supernet; they are two of its sub-networks after a fine-tune at one setting each. So does the flexibility survive the download?

Four of the five knobs can be turned on a released checkpoint without touching a weight:

- **Resolution** is a `predict(shape=...)` argument; it must be divisible by patch size × windows (32 for N and S).
- **Queries** can be lowered; the config marks only an *increase* as load-breaking.
- **Decoder layers** can be dropped by truncating `transformer.decoder.layers`, which works because every layer was trained with its own loss.
- **Windows** is weight-free. Passing `num_windows=1` or `4` to `RFDETRNano` raises a `PretrainWeightsCompatibilityWarning` that "significant portions of the model" will be "randomly initialised", but every tensor in the loaded state dict is identical to the default model's. The warning is a blanket rule over architecture fields, and for this one it is wrong.

Patch size is the knob the release cannot turn: the patch embedding is a convolution with a fixed kernel, and the package has no path to resample it.

I evaluated each setting on all 5,000 val2017 images, one knob at a time from the default, through `predict()`. I did not time the knob settings; the paper's Figures 4 and 5 below carry TensorRT latency for the same sweeps.

<KnobExplorer />

All of it works, and it works the way the paper says the supernet should. On the released Nano (48.03 at the default, through `predict()`):

- **Decoder layers.** Dropping from two layers to one costs 2.3 AP (45.72); dropping to none, so the boxes are the two-stage encoder proposals with no refinement at all, still gives 44.16. On Small, three layers to two to one goes 52.80, 52.16, 49.51.
- **Queries.** 300 to 200 to 100 goes 48.03, 47.91, 47.37. val2017 has 36,781 annotated objects over 5,000 images, about 7.4 per image, so the last hundred queries buy very little.
- **Resolution.** 320, 384, 448 and 512 pixels give 44.67, 48.03, 50.10 and 51.36. Run at 512, Nano's weights land 1.4 AP under Small's 52.80, with one fewer decoder layer. Small's weights at 640 give 54.84, past the README's Medium (54.7 at 576 pixels with four layers), and that is through `predict()`, which reads low.
- **Windows.** One window per block gives 48.81, *higher* than the released two-window default; four windows gives 46.83. Fewer windows means more global attention: more accurate and slower, the trade the paper's Figure 3 draws.

One comparison says something about the per-size fine-tune. Nano's weights run at Small's resolution with two decoder layers score 51.36; Small's own weights with two decoder layers score 52.16. Same architecture, same resolution, 0.8 AP apart: what Small's own fine-tune at 512 pixels bought.

The paper ran the same decoder-and-query sweep on the Nano *supernet* (its Figure 4), and the shape matches: dropping the 100 lowest-confidence queries costs little, and dropping decoder layers costs more the fewer remain.

<Figure src="https://media.thesatyajit.com/ai/articles/rf-detr/fig4.png?v=05f260ae5cb25e5f" alt="Scatter plot titled Latency and Accuracy While Varying Decoder Layers and Queries. Accuracy mAP 50:95 from 41 to 50 on the vertical axis, latency 2.0 to 2.8 ms on the horizontal. Colours are decoder layers 0 through 6, marker shapes are 50, 100, 200 and 300 queries. Zero decoder layers sit near 43.5 AP at about 2.0 ms. One layer rises from about 42 to 45.3 AP around 2.15 to 2.2 ms. Two layers reach about 48.1 AP at 2.34 ms. Three to six layers climb slowly to about 49.5 AP at 2.85 ms, and 50 queries is consistently the lowest point of each colour."
  caption="The paper's own knob sweep on the Nano supernet: decoder layers 0-6 against 50-300 queries, T4 TensorRT latency. Two layers and 300 queries is about where the released Nano sits (RF-DETR, Figure 4)." />

The resolution knob, swept on the supernet with resolutions it never saw during training marked separately, behaves smoothly too:

<Figure src="https://media.thesatyajit.com/ai/articles/rf-detr/fig5.png?v=d4be3dbc3e87d758" alt="Scatter plot titled Varying Resolution, mAP percent against latency in milliseconds. Blue circles mark resolutions seen in training, 320 to 832 in steps of 64; red stars mark unseen resolutions in between, 352 to 864. The points rise smoothly from about 45.6 mAP at 320 pixels and 2.5 ms to about 57.7 at 864 pixels and 9.9 ms, with seen and unseen points interleaved on one curve."
  caption="Resolution swept on the supernet, including resolutions never sampled in training (red), which fall on the same curve (RF-DETR, Figure 5)." />

<Video
  src="https://ai.satyajit.si/articles/rf-detr/clip3"
  poster="https://media.thesatyajit.com/ai/articles/rf-detr/clip3-poster.jpg?v=da3a0bb18f59184c"
  alt="The dog-on-a-couch photo with boxes for couch, sports ball and dog. A counter reads decoder layers 4, then 2, then 0, and the boxes stay on all three objects as the counter drops; the caption reads that medium still finds all three objects with no decoder layers."
  caption="Dropping decoder layers after training on the Medium model; the boxes survive all the way to zero layers on this image. Video from @AlexBodner_'s post on X."
/>

## Checking the 60 AP claim

The headline: RF-DETR-2XL is the first real-time detector past 60 AP on COCO. The README's benchmark table re-measures every row in SAB with pycocotools over the full 5,000-image val2017, on a T4 with TensorRT, FP16 and batch 1:

| Model | COCO AP50:95 | Latency (ms) | Params | Res | License |
|---|---|---|---|---|---|
| RF-DETR-N | 48.4 | 2.3 | 30.5M | 384 | Apache-2.0 |
| RF-DETR-S | 53.0 | 3.5 | 32.1M | 512 | Apache-2.0 |
| RF-DETR-M | 54.7 | 4.4 | 33.7M | 576 | Apache-2.0 |
| RF-DETR-L | 56.5 | 6.8 | 33.9M | 704 | Apache-2.0 |
| RF-DETR-XL | 58.6 | 11.5 | 126.4M | 700 | PML 1.0 |
| **RF-DETR-2XL** | **60.1** | **17.2** | **126.9M** | **880** | **PML 1.0** |
| D-FINE-X | 59.3 | 11.5 | 62.0M | 640 | Apache-2.0 |
| YOLO26-X | 56.9 | 9.6 | 56.9M | 640 | AGPL-3.0 |

<LatencyFrontier />

At 60.1 AP the 2XL clears 60; D-FINE-X at 59.3 and YOLO26-X at 56.9 do not. The paper's Table 2 reports the 2XL identically, 60.1 AP at 17.2 ms. I did not run the 2XL: it ships in `rfdetr_plus` under PML 1.0, outside what I ran for this page.

Two caveats. XL to 2XL is 1.5 AP for 5.7 ms more at nearly the same parameter count (126.4M to 126.9M), bought with resolution (880 against 700); the 2XL's second window, which on my sweep costs accuracy and saves time, spends some of it back. And the two sizes past 58 are not Apache-licensed: XL and 2XL detection ship in `rfdetr_plus` under PML 1.0, so D-FINE-X (59.3, Apache-2.0) is the model to beat if your lawyers are in the room. Every Seg size (Seg-2XL at 49.9 mask AP) and the keypoint preview (71.8 AP) are Apache-2.0.

<Figure src="https://media.thesatyajit.com/ai/articles/rf-detr/fig3.png?v=77ac6ae1269523bd" alt="Line chart of COCO object detection accuracy, mAP at 50 to 95, against latency in milliseconds. Seven series are plotted: YOLOv8, YOLOv11, D-FINE, RT-DETR, LW-DETR, RF-DETR with a DINOv2-S backbone, and RF-DETR with a DINOv2-B backbone. The two RF-DETR curves form the upper-left frontier, continuous lines rising from about 36 AP at 1.5 milliseconds to just past 60 AP near 18 to 20 milliseconds, sitting above and to the left of every other method across the whole latency range." caption="The accuracy-latency Pareto frontier on COCO detection. RF-DETR's two curves (purple, pink), one per backbone, are continuous because every point on a curve comes from one supernet, and they sit above D-FINE, LW-DETR, RT-DETR and the YOLO families (RF-DETR, Figure 1)." />

## RF100-VL, and the "20×" that compares two runtimes

RF100-VL is Roboflow's 100-dataset benchmark for out-of-distribution detection, and there the comparison is a fine-tuned vision-language detector. In the paper's RF100-VL table GroundingDINO-tiny scores 62.3 AP at 309.9 ms and the fine-tuned 2XL 63.5 AP at 15.6 ms: the abstract's 1.2 AP, and 309.9 / 15.6 = 19.9, so "about 20× faster" is in the data. It is not like-for-like. GroundingDINO's latency is starred because it does not run under TensorRT, so it is PyTorch against TensorRT. What survives is that a 127M-parameter specialist matches a 173M-parameter VLM out of distribution and is deployable in real time. [SAM 3.1's throughput story](/articles/sam-3-1-object-multiplex) and [DART's SAM3-to-detector conversion](/articles/dart-realtime-detection) keep running into the same tension.

## The benchmark harness is half the paper

The paper spends real effort on why detector latency numbers disagree. D-FINE's latency for LW-DETR is 25% faster than LW-DETR's own paper; the authors trace drift like that to GPU power throttling during back-to-back passes and fix it by pausing 200 ms between them. They also show that naive FP16 export can wreck a model (D-FINE fell to 0.5 AP until they moved its ONNX export to opset 17), and their rule is accuracy and latency from the same artifact, in a released harness, SAB. My numbers above break that rule and say so: FP32 PyTorch accuracy, TorchScript FP16 latency on a different GPU. The deployment path is the same glue that decides whether [real-time perception actually runs on the robot](/articles/depth-anything-3-ros2).

## Ship a checkpoint, sweep it, then decide

The released Nano and Small are what the README says: the parameter counts match to the decimal, and the package's evaluator reproduces the README's accuracy within 0.06 AP. The default `predict()` lands 0.2 to 0.4 lower because of one resize flag, which is worth knowing before you compare a deployment against the table. The paper-versus-README gap is the paper's own fine-tuning table, which the downloaded weights match metric for metric, and the checkpoints carry the fine-tune's hyperparameters inside them. A release you can audit this far from its own files is better than most.

The NAS story needs one qualification. The search code is not open, so the 6,468-point grid is something you rent from the Roboflow platform, not something you run. What the open release does give you is checkpoints that still bend: every knob but patch size moves on the downloaded weights, smoothly, and in the direction the paper's figures predict, so a released checkpoint is a small family of models rather than one. If I were shipping one model at several operating points, a nano on a camera and a larger one on a server, I would take an RF-DETR checkpoint and sweep resolution and queries on my own validation set before training anything new. If I needed more than 56.5 AP under Apache-2.0, I would look at D-FINE-X first.

<Callout type="note">
**The run, for anyone repeating it.** `pip install rfdetr==1.11.1` (plus `rfdetr[train]` for the evaluator) with torch 2.7.1+cu126 and transformers 5.20.2 on Python 3.10, official `rf-detr-nano.pth` / `rf-detr-small.pth` (Medium and Large for parameter counts only), one RTX 3090 shared with other jobs. Accuracy, all 5,000 val2017 images: `model.evaluate(split="val", dataset_file="coco", dataset_dir=...)`; and `model.predict(images, threshold=0.0, shape=(r, r))` in batches of 16 with the default top-300 selection, scored with pycocotools, once as shipped and once with its `F.resize` patched to `antialias=True`. Knobs, through `predict()`: resolution via `shape`, queries by setting `num_queries` on the model and its transformer, decoder depth by truncating `transformer.decoder.layers`, windows via the `num_windows` config argument. Latency: `model.inference(dtype=torch.float16)` (TorchScript), CUDA events, batch 1, 50 warm-up passes, median of 300. Everything about XL/2XL, RF100-VL and T4/TensorRT latency is read from the paper and README, not rerun.
</Callout>
