Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

DETRs Beat YOLOs on Real-time Object Detection

RT-DETR shows a DETR-style detector can beat YOLO in speed and accuracy

  • Problem YOLO detectors need NMS, whose run time and threshold tuning slow them and make them unstable. DETR-style detectors skip NMS but their encoder is too heavy for real-time use.
  • Method RT-DETR splits the encoder into attention and convolutional fusion.
  • Results RT-DETR-R50 reaches 53.1% AP at 108 FPS on COCO val2017 on a T4 GPU, beating previously advanced YOLO detectors in both speed and accuracy.

Why NMS limits real-time YOLO detectors

YOLO detectors are the usual choice for real-time object detection, and most of them finish with Non-Maximum Suppression, which removes overlapping boxes. The cost of NMS depends on how many boxes it has to compare and on two thresholds, a confidence threshold and an IoU threshold. Because the best thresholds shift with whether a use case favours recall or accuracy, tuning them adds a practical burden and makes both speed and accuracy less stable.

DETR-style detectors avoid this step: they predict a one-to-one set of objects with bipartite matching, so no hand-crafted anchors or NMS are needed. Their computation is heavy, though, and that keeps them from meeting real-time needs, so dropping NMS brings them no speed advantage. The central question of the paper is therefore whether a DETR-style model can be made fast enough for real time while still beating the advanced YOLO detectors in both speed and accuracy.

The authors locate the main DETR cost in the encoder. Multi-scale features help training converge, but they lengthen the sequence passed to the encoder, which makes the Transformer encoder the computational bottleneck. On the query side, the existing query selection ranks encoder features by classification score alone, which can pass along features whose boxes are poorly localized.

Measuring the cost of NMS settings

To test how NMS settings affect run time, the authors count the boxes that survive a confidence filter for YOLOv5 and YOLOv8 at confidence thresholds from 0.001 to 0.25. The more permissive the threshold, the more boxes reach the IoU stage, so the IoU comparisons grow.

With the IoU threshold held at 0.7, YOLOv8 AP drops from 52.9 at confidence threshold 0.001 to 51.2 at 0.05, while its NMS time falls from 2.36 ms to 1.06 ms. So the NMS time depends on both thresholds, and the setting that gives the best accuracy can also carry a larger NMS cost.

These timings come from a T4 GPU with TensorRT FP16, and they cover only the EfficientNMS kernel, not the other kernels of the NMS plugin. The authors point out that the speed figures usually reported for YOLO leave out NMS time, so they understate end-to-end latency.

The end-to-end speed benchmark follows from this. It averages inference time over the images of COCO val2017, uses the NMS thresholds that match each detector's reported accuracy, and excludes I/O and memory copy operations. Applied to the anchor-based YOLOv5 and YOLOv7 and the anchor-free PP-YOLOE, YOLOv6 and YOLOv8, it shows anchor-free detectors needing less NMS time at equal accuracy.

The authors attribute this to anchor-based detectors producing about three times more prediction boxes in the tested set.

How the hybrid encoder splits the work

The encoder takes the features of the last three backbone stages, S3, S4 and S5, and turns them into a sequence of image features. Before redesigning it, the authors built a family of variants on DINO-Deformable-R50, starting from variant A with the multi-scale Transformer encoder removed. Their reasoning is that high-level features already carry semantic information derived from lower levels, so attention across all concatenated scales repeats work.

The resulting hybrid encoder splits the job into two parts. AIFI runs a single-scale Transformer encoder only on S5, which the authors chose because self-attention on high-level features captures relations between semantic concepts. CCFF handles cross-scale fusion with convolutional blocks in a PANet-style path, so intra-scale attention and cross-scale fusion are no longer computed together.

The authors say lower-level intra-scale attention is unnecessary, because those features lack semantic concepts and would duplicate the high-level interaction.

Each CCFF fusion block has two 1x1 convolutions that adjust channel counts, N RepBlocks built from RepConv that fuse the features, and an element-wise add that combines the two paths. The encoder is written as follows, where Flatten turns S5 into a token sequence and Reshape restores it to the shape of S5. Only the refined S5 enters the fusion with S3 and S4, and the output O is the set of encoder features that the query selection later draws from.

Which encoder changes pay off

Table 3 reports AP, parameter count and latency for variants A to E, together with DS5, which keeps intra-scale attention only on S5 within variant D. Adding a single-scale encoder to A, which gives variant B, raises AP from 43.0 to 44.9 and latency from 7.2 ms to 11.1 ms. The authors read the gain as evidence that intra-scale interaction matters, and the 54% latency increase as the cost of the single-scale encoder.

Variant C adds cross-scale fusion around the multi-scale encoder, giving 45.6 AP at 13.3 ms, 0.7 AP above B. Variant D decouples the intra-scale and cross-scale work and reaches 46.4 AP at 12.2 ms, 0.8 AP above C with 8% lower latency. Keeping intra-scale attention only on S5 in DS5 cuts latency from 12.2 ms to 7.9 ms, 35% below D, while AP rises by 0.4 to 46.8.

Compared with D, E gains 1.5 AP, adds about 20% parameters, and cuts latency by 24%, which the authors take as a better trade-off between speed and accuracy. All these variants start from DINO-Deformable-R50 and report AP under the 1x configuration, so the rows compare encoder designs on a shared base rather than the final RT-DETR results.

The uncertainty term in query selection

Earlier DETR variants take the highest-scoring encoder features as initial object queries, and they score features by confidence. The authors argue that a useful feature must be right about both category and location, so ranking by classification alone can let poorly localized features become queries.

The authors define the feature uncertainty as the gap between the localization distribution P and the classification distribution C of an encoder feature, and they treat it as epistemic uncertainty. \[ U(\hat X) = \lVert P(\hat X) - C(\hat X) \rVert, \quad \hat X \in \mathbb{R}^{D} \] Here \(\hat X\) is an encoder feature in a D-dimensional space, and P and C are the predicted distributions it yields.

The uncertainty is placed in the training loss, \[ L(\hat X, \hat Y, Y) = L_{box}(\hat b, b) + L_{cls}(U(\hat X), \hat c, c) \] where the box term acts on the predicted box and the classification term takes the uncertainty as an argument. The uncertainty enters through the loss used for gradient-based optimization, so it shapes what the encoder learns rather than appearing as a separate input at selection time.

The comparison describes the baseline selection as taking the top 300 encoder features by classification score as content queries, with the boxes of those features as initial position queries. Under the 1x configuration on RT-DETR-R50, the uncertainty-minimal scheme raises the share of features with classification score above 0.5 from 0.35 to 0.82, and the share with both scores above 0.5 from 0.30 to 0.67.

Accuracy rises from 47.9 to 48.7 AP on COCO val2017 with the same setup.

Trading decoder layers for speed

Table 5 reports AP and latency per decoder layer index for RT-DETR-R50 trained with 6x configuration. With the detector that has 6 decoder layers, stopping at the 5th layer gives 53.0 AP instead of 53.1 AP and lowers latency from 9.3 ms to 8.8 ms.

The authors observe that the accuracy difference between neighbouring layers shrinks as the layer index grows, so late layers contribute less. Latency per layer index ranges from 9.6 ms at layer 7 down to 7.0 ms at layer 1.

The authors report the 6-layer setting as the most accurate in this table and treat the number of decoder layers as a run-time setting.

Accuracy and speed against YOLO and DETR baselines

Table 2 compares RT-DETR with YOLO detectors and DETRs. RT-DETR and the YOLO detectors use a 640 by 640 input, while the other DETRs use 800 by 1333. FPS is measured on a T4 GPU with TensorRT FP16, and the YOLO detectors use their official pre-trained models under the end-to-end benchmark. RT-DETR-R50 reaches 53.1% AP at 108 FPS, and RT-DETR-R101 reaches 54.3% AP at 74 FPS.

Against YOLOv5-L, which has 49.0 AP and 54 FPS in Table 2, RT-DETR-R50 is 4.1 AP higher and runs at 100.0% higher FPS. Against YOLOv8-L, which has 52.9 AP and 71 FPS, RT-DETR-R50 is 0.2 AP higher and 52.1% faster. Against the X models, RT-DETR-R101 is 1.4 AP above YOLOv7-X (52.9 AP, 45 FPS) and 0.4 AP above YOLOv8-X (53.9 AP, 50 FPS), with 64.4% and 48.0% higher FPS respectively.

RT-DETR-R50 is 2.2% AP higher and about 21 times faster in this comparison.

Objects365 pre-training as a separate setting

The authors pre-train RT-DETR on Objects365 and then fine-tune it on COCO. After this procedure RT-DETR-R50 reaches 55.3% AP and RT-DETR-R101 reaches 56.2% AP. Their COCO-only results are 53.1% and 54.3% AP, so the pre-trained numbers are higher on the same COCO metric. This is a separate setting from the COCO-only models, so the difference should be read as a comparison between two training recipes.

Limits on small objects and tested scope

The authors name one shortcoming: like other DETRs, RT-DETR performs worse on small objects than the strongest real-time detectors. The authors leave closing this gap to future work.

The speed evidence comes from one setup, a T4 GPU with TensorRT FP16, and the YOLO comparisons rely on the authors' end-to-end benchmark. The ablations are trained under the 1x configuration, while the final detectors use the 6x configuration, so ablation numbers are not the final results. Other DETRs in Table 2 have no speed measurement, so the speed comparison with DETRs is supported only by the DINO-Deformable-DETR comparison.

The discussion suggests that the decoder's similarity to other DETRs could make it possible to distill a lightweight RT-DETR from large pre-trained DETR models, but the paper does not test this.

Paper info

Authors
Yian Zhao, Wenyu Lv, Shangliang Xu, Jinman Wei, Guanzhong Wang, Qingqing Dang, Yi Liu, Jie Chen
Venue
arXiv · Preprint
First published
2023-4-17
Added
2026-11-11
Updated
2024-4-3
Version
v3
arXiv
2304.08069
Category
cs.CV
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Yian Zhao, Wenyu Lv, Shangliang Xu, Jinman Wei, Guanzhong Wang, Qingqing Dang, Yi Liu, Jie Chen (2023). DETRs Beat YOLOs on Real-time Object Detection. arXiv:2304.08069v3. https://arxiv.org/abs/2304.08069v3

BibTeX
@misc{zhao2023detrs,
  title = {{DETRs Beat YOLOs on Real-time Object Detection}},
  author = {Yian Zhao and Wenyu Lv and Shangliang Xu and Jinman Wei and Guanzhong Wang and Qingqing Dang and Yi Liu and Jie Chen},
  year = {2023},
  eprint = {2304.08069},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.08069v3}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up