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. Paper
  13. Paper
  14. Paper
  15. Paper
  16. Paper
  17. Paper
  18. Paper · read first: Object Segmentation
  19. Paper
  20. Paper
  21. Paper
  22. Paper
  23. Project
  24. Project
  25. Project
  26. Project
  27. Project
  28. 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_i 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 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 — 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 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 4Set prediction 4Backbone design 3Data augmentation 3Edge deployment 3Datasets and labelling 2