RT-DETR vs YOLO: Choosing a Detector for Production Inspection Pipelines

DETR vs YOLO for inspection lines: profile RT-DETR and YOLO on your target hardware, then weigh NMS, latency, small defects, preprocessing and export.

RT-DETR vs YOLO: Choosing a Detector for Production Inspection Pipelines
Written by TechnoLynx Published on 11 Jul 2026

For an inspection line, the DETR vs YOLO question cannot be settled by GPU benchmark rankings alone. Profile RT-DETR and a current YOLO end to end (decode, preprocessing, inference, post-processing) on the hardware and runtime the line will actually use, then decide on five things: how each handles duplicate suppression, latency on that runtime, behaviour on small defects, fit with your preprocessing, and how cleanly each exports and quantises. The rankings move with the runtime and with the hardware, so a COCO number measured on someone else’s GPU tells you little about your line.

How Do RT-DETR and YOLO Actually Produce Their Detections?

RT-DETR is built from a convolutional backbone, an efficient hybrid encoder that turns multi-scale features into a sequence, a query-selection step that picks a fixed number of encoder features as initial object queries, and a Transformer decoder that refines those queries into classes and boxes. It is trained with bipartite matching to predict a one-to-one set of objects, so nothing needs to suppress overlapping boxes afterwards. A single score threshold filters out low-confidence predictions.

Ultralytics YOLO models have three stages: a backbone that extracts features, a neck that fuses them across scales, and a head that predicts boxes and classes. Earlier YOLOs used one-to-many label assignment and relied on non-maximum suppression (NMS) to remove redundant predictions, which cost some latency in exchange for a good accuracy-speed balance.

In practice the difference shows up in the post-processing. With RT-DETR you set a single score threshold. With an NMS-based YOLO you tune two thresholds, and NMS run time becomes part of your latency budget.

What’s Worth Understanding About Rt-Detr vs YOLO First?

Start with the fact that “NMS-free” no longer separates the two families. YOLOv10 reached NMS-free detection in 2024 through consistent dual assignments during training. YOLO26, released in September 2025, removes NMS with a native end-to-end predictor and also drops Distribution Focal Loss (DFL). In the Ultralytics implementation, YOLO26 trains a one-to-one head alongside the usual one, and setting nms=False at runtime selects it and removes the NMS step. The newer YOLO27 medium and large variants go further and use query-based transformer decoding, so the architectural line is blurring.

Next, treat the headline speed claims with care. The RT-DETR paper reports RT-DETR-R50 and R101 at 53.1% and 54.3% COCO AP and 108 and 74 FPS on a T4 GPU. The same paper points out that YOLO detectors usually report model speed without NMS time, which is why it built its own end-to-end benchmark. The YOLO side has published counter-figures too: the YOLOv10 authors report YOLOv10-S as 1.8 times faster than RT-DETR-R18 at similar COCO AP. Neither number describes your line.

If you work in automotive rather than factory inspection, the same comparison is driven by what a reviewer signs against, which we cover in DETR vs YOLO for automotive perception and its validation pack.

When Does NMS-Free Decoding Beat YOLO’s NMS Pipeline, and When Does It Not?

NMS-free decoding wins when threshold tuning is the problem. NMS uses two thresholds. A higher confidence threshold filters out more boxes and raises false negatives, while a very low one (0.001, for example) leaves many redundant boxes and raises false positives. A higher IoU threshold removes fewer overlapping boxes per round and lets false positives through. A lower one deletes true positives wherever objects overlap or occlude each other. The RT-DETR authors call the confidence threshold easy to set and the IoU threshold hard to set accurately.

NMS can wrongly remove valid detections when objects overlap heavily, and fixes such as Soft-NMS add their own hyperparameters. NMS time also varies with the thresholds you pick, because they change how many boxes reach the IoU step. That makes latency depend on configuration in a way a one-to-one decoder avoids.

NMS-free decoding does not automatically make the pipeline faster. In an aquaculture benchmark, YOLO26n had the lowest post-processing time (0.179 ms) but the highest end-to-end latency in its tier: 11.20 ms against 9.18 ms for YOLOv8n, because its residual overhead was higher. The aquaculture paper notes that dropping NMS particularly benefits CPUs, where the sequential sorting and filtering in NMS costs more than on a GPU. Our reading: NMS-free decoding is a robustness and tuning win first, and only sometimes a latency win, depending on where the rest of the graph spends its time.

Which Is Faster on Edge and High-Frame-Rate Inspection Hardware?

It depends on the runtime as much as the model. A Scientific Reports study benchmarked YOLOv8l and RT-DETR-l on a Jetson Orin NX. YOLOv8l was faster under PyTorch, but under TensorRT the ranking reversed and RT-DETR-l reached the highest throughput of the Jetson configurations tested. The authors explain this by RT-DETR-l gaining more from compiled execution. Once runtime overhead is gone, its lower nominal FLOP count matters more, even though it stays less efficient per GFLOP than YOLOv8l. The same study found YOLOv8l held its accuracy more consistently across runtimes. It also found that none of the large-model configurations reached its 25 FPS real-time target for the full video pipeline.

Change the hardware and the ranking changes again. In the aquaculture study, the inference-speed rankings measured on an A100 did not carry over to a CPU-only Raspberry Pi 5, and the authors note that relying on the GPU numbers would have led to the wrong model choice. On that Pi, YOLO26n was fastest in the nano tier at 7.51 FPS, while in the medium tier the older anchor-based YOLOv5mu beat every newer architecture. FLOPs and parameter counts are poor predictors here, because memory bandwidth, operator support, kernel-launch overhead and compiler behaviour can give models of similar theoretical cost very different real latency.

On CPU-bound edge targets specifically, a 2025 review of the YOLO family judges transformer pipelines less favourable because of their higher computational complexity.

On GPU, RT-DETR’s latency can be tuned without retraining: on a T4 with TensorRT v10.11, Ultralytics reports RT-DETR-L dropping from 8.0 ms to 7.4 ms when the decoder is cut from six layers to four, at a cost of 0.2 mAP.

Small Defects Are Where DETR-Family Detectors Are Weakest

The RT-DETR paper states plainly that its detector shares the limitation of other DETRs: small-object performance is still below that of strong real-time CNN detectors. A neutral review of transformer detectors lists slow training convergence and drops on small objects as DETR’s main challenges, which later designs such as Deformable-DETR and DINO address in part. The same RT-DETR paper does show qualitative examples of small and densely packed objects detected correctly. We read those as examples, not as a measurement that outweighs the authors’ own stated limitation.

YOLO26 adds Small-Target-Aware Label Assignment (STAL) to give tiny, occluded and low-contrast instances enough supervisory signal during training. In the aquaculture study, YOLO26’s ProgLoss and STAL produced no measurable gain for mortality detection in larger fish.

For high-resolution PCB inspection, the bigger lever sat outside the detector. A PCB study found that resizing a full board to a 640 × 640 input shrinks microscopic defects to a few pixels. It also found that matching the training scale to the inference scale mattered more than the choice of architecture: a model trained on resized full images fell to mAP@50 = 0.01 under tile inference, while the same architecture trained on 640 × 640 tiles reached 0.72 and 0.94 on the two datasets. Slicing-aided inference (SAHI) raised AP by 6.8%, 5.1% and 5.3% for three different detectors on aerial datasets, and slicing-aided fine-tuning brought the cumulative gains to between 12.7% and 14.5%. SAHI plugs into any detection pipeline.

How Does Each Detector Fit Behind Classical Preprocessing and ROI Cropping?

In a realistic video pipeline either detector sits between decoding and preprocessing and post-processing. A crop that removes background clutter cuts false positives and shrinks the input. With a fixed input size, that crop also gives small defects more pixels.

The measured preprocessing gains below come from SAM-based industrial detection, not from RT-DETR or YOLO. BioDet added selective low-light enhancement and an open-vocabulary ROI crop in front of SAM-based detection of industrial parts. On the cluttered, poorly lit IPD dataset, AP rose by 13.6 points with FastSAM and 17.3 with SAM, while on the XYZ-IBD bin-picking set the gains were only 2.9 and 1.3. The authors also found that the crop sped up the main detection stage, because that stage processed smaller images. The lesson we take for either family: preprocessing earns its cost on cluttered or badly lit scenes and adds little where imaging is already controlled, so measure it per line rather than assuming it.

Two composition details differ between the families. RT-DETR returns at most as many detections as it has object queries (300 in the Ultralytics pretrained checkpoints), and raising that limit requires retraining. Tiled pipelines still have to merge predictions across tile boundaries, and the PCB study used global NMS for that step even with its training-free merging method. So a tiled pipeline with overlapping tiles needs careful merging of redundant predictions. For a closer look at how a YOLO-family detector sits behind classical stages, see where classical preprocessing still earns its place around YOLO.

How Do You Decide Between Them for a Specific Inspection Workload Rather than by Leaderboard mAP?

Run both on your defect data and your hardware, and compare accuracy and latency together. One published inspection example shows why. On a 599-image dataset of powder-bed 3D printing defects, RT-DETR reached the highest [email protected] (0.563) and recall (0.581), but took 17.9 ms per image against 3.2 ms for YOLOv8 ([email protected] 0.518) and 2.0 ms for YOLOv5. These timings were measured on an RTX 4070 Super at 640 × 640, using GPU inference at batch size 1, and include preprocessing and NMS. Whether that accuracy gain is worth the extra latency depends on whether accuracy or speed is the priority on your line. A benchmark cannot decide that for you.

TechnoLynx profiles RT-DETR and YOLO latency and compute on your target hardware as the first step of a CV pipeline architecture review within its Computer Vision R&D, to choose a detector matched to your per-frame latency budget and recall target. The review also maps what sits in front of the detector, because detector choice depends on that preprocessing context.

The 2025 YOLO review argues that object detection benchmarks should be broken down by object density, occlusion, object size and overlap instead of being reported as one number. Our explainer on how mAP scores object detectors covers what the metric does and does not measure.

Decision Table: RT-DETR or YOLO for an Inspection Line

Axis Leans RT-DETR when Leans YOLO when What to measure on your line
Duplicate suppression Overlapping or touching parts make the NMS IoU threshold unstable, and you are using an NMS-based YOLO You can use an NMS-free YOLO (YOLOv10, YOLO26), which removes the same tuning burden Recall on overlapping instances at your chosen thresholds
Latency on the target runtime A Jetson-class GPU with TensorRT and large variants, where RT-DETR-l overtook YOLOv8l in one study CPU-bound or low-power edge, where transformer pipelines are judged less favourable End-to-end ms per frame, including decode and pre/post-processing
Small defects Defects are moderate in size and recall matters more than speed Defects are tiny, given DETR’s stated small-object limit Recall by defect size; test tiling with training scale matched to inference scale
Preprocessing fit Crops are bounded and the object count per frame stays under the 300-query limit of the pretrained checkpoints Tiled or high-count scenes that need many detections per frame Gain from ROI cropping on your real lighting and clutter
Export and quantisation In one Jetson study RT-DETR-l lost less at FP32-to-INT8 but more at FP32 conversion, and more overall The target is an NPU such as Hailo-8 or Edge TPU Accuracy after conversion and after INT8, measured separately

Use the table as an order of questions, not a scorecard. One hard constraint, such as an NPU that cannot compile a transformer, settles the choice regardless of the other rows.

What Changes Between a Prototype Detector and Production Code?

The export step is where the two families hit different constraints.

On the YOLO side, the defaults matter. In Ultralytics export, nms=None (the default) writes raw one-to-many predictions that expect external NMS. nms=True embeds NMS where the format supports it, and nms=False selects the NMS-free head where one exists, with unsupported formats falling back to their native output. A YOLO26 model exported with defaults is therefore not running NMS-free unless you ask for it, and downstream code has to expect the exported output format. With reg_max: 1, YOLO26’s head regresses coordinates directly and no DFL operation appears in the exported ONNX graph. Static exports pad inputs to the full image size rather than the default minimum-rectangle padding, so detections close to the confidence threshold can differ.

On the RT-DETR side, operator support limited deployment on NPUs. The Scientific Reports study could not deploy RT-DETR on the Edge TPU or Hailo-8 because of conversion and operator-support limits. The Hailo compiler is optimised for the static graphs typical of CNNs and could not map the transformer’s attention onto the NPU. RT-DETR’s deformable attention relies on grid_sample, and RT-DETRv2 introduced an optional discrete sampling operator to replace it and remove that deployment constraint. The YOLO26 paper’s authors also state that RT-DETRv3 shows sharp accuracy drops under INT8 because attention is sensitive to reduced precision. That is a claim made in a YOLO paper about a rival, and it deserves checking on your own model. The Jetson study adds a nuance: RT-DETR-l lost more accuracy in the PyTorch-to-TensorRT FP32 conversion, while YOLOv8l lost more in the FP32-to-INT8 step, so a single “quantisation loss” figure mixes two effects.

INT8 trades accuracy for speed, as YOLO12 tests show. On an RTX 2070, static TensorRT INT8 ran YOLO12n in 2.6 ms against 3.8 ms in FP32, with mAP50-95 drops ranging from 0.031 (YOLO12x) to 0.072 (YOLO12n). Under low and medium noise, the static INT8 models were also more sensitive than FP32. A camera with a noisy sensor is a reason to calibrate and validate on line images, not COCO. Ultralytics itself warns that quantisation results vary by dataset, format and TensorRT version, and tells you to measure your own.

Data volume changes too. In the aquaculture study, YOLO26 nano and small models needed about 2.5 times as many annotated images as YOLOv8 to pass 90% mAP50. Keeping a detector healthy after it ships is a separate discipline, covered in the artefacts that keep a line-side inspection model running.

FAQ

What Is YOLO Object Detection?

YOLO is a family of real-time detectors. Ultralytics YOLO models are built from a backbone that extracts features, a neck that fuses them across scales, and a head that predicts boxes and classes. Most versions remove duplicate boxes with NMS, while YOLOv10 and YOLO26 can run without it.

How Accurate Is YOLO Object Detection?

It depends on the model size and the data. On COCO, the YOLO26 sizes span 40.9 to 57.5 mAP. On a 3D-printing defect dataset, YOLOv8 reached 0.518 [email protected]. With the full dataset, the aquaculture study found mAP50 for mortality detection varied by only 1.04 points across twelve YOLO variants.