Topic · Tasks

Object detection

Everything on this site about object detection, in the order to read it: a page is listed after the pages it builds on. The figures below are the ones those pages use to explain it; each is live: move a slider and it recomputes.

In reading order

  1. Read
  2. Read
  3. Read
  4. Paper
  5. Paper
  6. Paper
  7. Paper
  8. Paper
  9. Paper
  10. Paper
  11. Paper
  12. Project
  13. Read
  14. Paper
  15. Paper
  16. Paper
  17. Paper
  18. Paper
  19. Paper
  20. Paper
  21. Paper
  22. Paper
  23. Paper
  24. Paper · read first: Object Segmentation
  25. Project
  26. Project
  27. Project
  28. Project
  29. Project

The figures these pages use

Pulled from the pages above. Move a slider and the figure recomputes, exactly as on its page.

From Object Detection — A Quick Read › Literature Survey

1.0
MSE, MAE and Huber loss. Huber follows the squared loss near zero and the absolute loss far from it, so one large error cannot dominate.

From Object Detection — A Quick Read › Literature Survey

0.5
Cross-entropy for y = 1 and y = 0. Left: a foreground example. Right: a background example. Even a confident, correct prediction still carries some loss.

From Object Detection — A Quick Read › Literature Survey

121.0
Intersection over Union. The dashed box is the ground truth, the solid box is the prediction, and the shaded area is their overlap.

From YOLOv4 — Version 0: Introduction › 3. Performance Optimizations

100050
Cosine annealing with burn-in. The rate climbs through the burn-in, then follows half a cosine down to its floor.

From YOLOv4 — Version 2: Bag of Specials › 1. Mish Activation

-1.0
Graph of the ReLU function. ReLU is a ramp that starts at 0. Left of 0 both the output and the slope are zero.

From YOLOv4 — Version 2: Bag of Specials › 1. Mish Activation

-1.2
Graph of the Mish function. Mish dips a little below zero for negative inputs instead of cutting them off, then follows the input.

From YOLOv4 — Version 2: Bag of Specials › 1. Mish Activation

-1.0
Mish against ReLU and Swish. Mish is smooth everywhere and lets small negative values through instead of cutting them to zero.

From YOLOv4 — Version 2: Bag of Specials › 2. CSP(Cross Stage Partial Connections)

166
What each dense layer reads. Input channels seen by each layer of a dense block. The same early channels (and their gradients) are reused by every later layer, which is the duplication CSP removes.

From YOLOv4 — Version 2: Bag of Specials › 6. DIoU NMS⁹

140.5
Keep or suppress, by DIoU. The dashed box M is the one already kept. Slide the candidate Bᵢ across it: ordinary NMS looks only at IoU, DIoU-NMS also asks how far apart the centres are.

From Understanding Focal Loss —A Quick Read › Focal Loss

0.8
From p to p_t. Whatever the label, p_t is 'how right the model was'. A large p_t is an easy example.

From Understanding Focal Loss —A Quick Read › Focal Loss

0.25
α-balanced cross-entropy. α scales the foreground curve and 1 − α the background curve. It changes how much each class counts, not which examples are hard.

From Understanding Focal Loss —A Quick Read › Focal Loss

2.0
The modulating factor (1 − p_t)^γ. γ = 0 is plain cross-entropy. As γ grows, everything to the right of p_t ≈ 0.5 is pushed towards zero.

From Understanding Focal Loss —A Quick Read › Focal Loss

4.00.25
Focal loss for y = 1 and y = 0. Left: a foreground example. Right: a background example. A larger γ flattens the side where the model is already right.

From Understanding Focal Loss —A Quick Read › Focal Loss

2.00.25
Focal loss and cross-entropy. Loss for a positive example as the model grows confident. The dashed line is cross-entropy.

From DETR — Detection as Set Prediction, No Anchors and No NMS › 3. Bipartite Matching

10.0
The cost matrix the matcher sees. Rows are the three objects, columns are 8 of the 100 slots; darker is cheaper, the outlined cells are the chosen assignment. Raise the class weight and the matcher starts trusting what a slot believes over where its box is; slide slot 4 across the image and watch it steal an object.

From DETR — Detection as Set Prediction, No Anchors and No NMS › 4. The Set Loss

0.01.0
ℓ1 and GIoU as the box slides away. The prediction keeps the ground truth's shape and slides along x. The dotted line is where the overlap reaches zero: plain IoU loss goes flat there, GIoU keeps rising because the empty part of the enclosing box keeps growing. Push dy or the scale and the overlap vanishes sooner.

From RT-DETR — DETRs Beat YOLOs, Encoder by Encoder

1 / 5 · v11 / 8 · whole pipeline
One pipeline, five versions. The RT-DETR pipeline for a 640 × 640 image, block by block. Step through the stages to see each block's output shape; switch the version to see which blocks it changes (rust outline), and switch to training to see the dashed parts that exist only while the model learns and are removed at inference.

From RT-DETR — DETRs Beat YOLOs, Encoder by Encoder › 1. What NMS Costs

1 / 6 · 0.0013 / 4 · 0.7
How many boxes NMS has to sort. Boxes that survive the confidence threshold on one image and go into NMS. The lower the threshold, the more boxes, the more time, and the better the AP. The last bar is RT-DETR, which has no NMS stage at all.

From RT-DETR — DETRs Beat YOLOs, Encoder by Encoder › 2. Why DETRs Were Slow

6406 / 6 · E
Where the encoder spends its attention. Counts: how many attention scores one encoder layer computes as the input grows, if every token of the three maps attended to every other, if each map attended only to itself, or if only the 20 × 20 map did (AIFI); the rust line is what a deformable encoder samples instead. These are counts, not time. Measured: the paper's own walk from variant A to E, AP against latency.

From RT-DETR — DETRs Beat YOLOs, Encoder by Encoder › 4. Query Selection: 300 Hands Up

0.80.752
Toy: picking the top K
060
A class score that knows how good its box is. The training target: for a matched position the loss is lowest when the class score p equals the IoU q of its box (left); for every other class it is pushed toward 0, gently near 0 (right). Picking the top K, a toy: made-up positions, picked by score; the more the score tracks the IoU, the more of the picks have good boxes.

From RT-DETR — DETRs Beat YOLOs, Encoder by Encoder › 5. The Decoder

(0.42, 0.5)0.30.362 / 3 · S4 · 40 × 400
Where one query reads. One query's box and the 32 points its 8 heads read on one map, where they start before training: four per head, from the centre out to the box's edge. Drag the centre, resize the box, switch the map: the points move with the box, and the shaded cells are the only ones this query reads. The layer slider refines the box toward a toy target with made-up offsets.

From RT-DETR — DETRs Beat YOLOs, Encoder by Encoder › 5. The Decoder

3 / 7 · R50, 6 layers6
Dropping decoder layers at inference. Train once with k decoder layers, then read the boxes after an earlier layer and skip the rest. Left: AP for the layer you stop at; right: latency. The scaled models are separate networks from the paper's appendix.

From RT-DETRv2 — A Bag of Freebies for the Decoder › 2. Points per Scale

(0.45, 0.4)
Point budget
4441 / 5 · S (R18)
Reading between cells. A toy 6 × 6 feature map. Drag the rust point: the bilinear read mixes the four cells around it with the weights shown, and the blue arrow is the way its slope pushes the point during training. Switch to the nearest-cell read: one cell, weight 1, and along the row the value becomes a staircase whose slope is 0, so the offsets get no signal. The point-budget sliders count the sampling points per image; Table 3 of the paper measured only equal counts, on the S model.

From RT-DETRv2 — A Bag of Freebies for the Decoder › 6. Results

5 / 5 · the RT-DETR line1 / 4 · v1
Which families to show
Speed against accuracy, one table at a time. Latency on a T4 GPU against COCO val2017 AP, as each paper reports it. Step through the tables: every view is one paper's own comparison, because the papers time the same models differently. Dotted verticals join two models that run the same network at the same cost.

From RT-DETRv3 — More Positives Without Paying at Inference › 1. What One-to-One Matching Leaves on the Table

100
Positives per object, four ways. A toy picture with three objects (rust) and 40 queries (grey dots). Start from plain one-to-one matching, switch on query groups, the one-to-many set and the CNN head, and count how many predictions each object trains as positive. Toy data: the boxes, scores and the shaking of the extra groups are made up; the counting rules follow the paper and the released configuration.

From RT-DETRv3 — More Positives Without Paying at Inference › 3. Perturbed Query Groups

0.141
Who may look at whom. The self-attention mask of the decoder in training, shrunk to a few queries per group. Row = the query that looks, column = the query it may look at. Blue: allowed; grey: denoising queries; rust dot: a link removed at random in a perturbed group. Move the drop rate or draw again: only the perturbed groups change.

From RT-DETRv3 — More Positives Without Paying at Inference › 6. Results

What each part buys. The paper's own ablations as gains in AP over the baseline it names. Parts: one part at a time, then all three together. Groups: how many perturbed query groups. Schedules: v3 against v1 (and v2) per backbone and number of epochs.

From RT-DETRv4 — Borrowing a Foundation Model's Eyes › 3. The Deep Semantic Injector

1
Matching the direction, not the length. Toy vectors in two dimensions; the real ones have 768 numbers at each of 400 cells. Drag the blue student's tip, then move the length slider: the cosine loss does not change at all, the squared error does. The arrows at the tip show which way each loss pushes (their sizes are in the tiles).

From RT-DETRv4 — Borrowing a Foundation Model's Eyes › 4. Gradient-guided Adaptive Modulation

8 / 11 · λ = 200
Fixed λ against the adaptive one. Each dot is one training run of DEIM-L with the alignment loss at a fixed weight λ (Tab. 7 of the paper; the λ axis is logarithmic). The two horizontal lines are the run without a teacher and the run with GAM. The shaded band is every λ that GAM used in the released RT-DETRv4-L training log; play the epochs to see where it was. Single runs: the paper reports no spread.

From RT-DETRv4 — Borrowing a Foundation Model's Eyes › 4. Gradient-guided Adaptive Modulation

0
for the rule by hand
1.53
Keeping AIFI's share of the gradient in a band. The released training log of RT-DETRv4-L, one point per epoch. The first chart is the share of the whole gradient that reaches AIFI, with the target band; the second is the weight λ on the alignment loss in force that epoch. Play the epochs and watch λ climb whenever the share falls below the band. Switch to "the rule by hand" to set the share yourself and compare the paper's rule with the released code's.

From Mamba in RT-DETRv4 — What Could Make It Faster › 2. The Core Fact: AIFI Is Already Cheap

3 / 7 · VMamba-T stage 3224
RT-DETRv4 only
Tokens, cost and MambaOut's line. Multiply-adds, not time, on a log scale: one token mixer (or one whole block, with its feed-forward layer) at each place, for VMamba's scan, global attention and 7 × 7 windows. The shaded places are the ones MambaOut would call long, L > 6D, its line for a block with a feed-forward layer of 4D. My count; for the whole VMamba-T it lands within 1 % of the paper's.

From Mamba in RT-DETRv4 — What Could Make It Faster › 4. What We Can Do, Ranked

1 / 6 · as deployed1 / 4 · S
Where a scan could save time. My placements, not measured on RT-DETRv4. Costs are my multiply-add counts at 640 × 640: what each change adds (+) or saves (−), next to the nearest timing someone published. Start at "as deployed" to see where the encoder's work goes; the dashed parts exist only in training, and F5 is the map the teacher is aligned to.

From IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time › 3. Why ℓ1, ℓ2 and Smooth-ℓ1 Disagree with IoU

0
Same corner distance, different IoU. The dashed rust square is the ground truth. The blue prediction keeps its top-left corner exact; its bottom-right corner rides the faint circle, always 2 units from the true corner, so the ℓ2 distance of the corners never changes. Watch IoU and GIoU swing anyway. Try this: press play, or drag the blue corner round the circle; then switch to × 10 and see ℓ2 jump while IoU and GIoU stay put.

From IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time › 4. The IoU Loss — UnitBox's −ln IoU and the Plain 1 − IoU

The classic five box losses on two boxes you drag. The dashed box is the ground truth, the solid one the prediction. Drag a centre to move a box, its bottom-right corner to resize it, and pick a loss. The small plot slides the prediction along the line through both centres. Try this: pull the prediction clear of the ground truth with 1 − IoU picked, and watch the loss sit at 1.0000 wherever you leave it.

From IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time › 7. CIoU — Add the Aspect Ratio

12
CIoU's aspect-ratio term, with the two choices of α. The dashed box is the ground truth (2 × 1), the solid one the prediction, both on the same centre. Change the prediction's width and height with the sliders or by dragging its right and bottom edges. Try this: turn on the journal α at the crossed box and the aspect term vanishes; then set the width and the height to 1.5 (IoU 0.5455) and it comes back.

From IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time › 9. 2021–2022: Width and Height, Powers, and Angles

1 / 13 · EIoU
The 2021–2025 box losses on two boxes you drag. Same boxes and handles as the classic five: drag a centre to move a box, its bottom-right corner to resize it, and step through the losses. Each one runs at its default (the paper's, or the released code's where the paper gives none), named under its value. Try this: pick Focal-EIoU and pull the prediction clear of the ground truth; the loss drops to 0.0000.

From IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time › 9. 2021–2022: Width and Height, Powers, and Angles

1 / 5 · α-IoU0.9
α-IoU
3
Focal-EIoU
0.5
WIoU v3
1.931
PIoU v2
1.30.61
Focaler-IoU
00.95
Which boxes get the gradient: five re-weightings. Step through the five curves. Each has its own folded panel of knobs (α-IoU, Focal-EIoU, WIoU v3, PIoU v2, Focaler-IoU); the IoU slider places the marker for α-IoU, Focal-EIoU and Focaler-IoU, β and P place it for the other two. Try this: on α-IoU, slide α from 1 to 3 and watch the gradient move from poor boxes to good ones.

From IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time › 10. 2023–2024: Weights, Corners and Helper Boxes

0.85
Inner-IoU's helper boxes: where the gradient goes. Two boxes 10 units wide, their centres s apart, and the helper boxes Inner-IoU scores instead (dashed grey). The plot is how steeply the helper IoU changes with s, for ratio 0.8, 1 (the real boxes), 1.2 and yours. Try this: play the offset and watch the 0.8 curve drop to 0 at s = 8, where the real boxes still overlap.

From IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time › 12. IoU Beyond the Axis-Aligned Box

8301
Tiny boxes and turned boxes: where IoU needs help. Tiny objects: the dashed square is the ground truth, the solid one the same square shifted by 2 px right and 2 px down; change its side. Rotated boxes: the solid box is the dashed one turned about its centre, and the ellipses are the Gaussians each box becomes. Try this: turn a square and watch ProbIoU stay at 1.0000, then stretch the box.

From IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time › 12. IoU Beyond the Axis-Aligned Box

5.3
A box side as a distribution over bins. Each bar is the predicted probability of one bin; the side is read off as their average, weighted by the bars. The dashed line is the true distance, the dot the value the bars decode to. Try this: switch to the D-FINE bins and see how they crowd around zero, or drag the dashed line.

From IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time › 14. Which One Should You Use?

Every box loss on the pair you drag. One row per loss, in the read's order: its value on these boxes and what one gradient step does to the blue prediction. Steps follow each loss's formula (PIoU's as in its authors' code), holding fixed CIoU's α (as its released code), Focal-EIoU's weight (our choice), WIoU's enclosing box (its paper). Try this: pull the blue box clear of the dashed one and count the rows that say "no signal".

From CenterNet: Objects as Points — A Comprehensive Guide › 2. Proposed Algorithm

1.6
A keypoint heatmap. Darker cells are closer to 1. Training treats the centre as the positive and softens the penalty around it.

From CenterNet: Objects as Points — A Comprehensive Guide › 2. Proposed Algorithm

0.64.0
Loss at one heatmap cell. Left: the centre cell wants Ŷ → 1. Right: a neighbouring cell wants Ŷ → 0, but the penalty shrinks as its Gaussian value Y approaches 1.

From CenterNet: Objects as Points — A Comprehensive Guide › 2. Proposed Algorithm

4
The rounding error the offset head recovers. Left: the fraction lost when a pixel coordinate is mapped to the low-resolution map. Right: the L1 loss on it is flat-sloped, so every error counts the same.

From CenterNet: Objects as Points — A Comprehensive Guide › 2. Proposed Algorithm

0.11.0
Weighting the three losses. Raw losses (left of each pair) and what each contributes to L_det after weighting. The paper uses λ_size = 0.1 and λ_off = 1.

From DetectoRS — A Comprehensive Review › Proposed Workflow

800
Resolution at each pyramid level. Side of the feature map at each level for the chosen input. f_i mixes the coarse, semantic map from above with the fine map x_i beside it.

From DetectoRS — A Comprehensive Review › Proposed Workflow

2
Cost of unrolling the pyramid T times. Backbone and FPN passes per image for each T. With shared weights the parameters stay the same; only compute grows.

From DetectoRS — A Comprehensive Review › Proposed Workflow

0.5
What one SAC output looks at. The nine weights land on the centre 3×3 (rate 1) and on the 7×7 corners and edges (rate 3). S decides how much of each.

From DetectoRS — A Comprehensive Review › Proposed Workflow

3
Atrous convolution. Filled cells are the nine pixels a 3×3 kernel reads at this rate. The outlined cell is the centre.

From RT-DETR-World — Naming Any Object in Real Time › 1. Open Vocabulary: the Classifier Becomes a List of Names

322
The classifier is a list of names. Toy vectors. Each rust arrow is one name the user typed, the blue arrow is one object query, and the list ranks the names by cosine. Turn the query; then add “wheelchair”: one new vector joins the list, no other number moves, and the top answer can change. “Wheelchair” sits between chair and wheel only for the picture.

From RT-DETR-World — Naming Any Object in Real Time › 6. Relation-Aware Negative Relaxation

0.250.80.07
Relaxing a related negative. One anchor from a toy batch: a red double-decker bus. The hollow bar is how hard the loss pulls toward its own description; the solid bars, how hard it pushes on each wrong one. Raise α and the city bus, which the teacher calls related, is pushed less; the spoon and the cat keep their full weight. At α = 0 this is the standard contrastive loss.

From RT-DETR-World — Naming Any Object in Real Time › 8. Results

1 / 6 · Fixed AP
Fixed AP, standard AP, speed. Solid bars are RT-DETR-World, hollow bars the real-time detectors it is compared with (YW = YOLO-World-v2.1, YE = YOLOE-v8, OD = OV-DEIM, W = RT-DETR-World). Switch between the two kinds of AP: the lead holds in Fixed AP, not in standard AP at every size. The last two views are the ablation of the supervision (Table 5).

Tags that go with it

Training recipes 7Feature pyramids and necks 5Loss functions 5Edge deployment 4Set prediction 4Backbone design 3Data augmentation 3Efficient networks 3