IoU Losses — From 1 − IoU to the 2026 Variants, One Box at a Time
Summary
Every IoU-based box loss a detector engineer meets, worked out on the same pairs of boxes: why ℓ1 disagrees with IoU, the IoU loss and its flat spot, GIoU, DIoU, CIoU, the 2021–2024 family (EIoU, α-IoU, SIoU, WIoU, MPDIoU, Inner-, Shape-, Focaler-IoU, PIoU), the 2025–2026 work, rotated and tiny boxes, and what today's detectors actually train with. After this read you can compute any of them by hand, say what each one fixes, and pick one for your detector with the evidence in front of you.
Table of Contents
- 1. The Notation, Once2
- 2. IoU, the Number Benchmarks Score You On2
- 3. Why ℓ1, ℓ2 and Smooth-ℓ1 Disagree with IoU3
- 4. The IoU Loss — UnitBox's −ln IoU and the Plain 1 − IoU3
- 5. GIoU — Charge for the Empty Space4
- 6. DIoU — Pull the Centres Together5
- 7. CIoU — Add the Aspect Ratio6
- 8. DIoU-NMS, Briefly6
- 9. 2021–2022: Width and Height, Powers, and Angles7
- 10. 2023–2024: Weights, Corners and Helper Boxes9
- 11. 2025–2026: Back to Pure IoU, and Beyond Boxes11
- 12. IoU Beyond the Axis-Aligned Box12
- 13. What Today's Detectors Actually Train With13
- 14. Which One Should You Use?14
- 15. Conclusion14
- 16. References14
- 17. Connections14
Benchmarks score a detector's boxes by IoU, their overlap with the ground truth [EVER10, LIN14]. Yet for years boxes were trained with ℓ1-style losses on four separate coordinates [GIRS15, REN15], and the same ℓn distance can hide very different IoUs [REZA19].
Picture a sticker laid over a printed square.
- ℓ1 asks: how far is each of the four edges from its printed edge? Four numbers, each judged alone. UnitBox, the first IoU-loss paper, makes the same complaint about ℓ2: it treats the four bounds as independent variables [YU16] (§4).
- IoU asks: how much do sticker and square share, out of everything either one covers? One number for the whole box.
- They disagree. Slide the sticker 3 mm off a 3 mm square and it covers nothing; 3 mm off a page-sized square, it still covers almost all. ℓ1 on raw coordinates scores both the same (§3.1 has the patch).
This read is about making the second question trainable. The main losses in it:
Brush up ;) IoU, NMS and the ℓ1 / ℓ2 / Huber losses in Object Detection — A Quick Read; GIoU in a matching cost in DETR — Detection as Set Prediction, No Anchors and No NMS.
NOTE: "Worked numbers" are my arithmetic on this read's boxes; a paper's number always comes with its table.
1. The Notation, Once
Every paper picks its own letters; let's fix them once.
- is the prediction (the sticker), the ground truth (the printed square).
- Almost every loss here is 1 − IoU plus a penalty, which DIoU's paper writes as [ZHEN19]; most of what follows argues about .
| Symbol | Meaning | Note |
|---|---|---|
| , | predicted box, ground-truth box | corner form , y grows downward |
| / | centre and size of / | , |
| , | the centre points , | DIoU's notation [ZHEN19] |
| intersection area | 0 when the boxes do not overlap | |
| union area | ||
| intersection over union | in [0, 1] | |
| smallest box enclosing both [REZA19] | its area; its width and height | |
| Euclidean distance between the centres | ||
| diagonal of [ZHEN19] | ||
| the loss named X | often (GIoU [REZA19], DIoU [ZHEN19], MPDIoU [MA23]), but not always: MGIoU's is [LE25], and α-IoU, Focal-EIoU, WIoU, PIoU v2 and InterpIoU are written out in full in their sections | |
| the penalty X adds to | DIoU's general form above [ZHEN19] |
Table. 1 The symbols used in every section; one that only one loss needs is defined where first used.
Here is all of it on one pair of boxes, case A: , . It returns in §9–§10.
The named pairs every section reuses:
| Pair | ||
|---|---|---|
| partial overlap | (160, 60, 320, 220) | (240, 140, 400, 300) |
| near, no overlap | (160, 60, 240, 140) | (280, 60, 360, 140) |
| far, no overlap | (160, 60, 240, 140) | (480, 60, 560, 140) |
| diagonal, no overlap | (160, 60, 240, 140) | (280, 180, 360, 260) |
| sideways | (160, 60, 240, 140) | (200, 60, 280, 140) |
| inside: centred | (160, 60, 320, 220) | (200, 100, 280, 180) |
| inside: on an edge | (160, 60, 320, 220) | (200, 60, 280, 140) |
| inside: in the corner | (160, 60, 320, 220) | (160, 60, 240, 140) |
| same centre, flat | (160, 60, 320, 220) | (160, 100, 320, 180) |
| case A | (100, 100, 200, 160) | (130, 120, 250, 180) |
| case B | (100, 100, 200, 160) | (220, 110, 300, 170) |
| twice as big | (100, 100, 200, 160) | (50, 70, 250, 190) |
| half as big | (100, 100, 200, 160) | (125, 115, 175, 145) |
Table. 2 The pairs every section reuses, corner form in pixels.
2. IoU, the Number Benchmarks Score You On
No benchmark asks how many pixels your corners are off; it asks for IoU. Two rules turn it into a score.
- PASCAL VOC: a detection is correct only if its IoU with the ground truth "must exceed 0.5", and only one detection per object counts; the rest are false positives [EVER10].
- Why 0.5? It was "set deliberately low", because the ground-truth boxes are themselves unsure: where does the box of "a person with arms and legs spread" end? [EVER10]
- COCO (the dataset is [LIN14]): AP is averaged over 10 IoU thresholds, which COCO's evaluation page says rewards "better localization"; AP at 0.75 alone is its "strict" metric [COCO15].
- : the IoU a hit needs; : the average precision at that .
Let's put numbers in:
- A box at IoU 0.72 is a hit at 5 of the 10 thresholds; tightened to 0.92, at 9. Under VOC both score the same: above the threshold, any accuracy is "treated equally" [REZA19].
- On VOC2007's "car" class, the best-detected class, AP "drops steeply" for thresholds above 0.5 [EVER10]: the 2007 detectors' predicted boxes were loose.
Slide the threshold yourself in mAP Calculator and watch the score fall.
So why train on corner distances?
3. Why ℓ1, ℓ2 and Smooth-ℓ1 Disagree with IoU
3.1 Smooth ℓ1 and the Faster R-CNN offsets
- Fast R-CNN's smooth ℓ1 is quadratic for small errors , linear for large ones: "less sensitive to outliers" than ℓ2 [GIRS15].
-
: one coordinate's error, the predicted offset minus the true one, (next bullet).
-
Faster R-CNN's region proposal network applies it to offsets from an anchor , the R-CNN parameterisation [REN15]:
- The log (and YOLO's square root, §3.2) is a hand-made scale fix, a non-linear representation meant "to naively compensate for the scale changes" [REZA19].
3.2 YOLO's square root
- YOLO v1's squared error, for one box (λ_coord = 5) [REDM16]:
- The square roots are there because "small deviations in large boxes matter less than in small boxes" [REDM16]. In pixels, before λ_coord (YOLO's division by the image size leaves the ratio unchanged): 10 px too wide costs 0.238 on a 100-px box, 1.716 on a 10-px one, ≈ 7.2× more (plain squared error: 100 for both).
3.3 Same ℓ2, different IoU
-
Scale: ℓ2 and ℓ1 weigh large boxes more [YU16, CARI20]. Take G = (0, 0, 4, 4) and P = (2, 2, 6, 6) and blow both up ten times. On raw corners ℓ1 goes from 8 to 80 and smooth ℓ1 from 6 to 78, while IoU stays 0.1429. The offsets of §3.1 divide the ×10 back out by hand.
-
No fixed link to IoU. GIoU's Fig. 1 shows three pairs at one ℓ2 with IoU 0.26, 0.49, 0.65 [REZA19]; its construction on our boxes: ; the prediction's top-left corner is exact and its bottom-right corner sits 2 units from the true one. ℓ2 is always 2; IoU is 0.6667 with the corner to the right, 0.5458 diagonally out, 0.4179 diagonally in.
- Try this: drag the blue corner round the circle, then switch to × 10. ℓ2 becomes 20; IoU and GIoU (black, §5) do not move.
So why not train on IoU itself? UnitBox did, in 2016.
4. The IoU Loss — UnitBox's −ln IoU and the Plain 1 − IoU
4.1 UnitBox
- The problem: ℓ2 treats a box's four edges as unrelated numbers and lets big boxes dominate [YU16].
UnitBox is a per-pixel object detector, tested on faces: every pixel inside a box predicts its distances to the four edges, (truth ). The pixel is inside both boxes, so the overlap's sides are the shorter distances:
is the predicted area ( the true one, the same way). With and :
- Why the log: treat IoU as a Bernoulli variable with target 1; cross-entropy collapses to −ln IoU [YU16].
- The gradient (its Eq. (7)) pushes the predicted area down on every side and the overlap up on every side that falls short of the truth [YU16].
On the "partial overlap" pair, IoU 0.1429 gives −ln IoU = ln 7 = 1.9459. Its slope is the slope of 1 − IoU divided by IoU, so seven times steeper here.
- Results: the largest learning rate that still trained was 10⁻⁸ with the IoU loss and 10⁻¹³ with ℓ2; best model at ∼16k iterations against ∼29k for ℓ2 [YU16].
NOTE: In UnitBox the pixel sits in both boxes, so they never come apart; IoU is 0 only if the predicted box collapses to zero width or height.
4.2 1 − IoU and its flat spot
GIoU's Alg. 2 writes the plain form [REZA19]:
- No log, so it is bounded in [0, 1], and a true metric [REZA19].
- The flat spot: once the boxes part, IoU = 0 and the loss is 1, near or far [REZA19]. The gradient is 0, so a box with no overlap never moves [ZHEN19].
Our numbers: 1.0000 on "near, no overlap" and on "far, no overlap", gradient (0, 0, 0, 0) (my finite difference); −ln IoU reads ∞. The playground below comes back in §5–§7.
- Try this: drag B toward Bᵍᵗ. The loss holds at 1.0000 until the boxes overlap; in the slide plot it is flat wherever they do not touch.
- 1 − IoU gets its own row in every GIoU table, between the detector's default loss and GIoU (§5.3) [REZA19].
So we need a term that still moves when the boxes miss each other :)
5. GIoU — Charge for the Empty Space
Snap a rubber band around sticker and square: the bare paper inside it grows as they drift apart. GIoU charges for it [REZA19].
5.1 The equation
Take IoU and subtract the empty share of , the smallest box enclosing both:
- : the part of neither box covers, area ; its share is .
- For boxes, costs two mins and two maxes (Alg. 2 [REZA19]):
- Properties [REZA19]: , , a metric, and scale invariant (ratios of areas).
Let's put numbers in, on the partial overlap:
- , , IoU = 0.1429.
- , , empty share 12800 / 57600 = 0.2222.
- GIoU = −0.0794, negative despite the overlap; 1.0794 against 1 − IoU = 0.8571.
- Try this: drag the blue box away. The loss keeps climbing past contact; 1 − IoU (faint, slide plot) goes flat.
5.2 Why it trains when the boxes don't touch
With , the GIoU loss reduces to [REZA19]:
- "Near, no overlap": 2 − 12800/16000 = 1.2000; "far": 2 − 12800/32000 = 1.6000. 1 − IoU says 1.0000 to both :)
- The catch: GIoU can lower its loss by growing the box, because a bigger shrinks the empty space too [REZA19]. On this pair divided by 40 and moved to the origin, G (0, 0, 2, 2), P (3, 0, 5, 2), and : a step moves the left edge toward and the right edge away, so the box grows.
- DIoU's paper shows the same: GIoU first enlarges the box, then moves it [ZHEN19].
- Second catch: slide the box purely sideways at the same height and is the union: the penalty is exactly 0, GIoU = IoU = 0.3333. Horizontal, vertical and enclosed cases converge slowly: in DIoU's Fig. 1, DIoU matches the target in 120 iterations, GIoU not after 400 [ZHEN19].
- Try this: nudge the blue box up and watch "what it adds" leave zero.
5.3 Results
NOTE: relative % is (new − old) / old; AP points is new − old on 0–100. YOLO v3's COCO gain is +6.69 % relative, +2.1 points.
| Detector, data | Baseline | 1 − IoU | GIoU | Relative |
|---|---|---|---|---|
| YOLO v3, VOC 2007 test | .461 (MSE) | .466 | .477 | +3.45 % |
| YOLO v3, COCO val 5K | .314 (MSE) | .322 | .335 | +6.69 % |
| Faster R-CNN, VOC 2007 test | .370 (smooth ℓ1) | .384 | .392 | +5.95 % |
| Faster R-CNN, COCO test | .364 (smooth ℓ1) | .373 | .373 | +2.47 % |
Table. 3 AP over IoU 0.50–0.95, Tab. 1, 2, 4 and 6 of [REZA19]; last column the paper's printed gain over the baseline (from unrounded AP).
- The R-CNN row on COCO: GIoU and 1 − IoU tie at .373 (both +2.47 %); its anchors are "more dense than YOLO v3", and the weight was "naively tuned on PASCAL VOC" [REZA19].
5.4 Where you already met it: DETR and RT-DETR
- DETR's ℓ1 grows with box size, so it adds GIoU, ℓ1 5 : GIoU 2, in the loss and the matching cost [CARI20] (DETR — Detection as Set Prediction, No Anchors and No NMS §4.2). Dropping GIoU costs 4.8 AP, dropping ℓ1 only 0.7 (Tab. 4 [CARI20]).
- Deformable DETR follows DETR's loss settings apart from a focal classification loss (its §5 [ZHU20]); RT-DETR in cost and loss (Tab. A [ZHAO24], RT-DETR — DETRs Beat YOLOs, Encoder by Encoder); D-FINE keeps the 5 : 2 loss weights (Tab. 6 [PENG24]).
GIoU still has two blind spots: inside the ground truth it is plain IoU, and level with it, overlapping, it adds nothing or almost nothing [ZHEN19]. DIoU goes after both.
6. DIoU — Pull the Centres Together
DIoU pins a string between the two centres and charges for its length against the band's diagonal [ZHEN19]; the string has a length wherever the sticker is.
6.1 GIoU's blind spot inside the target
- Inside the target, GIoU is plain IoU: in the paper's Fig. 2, three boxes inside a target all score , while [ZHEN19].
6.2 The equation
Keep 1 − IoU and change only the penalty (Eq. 5–7 [ZHEN19]):
- : squared distance between the centres (the string). : squared diagonal of (the band). Both centres lie in , so the ratio is in [0, 1) and, like IoU, scale invariant [ZHEN19].
- Its gradient pulls towards , overlap or not. Far apart, [ZHEN19].
Let's put numbers in:
- Inside: 80 × 80 in 160 × 160, centred, on an edge, in the corner: , so 0.7500, 0.78125, 0.8125; stays 0.7500.
- Sideways (§5): GIoU adds 0, DIoU adds 0.0769: 0.7436.
- A miss, diagonal vs beside it ("near, no overlap"): 1.6800 vs 1.2000; 1.3600 vs 1.3103.
- Try this: drag the blue box around inside the dashed one; GIoU (pick it) never leaves 0.7500.
NOTE: is measured on a box that contains the prediction, so DIoU still pays a little for growing. On §5.2's near pair divided by 40, the width slope against for the position (GIoU: −0.12 against +0.16; my arithmetic). WIoU (§10.1) removes this by holding fixed.
6.3 The simulation
- 7 unit-area targets (1:4 to 4:1); anchors at 5,000 points × 7 areas × 7 aspect ratios, each fitted to all 7 targets: 5,000 × 7 × 7 × 7 = 1,715,000 cases [ZHEN19].
- Fig. 4 (no printed values): IoU loss fails wherever anchors miss, GIoU at horizontal and vertical placements, DIoU leaves "very small regression errors everywhere" [ZHEN19].
6.4 Results
| Detector, data | 1 − IoU | GIoU | DIoU | DIoU vs 1 − IoU |
|---|---|---|---|---|
| YOLO v3, VOC 2007 test (Tab. 1) | 46.57 | 47.73 | 48.10 | +3.29 % |
| SSD, VOC 2007 test (Tab. 2) | 51.01 | 51.06 | 51.31 | +0.59 % |
| Faster R-CNN, COCO 2017 val (Tab. 3) | 37.93 | 38.02 | 38.09 | +0.42 % |
Table. 4 AP over IoU 0.50–0.95 (IoU-metric columns), Tab. 1–3 of [ZHEN19]; last column relative % (§5.3).
- Over GIoU: +0.37, +0.25, +0.07 AP points, no spread reported; Faster R-CNN's dense anchors start in Fig. 4's "basins" [ZHEN19].
Two boxes with one centre and one IoU can still differ in shape. That is CIoU's job.
7. CIoU — Add the Aspect Ratio
Now a tall, thin sticker centred on a wide print: DIoU's penalty is 0, yet the shape is wrong. A good box loss should see "overlap area, central point distance and aspect ratio" [ZHEN19]; CIoU (Complete IoU) adds the third.
7.1 The equation
DIoU's penalty gets one more term, a shape gap times a weight [ZHEN19]:
- is the angle between a box's diagonal and its vertical side, strictly between 0 and ; keeps in [0, 1). It sees only the ratio: a box twice as big with the same shape has .
- is small while is large: overlap "is given higher priority" [ZHEN19], the shape comes later.
Let's put numbers in: ground truth 2 × 1, prediction 1 × 2, same centre ("crossed aspect"):
- IoU = 1/3, , so , blind to the shape.
- , , so 0.7004.
- Try this: "nearly right" (2 × 1.2, IoU 0.8333) gives ; once boxes agree, it is tiny.
On "same centre, flat": , , against :
7.2 Two CIoUs: the conference α and the journal α
The journal version switches off below IoU 0.5 [ZHEN20]:
- Below 0.5 the journal CIoU is DIoU: for a poor match, shape matters less [ZHEN20]. Crossed aspect: 0.7004 (AAAI) against 0.6667 (journal). "Square" (1.5 × 1.5, IoU 0.5455) gives 0.4581 with either.
- Pick "journal α, below 0.5" in the aspect figure (§7.1), then set the prediction to 1.5 × 1.5: IoU passes 0.5 and jumps from 0 to about 0.08.
- In this read, "CIoU" means the AAAI α unless I say "journal".
NOTE: the darknet code behind the AAAI results keeps α always on [ZHEN19c]; the journal's YOLACT code gates it at IoU > 0.5 (the paper writes ≥) [ZHEN20c].
7.3 The gradient the code changes
- The code drops from , ; for sizes in [0, 1] it is "likely to yield gradient explosion" [ZHEN19]. What is left, the arctan gap times (or ), keeps the direction and still grows with the box, but no longer blows up for small ones [ZHEN19c].
- The released code treats α as a constant (no gradient through it); the papers do not say so [ZHEN19c, ZHEN20c].
7.4 Results, and small objects
- YOLOv3, VOC 2007 (AAAI CIoU): 49.21 AP against 46.57 for the IoU loss, +5.67 % (+2.64 points) [ZHEN19] (Tab. 1).
- YOLACT [BOLY19], COCO masks (journal CIoU), against Smooth-ℓ1: the loss alone 29.1 → 29.6 AP; with Cluster-NMS using score and distance penalties, +1.1 AP and +3.5 AR100 (recall with 100 detections per image) [ZHEN20] (Tab. I, arXiv v4).
| Loss | AP | APsmall | APlarge |
|---|---|---|---|
| 1 − IoU | 37.93 | 21.58 | 50.14 |
| GIoU | 38.02 | 21.45 | 50.21 |
| DIoU | 38.09 | 21.66 | 50.32 |
| CIoU | 38.65 | 21.32 | 51.51 |
Table. 5 Faster R-CNN, ResNet-50-FPN, COCO 2017 val, Tab. 3 of [ZHEN19].
- On small objects CIoU falls below even the IoU loss, and DIoU is best: "the central point distance is more important than aspect ratio" [ZHEN19]. The journal sees the same weakness: YOLACT's small- and medium-object recall drops against Smooth-ℓ1 (AR_S 18.8 → 18.0, AR_M 44.7 → 44.0; the APs tie), and BlendMask-RT's AP_S against GIoU (14.4 → 14.1) [ZHEN20]. YOLOv4's comparison: YOLOv4 — Version 4: Final Verdict.
NOTE: the journal abstract's "+1.7 AP / +6.2 AR100" is from a box table that is in arXiv v1–v3 but not in v4 [ZHEN20].
8. DIoU-NMS, Briefly
DIoU's penalty also works in non-maximum suppression (NMS, see Object Detection — A Quick Read): "two boxes with distant central points probably locate different objects" [ZHEN19].
- : the top-scoring box, already kept; : a candidate with score ; . Drop it for plain NMS.
- : the NMS threshold, each detector's default (0.45 for YOLOv3 and SSD, 0.50 for Faster R-CNN); for YOLOv3 and SSD trained with CIoU, DIoU-NMS beat plain NMS at every ε tried, 0.43 to 0.48 (Fig. 9 [ZHEN19]).
- Our numbers: , , . IoU = 2.56 / 5.44 = 0.4706, so plain NMS drops . , and 0.4428 < 0.45: DIoU-NMS keeps it.
- Cluster-NMS [ZHEN20] runs NMS as matrix products; with the DIoU test it is "actually equivalent with DIoU-NMS".
Set ε to 0.45 and slide to a shift of 11: plain NMS drops it (IoU 0.45), DIoU-NMS keeps it (0.45 − 0.04 = 0.41). The figure is from YOLOv4 — Version 2: Bag of Specials §6:
CIoU's sees only the ratio of width to height, never the sizes themselves [ZHAN22a]. The next papers go after that.
9. 2021–2022: Width and Height, Powers, and Angles
After CIoU the papers either change what the penalty measures or which boxes get the gradient (Fig. 1). EIoU does both.
9.1 EIoU and Focal-EIoU
- The problem: every box times the target's width and height has ; and , so when one side grows the other shrinks [ZHAN22a].
- In its Fig. 1 a 1 × 2.4 anchor on a 1 × 1 target ends at 1.64 × 2.84 after 50 CIoU iterations: better ratio, worse size [ZHAN22a].
Keep DIoU and swap CIoU's for two terms on the sizes (Eq. 7 [ZHAN22a]):
- Each term pulls its own side towards the target; nothing ties them, so a box too big both ways shrinks both ways.
NOTE: under Eq. 7 the paper writes "h^w and h^c" for and .
Let's put numbers in:
- Twice as big: , , so 0.7500; EIoU adds 100²/200² + 60²/120² = 0.5: 1.2500. Half as big gives the same pair.
- Case A: of the two sizes only the width differs (120 against 100): 0.8178 against 0.8000.
Focal-EIoU. Good boxes are few, and the many poor ones produce "excessively large gradients" [ZHAN22a]. Its FocalL1 (Eq. 8–9) does not combine with EIoU, so the paper multiplies instead (Eq. 10):
- : 0.5 by default; γ = 2.0 does worse than the baseline (§5.4.4 [ZHAN22a]). A poor box is turned down.
- Case A: 0.2692^0.5 × 0.8178 = 0.4243. Case B (no overlap): the loss is 0, so a box that misses gets no gradient (my reading; the paper does not discuss it).
α-IoU
Focal-EIoU
WIoU v3
PIoU v2
Focaler-IoU
| Detector (R50), COCO 2017 | Own loss | Focal-EIoU |
|---|---|---|
| Faster R-CNN | 37.3 | 38.9 |
| RetinaNet | 35.9 | 37.5 |
| ATSS | 39.1 | 39.7 |
| PAA | 40.3 | 40.8 |
| DETR | 42.0 | 43.2 |
Table. 6 AP over IoU 0.50–0.95, Tab. 3 of [ZHAN22a]: each detector's own box loss replaced; AP points; split and spread not stated in Tab. 3.
- In its detection examples the paper finds it "a little inferior to the original IOU loss" on small objects (§5.6, Fig. 10 [ZHAN22a]); in Tab. 3, APsmall drops against the detector's own loss in 6 of 11 rows.
9.2 α-IoU
- The problem: weight good boxes more, in loss and gradient, with one knob [HE21a]: my comparison, focal loss's reweighting idea Understanding Focal Loss —A Quick Read turned towards high IoU.
Raise IoU to a power (not CIoU's weight; Eq. 1–2 [HE21a]):
- α = 1 is 1 − IoU; the Box-Cox form (1 − IoU^α)/α tends to −ln IoU as α → 0 (its §3.2, Eq. 1 [HE21a]).
- The same power goes on any penalty (Eq. 3–4); CIoU's weight becomes β:
- Against the IoU loss (Properties 2–3 [HE21a]): the loss weight rises from 1 to α; the gradient weight α IoU^{α−1} (α > 1) is below 1 for poor boxes, above 1 for good ones, crossing 1 at IoU = α^{1/(1−α)} (Property 3): 0.5 for α = 2, as the paper notes (its §3.3), and 0.577 for α = 3 (my arithmetic).
- Case A, α = 3: 1 − 0.2692³ = 0.9805; gradient weight 3 × 0.2692² = 0.2175. At IoU 0 it is as flat as 1 − IoU; α-DIoU keeps DIoU's pull.
α-IoU
Focal-EIoU
WIoU v3
PIoU v2
Focaler-IoU
| Detector, COCO val | Base loss | α = 1 | α = 3 |
|---|---|---|---|
| YOLOv5s | IoU | 36.29 | 37.01 |
| YOLOv5s | DIoU | 36.36 | 36.74 |
| DETR (R50) | IoU | 39.23 | 40.18 |
Table. 7 mAP over IoU 0.50–0.95, Tab. 1 of [HE21a]; AP points.
- Faster R-CNN (Tab. 2): IoU 37.88, α-DIoU 39.43. The strict end gains most: YOLOv5s AP95 (AP at IoU 0.95) 2.07 → 3.35 [HE21a].
- AP50 can drop, by "less than 0.5%" at α = 3 (its §4.2); the paper recommends tuning α in [2, 3], or α = 3 when tuning is too costly (its §3.3, §4.4 [HE21a]).
9.3 SIoU
- The problem: earlier penalties ignore the miss's direction, so the box can "wander around" [GEVO22]. SIoU first pulls the centre onto the nearer axis through the target's.
Write , , and let now be SIoU's angle between the centre line and the x-axis. The angle cost (the paper numbers no equations, so I cite pages; p. 3):
- Since 1 − 2 sin²θ = cos 2θ, (my simplification): 0 on an axis, 1 at 45°.
The distance cost (p. 3) turns Λ into a rate (SIoU's own):
- : the enclosing box's sides, as the paper's Fig. 3 draws them (p. 4 [GEVO22]); its text writes and reuses for the vertical offset.
| Angle α | 0° | 15° | 30° | 45° |
|---|---|---|---|---|
| γ = 2 − sin 2α | 2 | 1.5 | 1.134 | 1 |
| 1 − exp(−0.1 γ) | 0.1813 | 0.1393 | 0.1072 | 0.0952 |
Table. 8 One distance term at ρ_t = 0.1: largest on an axis, smallest at 45° (my arithmetic).
- The paper's text (p. 4) says the reverse; its formula, as written and as YOLOv6 implements it, gives this table [GEVO22].
The shape cost (p. 4), and the loss:
- : one side's relative size gap; , found per dataset by a genetic algorithm, is "near to 4" (range 2–6) [GEVO22].
- Case A: α = 26.6°, Λ = 0.800, γ = 1.200, Δ = 0.1541, Ω = 0.0006, so 0.8081 against 0.8000. Twice as big: 0.7740; θ = 4 keeps the size push small.
Results:
- Only on the author's non-public "proprietary Scylla-Net": COCO val, CIoU 66.4 / 50.3 → SIoU 70.0 / 52.7 (mAP@0.5 / mAP@0.5:0.95, Tab. 1 [GEVO22]).
- The public evidence is YOLOv6's ablation, COCO val AP (Tab. 9 [LI22b]): N 35.1 / 35.1 / 35.5, S 43.1 / 43.1 / 43.3, M 48.2 / 48.3 / 48.1 (GIoU / CIoU / SIoU).
By 2023 the question was mostly: which boxes deserve the gradient?
10. 2023–2024: Weights, Corners and Helper Boxes
Now suppose some printed squares are wrong: a loss that charges hard for every bad sticker ends up fitting the wrong squares too. The 2023–2024 papers re-weight boxes by quality (WIoU, Inner-, Focaler-IoU, PIoU v2) or re-measure the miss (MPDIoU, Shape-IoU, PIoU).
10.1 Wise-IoU v1, v2, v3
- The problem: datasets carry bad labels, and distance and aspect-ratio penalties "aggravate the penalty" on them [TONG23].
v1 puts DIoU's centre term (§6) in an exponent and multiplies (Eq. 17 [TONG23]):
- : the size of ; : detached, held constant in the gradient, which removes DIoU's pull to grow (§6 NOTE). .
- Case A: ×1.0717, 0.7831 against 0.8000.
v2 and v3 scale it by how bad this box is against the running average (Eqs. 18–22):
- , its running mean (momentum ); : the outlier degree. is v2's power; are v3's knobs (not CIoU's α); : v3's gradient gain, small for both very good and very bad boxes. v2 is monotonic, v3 is not.
- At the paper's α 1.9, δ 3: peaks at with 1.310; , . A box ten times worse than usual is almost silenced (my arithmetic; from their Eq. 23).
α-IoU
Focal-EIoU
WIoU v3
PIoU v2
Focaler-IoU
- Results (Tab. I, YOLOv7-w6, a 20-class COCO subset): AP75 (AP at IoU 0.75) CIoU 53.03 → v3 54.50, AP 45.20 → 45.68. v3's best (α, δ) raised AP75 for every base loss, yet CIoU v3 and SIoU v3 lose AP at every setting; v2 hurt SIoU and EIoU [TONG23]. The code's default branch uses α 1.7, δ 2.7.
10.2 MPDIoU
- The problem: same aspect ratio, different size: twice as big and half as big score 0.75 under GIoU, DIoU and CIoU alike [MA23].
Measure the two corners instead, against the image size (the paper's ; Alg. 1–2 [MA23]):
- : the top-left and bottom-right misses. At 640 × 640 a 50 px corner miss adds only 0.0031, and the weight shifts with input size.
- Twice as big 0.7583, half as big 0.7521: the smaller box wins. (MPDIoU's Theorem 3.1 prints this inequality the other way round from its own text [MA23].)
- Results: YOLOv7 on VOC, AP: CIoU 56.2, EIoU 56.3, MPDIoU 57.3; YOLACT on COCO (Tab. 4, AP, not labelled box or mask): GIoU, the stated baseline, 25.0; CIoU 24.8; MPDIoU 25.1 [MA23]. Read the gains as small.
10.3 Inner-IoU
- The idea: score IoU on helper boxes, both scaled by a ratio about their own centres; smaller helpers for high-IoU samples, larger for low [ZHAN23].
Edges of 's helper, the same for (Eqs. 15–27 [ZHAN23]):
- : the helpers' overlap, clamped at 0 (the paper's product is not). ratio is typically in [0.5, 1.5]; X's penalty keeps the real boxes.
- Case A, IoU 0.2692: helpers at 0.8 give 0.1892, at 1.2 0.3363. Concentric boxes score 0.25 at every ratio.
Does a bigger helper help a poor box? My 1-D check (two 10-wide boxes with centres apart and helpers wide, ): ratio 0.8 is steeper than the real boxes for every ; ratio 1.2 is flatter for every , and helps only for , where real IoU is 0.
- Results (YOLOv7-tiny, VOC, AP50 / AP50:95): SIoU 63.38 / 37.31 → Inner-SIoU (0.75) 64.36 / 38.52; CIoU 63.60 / 37.64 → Inner-CIoU (0.70) 64.44 / 38.38 [ZHAN23].
- On AI-TOD (tiny objects), ratio 1.15 lifts AP50:95 18.06 → 18.23; 1.10 drops it to 17.89 [ZHAN23].
10.4 Shape-IoU
- The problem: the same offset costs more IoU along the target's short side (vertical, for a wide box) than along its long side [ZHAN23a].
Weight the centre term by the target's own shape (Eqs. 19–25 [ZHAN23a]):
- : centre offsets, cross-weighted: a wide target makes a vertical miss cost more. : SIoU's shape cost with θ = 4, its width gap weighted by and its height gap by (Eq. 23–24).
- is tied to "the scale of the target in the dataset", with no value given. The code's default 0 gives : DIoU plus half of SIoU's shape cost (my reading).
- Case A: scale 0 → 0.8003; scale 1 (, ) → 0.7897: the 40 px miss runs along the long side.
- Results (AP50 / AP50:95): YOLOv8s on VOC, SIoU 69.5 / 48.3 → 70.1 / 48.8; YOLOv5s on AI-TOD, 42.7 / 18.1 → 44.3 / 18.7 [ZHAN23a]. The scale used is not stated.
10.5 Focaler-IoU
- The problem: datasets differ in easy and hard boxes; the loss should pick its focus [ZHAN24].
Map IoU linearly between two cut-offs (Eqs. 14–20 [ZHAN24]; its "≪" read as ≤):
- Inside the IoU term's gradient is multiplied by ; outside it is 0.
- Code default (0, 0.95): above IoU 0.95, no IoU-term gradient. Case A: 0.2692 → 0.2834.
α-IoU
Focal-EIoU
WIoU v3
PIoU v2
Focaler-IoU
- Results (AP50 / AP50:95): YOLOv8s on VOC, SIoU 69.5 / 48.3 → 69.8 / 48.6; YOLOv5s on AI-TOD, 42.7 / 18.1 → 44.6 / 18.6 [ZHAN24]. The used are not stated, and the SIoU baselines are Shape-IoU's.
10.6 PIoU and PIoU v2
- The problem: "unreasonable penalty factors" make anchors expand during regression and slow convergence [LIU24a].
NOTE: the paper is paywalled and I have not read it; the formulas are the authors' released code, the idea is cited to the paper [LIU24a].
- : the four edge misses over the target's size; unlike DIoU's , enlarging cannot grow the divisor. : box quality; : v2's attention, λ = 1.3 in the code.
- Twice as big: , 0.9712; half as big: , 0.8106.
- v2's weight rises and then falls: peaks (1.2866) at , the "medium quality" boxes the abstract aims at [LIU24a]. Near, no overlap () the loss is 1.8071; far () only 1.0141. Past the weight drops faster than the loss grows, so with the code's gradient a far box is pushed further away (my arithmetic).
- Results: YOLOv8 and DINO on COCO and VOC, per the abstract [LIU24a]; no numbers from an unread paper.
10.7 Unified-IoU, briefly
UIoU prints no closed-form loss; it scales both boxes by a ratio annealed from 2 to 0.5, moving the weight from poor boxes to good ones, and its code trains plain CIoU until a switch is edited. VOC mAP50–75: CIoU 61.85 → 62.95; on CityPersons plain UIoU is worse (34.2 against 37.5) [LUO24].
10.8 The variants side by side
| Loss | Year | What it changes | Knobs | Its own test |
|---|---|---|---|---|
| EIoU, Focal-EIoU | 2021 | width, height gaps; × IoUγ | γ | six detectors, COCO |
| α-IoU | 2021 | powers of IoU and penalty | α | YOLOv5, DETR, Faster R-CNN |
| SIoU | 2022 | angle steers the centre | θ | a non-public detector |
| WIoU v3 | 2023 | gain from the outlier degree | α, δ, m | YOLOv7-w6, COCO subset |
| MPDIoU | 2023 | corner misses ÷ image size | — | YOLOv7, VOC |
| Inner-IoU | 2023 | IoU of helper boxes | ratio | YOLOv7-tiny, VOC |
| Shape-IoU | 2023 | terms weighted by the target's shape | scale | YOLOv8s, VOC; AI-TOD |
| Focaler-IoU | 2024 | IoU mapped between d and u | d, u | YOLOv8s, VOC; AI-TOD |
| PIoU, v2 | 2024 | edge misses ÷ target size; × u(λq) | λ | YOLOv8, DINO |
| UIoU | 2024 | boxes scaled by an annealed ratio | schedule | YOLO, VOC, COCO |
Table. 9 Each paper's own setup; do not rank across rows. Inner-, Shape- and Focaler-IoU share two authors (Hao Zhang, Shuaijie Zhang) and a template [ZHAN23, ZHAN23a, ZHAN24]; arXiv's notes on 2401.10525 and 2307.07662 flag text overlap with Shape-IoU (2312.17663) and with GIoU (1902.09630) respectively.
Every loss here adds something on top of IoU: a penalty, a weight or a helper box. The 2025 papers ask: is IoU alone enough, measured in the right place?
11. 2025–2026: Back to Pure IoU, and Beyond Boxes
11.1 InterpIoU
- The problem: hand-made penalties are "sensitive to box shape, size, and distribution" and inflate boxes (§5.2) [LIU25].
- The idea: slide a copy of most of the way onto and score its IoU too (Eqs. 12–13 [LIU25]):
- : here a mixing weight, 0.98 by default (the dynamic variant clamps it, e.g. to [0.90, 0.99]); : the interpolated box's IoU with . No enclosing box, no centre term.
- The gradient through reaches times (Eq. 19 [LIU25]): a disjoint box gets a signal scaled by 0.02.
- Pure IoU's -derivative carries a shrinking term (Eqs. 22–26). In their simulation GIoU, DIoU, CIoU, EIoU and SIoU inflate boxes (" values exceeding 5"), InterpIoU stays near 0 [LIU25].
Near, no overlap: overlaps only for (Eqs. 14–17 [LIU25]); at 0.98, and the loss is 1.0583.
- COCO, YOLOv8m: every loss in 49.1–49.4 AP, InterpIoU 49.4 vs CIoU 49.2 (Tab. 3 [LIU25]). SSD on VOC: D-InterpIoU 47.0 AP against the best baseline SIoU 46.4 (GIoU 42.4); the fixed-α InterpIoU gets 45.6, below SIoU (Tab. 1 [LIU25]).
- No repeat runs or spread reported; their DINO CIoU row (47.5, Tab. 3) is unexplained, and α from 0.50 to 0.99 moves mAP by ≤ 0.4 (YOLOv8s on VisDrone and VOC, Tab. 4 [LIU25]).
11.2 MGIoU
- The problem: IoU losses are "unstable and limited to simple shapes"; shape-specific ones are slow [LE25].
- The idea: project both shapes on each edge normal, take a 1-D GIoU of the intervals, average (Eq. 1 in App. 7, §3.2 [LE25]). A rectangle has just two normals (§3.1 [LE25]); for an axis-aligned box they are x and y; , are the projections:
- A gap makes the numerator negative, GIoU's empty space in 1-D. MGIoU ∈ (−1, 1]; the ½ puts the loss in [0, 1) [LE25].
Near, no overlap: x gives −40 / 200 = −0.2, y gives 1: MGIoU = 0.4, loss 0.3, while IoU = 0.
- DOTA-v1.5, RetinaNet, 12 epochs: MGIoU 0.554 mAP, KLD 0.550, GWD 0.547, KFIoU 0.546, ℓ1 0.522; loss latency 0.45 ms vs 7.6–23 ms (Tab. 2 [LE25]).
- No repeat runs or spread reported, and the four are within 0.008 mAP; the speed is the solid gain.
11.3 MoEIoU and the rest, briefly
MoEIoU [EDUL26] joins UnitBox's , the square root of DIoU's and CIoU's without α as terms in a soft maximum, the weights shifting toward the IoU term in training ( 0.1 → 1, 1 → 0.8; Eqs. 6–8, 10–11):
- : the sharpness; the larger it is, the closer the sum comes to the largest term [EDUL26].
Its COCO is a 20 % subset of train2017, one seed; YOLO26: 32.3 vs CIoU's 32.2 (Tab. 3). Its "+1.79 %" for a log-sum-exp CIoU is 0.40 AP points (Tab. 4 [EDUL26]). FrSIoU [MING26] is another "SIoU", a semantic, fractional-order one for rotated boxes. Both are preprints.
12. IoU Beyond the Axis-Aligned Box
So far the sticker was upright and of a decent size. Three cases break that.
12.1 Tiny objects: NWD and GCD
- The problem: a 6 × 6 px box drops from IoU 0.53 to 0.06 after a few pixels' slip; a 36 × 36 px box only from 0.90 to 0.65 (Fig. 1 [WANG21a]).
- NWD turns each box into a Gaussian (covariance ) compared by Wasserstein distance (Eq. 4, 7–9 [WANG21a]):
- Gaps in pixels, not ratios; = AI-TOD's mean object size, 12.8 px [WANG21a].
- A square shifted by (2, 2) px: IoU 0.1429 / 0.3913 / 0.7840 at side 4 / 8 / 32 px, NWD 0.8017 (loss 0.1983) for all.
- Most of the gain is assignment (Tab. 1 [WANG21a], Faster R-CNN, AI-TOD): as the loss, 10.8 → 12.1 AP; as the assignment metric, 11.1 → 16.1.
- GCD divides each gap by both boxes' sizes (Eq. 3, 9): scale invariant, no [GUAN25]. On COCO (Tab. III) NWD sits 2.1 AP below GIoU; GCD only ties it.
12.2 Rotated boxes: GWD, KLD, KFIoU, ProbIoU
- The problem: an angle wraps around, and equals ; its Gaussian is the same either way [YANG21].
- GWD behaves almost like ℓ2 for upright boxes and is not scale invariant [YANG21, YANG21a]. KLD divides the centre's gradient by the target's width² and height², so a miss counts relative to the box size (Eq. 13 [YANG21a]). KFIoU's overlap ignores where the centres are (two boxes of the same size and angle always score 1/3, its upper bound), so it needs a separate centre loss [YANG22].
- ProbIoU: 1 − Hellinger distance, [LLER21]; YOLOv8/YOLO11's oriented heads train with it [JOCH26].
- The square trap: a square's Gaussian is a circle; turn it and nothing changes [LLER21, JOCH26]. ProbIoU stays 1.0000 at any turn; the true IoU at 45° is 0.7071.
- A 2 × 1 box at 30°: ProbIoU 0.7477, true 0.6233. YOLO26 adds an angle term , weighted most for near-square boxes [JOCH26]; GauCho predicts the Gaussian directly: a head, not a loss [MURR25].
12.3 Regressing a distribution: DFL, D-FINE, and YOLO26 dropping it
- Predict a softmax over bins per side, decode the mean; DFL pushes the mass onto the two bins around the target (GFL's Eq. 6 [LI20]):
- : softmax at bin , with . Best at (bins one unit apart): target 5.3 → S₅ 0.7, S₆ 0.3, DFL 0.611, not 0; a flat guess over bins 4–7 costs 1.386.
- Reach is capped at strides per side [JOCH26]: 120 / 240 / 480 px at stride 8 / 16 / 32 for 16 bins.
- D-FINE keeps the two-bin loss on 33 uneven bins, 0.019 box sizes apart near zero for D-FINE-L (Eq. 4–5, Tab. 6 [PENG24]); adding this refinement as a whole gave +0.5 AP (Tab. 3 [PENG24]).
- YOLO26 replaces DFL with L1, keeping CIoU (YOLO11n: 2.6M → 2.3M parameters). At 640 px YOLO26s gains 0.3 AP without it (Tab. 3), YOLO11s loses 0.6 (Tab. 2): a few tenths either way, as in GFL (+0.3, Tab. 3 [LI20]). At 1280 px dropping DFL gains 1.3 AP (49.8 → 51.1, Tab. 3 [JOCH26]); my reading is that this is where the reach cap bites.
12.4 The score should mean "how good is the box"
- NMS keeps the top class score, which tracks IoU poorly: correlation 0.217, against 0.617 for a predicted IoU [JIAN18]. Rank FCOS+ATSS's boxes by true IoU and AP jumps from 39.2 to 74.7 (Tab. 1 [ZHAN21]): the ranking fails, not the boxes.
| Loss | What the class score learns | Own gain, AP |
|---|---|---|
| QFL [LI20] | the IoU, as a soft target | +0.7 on ATSS (Tab. 3) |
| VFL [ZHAN21] | the IoU for positives | +1.1 (Tab. 3) |
| TAL [FENG21] | (score, IoU) picks the anchors | ~3.2 with its head (Tab. 3) |
| MAL [HUAN24] | , q = IoU: overconfident poor matches pay more | +0.4 on D-FINE-L, +0.3 on RT-DETRv2 (Tab. 6) |
Table. 10 IoU-aware class scores, each on its own COCO baseline.
- VFL is worked out in RT-DETR — DETRs Beat YOLOs, Encoder by Encoder, TAL in RT-DETRv3 — More Positives Without Paying at Inference.
13. What Today's Detectors Actually Train With
What do the detectors people download train with? Their configs say:
| Detector | Box loss | Source |
|---|---|---|
| YOLOv5 | CIoU | [JOCH20] |
| YOLOv7 | CIoU | [WANG23, WANG23a] |
| YOLOv8, YOLO11 | CIoU (7.5) + DFL (1.5) | [JOCH23] |
| YOLO26 | CIoU (7.5) + L1 (1.5), DFL removed | [JOCH23, JOCH26] |
| YOLOv6 | SIoU (2.5) for N; GIoU (2.5) for S; GIoU (2.5) + DFL (0.5) for M/L | [LI22b, LI22c] |
| YOLOX | 1 − IoU² (5), + L1 in the last no-augmentation epochs | [GE21, GE21a] |
| PP-YOLOE | GIoU (2.5) + DFL (0.5) | [XU22, XU22a] |
| RT-DETR | L1 (5) + GIoU (2) | [ZHAO24, LYU23] |
| D-FINE | L1 (5) + GIoU (2) + FGL (0.15) + DDF (1.5) | [PENG24] Tab. 6 |
| DEIM | L1 (5) + GIoU (2) + FGL (0.15) + DDF (1.5) | [HUAN24, HUAN24c] |
Table. 11 Default box losses of each detector's official code (read 2026-10-21); weights, where given, as set in its configs, D-FINE's from its paper.
- The YOLO line ships CIoU (§7). Ultralytics uses one box loss for every detect model (oriented heads swap CIoU for ProbIoU, §12.2): CIoU, plus DFL when the head predicts bins, else L1. YOLO26 predicts no bins: CIoU + L1 [JOCH23, JOCH26].
- YOLOX calls its loss the IoU loss, but its code computes 1 − IoU², the function α-IoU later studied at α = 2 (§9.2) [GE21, GE21a, HE21a].
- The DETR line keeps L1 + GIoU (§5.4), also as its matching cost [ZHAO24]; the IoU goes into the class score (VFL, MAL: §12.4).
- Of the 2021–2024 axis-aligned variants (§10), only SIoU is a default by name, in YOLOv6-N (and -T in its paper) [LI22b, LI22c]; for rotated boxes ProbIoU is Ultralytics' default (§12.2); the rest are swapped into an existing YOLO (§10.8).
NOTE: the commit read is named in each code reference; defaults change between releases.
14. Which One Should You Use?
Picking a box loss from its paper is like picking shoes by the label. My advice, evidence first:
- 1. Start with your codebase's default. Trained in one paper on COCO, GIoU, DIoU and CIoU land within about 0.6 AP, except one DINO run where CIoU trails by 1.7–1.9. CIoU tops the three COCO rows below but is last with DINO (47.5 against 49.2–49.4, Tab. 3 [LIU25]) and last of the three on VOC for both YOLOv12 and YOLO26 (Tab. 1 [EDUL26]):
- Faster R-CNN: CIoU on top (§7.4) [ZHEN19].
- YOLOv8m: 49.1 / 49.1 / 49.2 AP for GIoU / DIoU / CIoU (Tab. 3 [LIU25]).
- YOLOv12, a 20 % COCO subset: 32.1 / 32.5 / 32.7; on VOC it has GIoU ahead of CIoU, 54.4 vs 53.9 (Tab. 3, 1 [EDUL26]).
- None reports more than one run or a spread (MoEIoU names one fixed seed, its §4.1 [EDUL26]). So the YOLO code's CIoU and a DETR's L1 + GIoU are fine starts (§13).
- 2. If many predictions start with no overlap (sparse anchors, fresh queries), use a loss with a gradient there. These have none: 1 − IoU, −ln IoU (infinite), α-IoU on plain IoU, Focal-EIoU, plain Inner-IoU unless its helpers overlap, and Focaler-IoU (§4, §9, §10; my arithmetic from each formula). Versions built on GIoU, DIoU and the rest keep the parent's pull, except Focal-EIoU, whose IoU^γ weight is 0 at no overlap.
- 3. Small objects: DIoU beat CIoU on APsmall in its own table (§7.4) [ZHEN19]. For tiny objects change the assignment first: most of NWD's gain came from choosing positives with it (§12.1) [WANG21a].
- 4. Rotated boxes: a Gaussian loss (KLD [YANG21a], ProbIoU [LLER21]) or MGIoU [LE25] (§11.2, §12.2), plus an angle term if your boxes can be square: a square's Gaussian does not turn with it, so YOLO26 adds one [JOCH26].
- 5. The gain four separate groups each found is not a box loss: an IoU-aware class score (QFL, VFL, TAL, MAL), +0.3 to +1.1 AP each on its own baseline (TAL ~3.2 with its head) (§12.4) [LI20, ZHAN21, FENG21, HUAN24].
- 6. Read every variant's headline as measured by its own authors, on their own setup (§10.8). Try one against your current loss over several seeds :)
- Try this: pick "near, no overlap". Exactly the six losses of point 2 give no signal. Eight, GIoU, DIoU and CIoU among them, grow the box while they move it. MPDIoU, PIoU, PIoU v2 and WIoU v1 only move it. Pick "twice as big" and every row shrinks it.
NOTE: the last column is my arithmetic: one step on the blue box by each paper's formula, holding WIoU's enclosing box [TONG23], CIoU's α (as its released code does [ZHEN19c]) and, my choice, Focal-EIoU's weight.
15. Conclusion
- ℓ1 and ℓ2 judge four numbers alone (§3).
- 1 − IoU goes flat and −ln IoU infinite once the boxes stop overlapping (§4).
- GIoU, DIoU, CIoU add the empty space, the centre distance, the aspect ratio (§5–§7).
- The later variants reweight or reshape these, each tested by its own authors on their own setup (§10.8).
- The 2025 papers and the non-box cases measure IoU elsewhere (InterpIoU, MGIoU) or swap it for a Gaussian distance (§11–§12).
- The defaults are still CIoU in the Ultralytics YOLOs and YOLOv7, and L1 + GIoU in the DETRs, plus bin losses in D-FINE and DEIM (§13).
So keep your codebase's default, check that a far box still gets a gradient, and try an IoU-aware class score before a new box loss (§14) :)
16. References
- [EVER10] Everingham et al. The PASCAL Visual Object Classes (VOC) Challenge. International Journal of Computer Vision 88(2):303–338, 2010 (Oxford VGG copy).
- [LIN14] Lin et al. Microsoft COCO: Common Objects in Context. arXiv 1405.0312.
- [GIRS15] Girshick. Fast R-CNN. arXiv 1504.08083.
- [REN15] Ren et al. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. arXiv 1506.01497.
- [REZA19] Rezatofighi et al. Generalized Intersection over Union: A Metric and A Loss for Bounding Box Regression. arXiv 1902.09630.
- [YU16] Yu et al. UnitBox: An Advanced Object Detection Network. arXiv 1608.01471.
- [ZHEN19] Zheng et al. Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression. arXiv 1911.08287.
- [REDM16] Redmon et al. You Only Look Once: Unified, Real-Time Object Detection. arXiv 1506.02640.
- [CARI20] Carion et al. End-to-End Object Detection with Transformers. arXiv 2005.12872.
- [ZHU20] Zhu et al. Deformable DETR: Deformable Transformers for End-to-End Object Detection. arXiv 2010.04159.
- [ZHAO24] Zhao et al. DETRs Beat YOLOs on Real-time Object Detection. arXiv 2304.08069.
- [PENG24] Peng et al. D-FINE: Redefine Regression Task in DETRs as Fine-grained Distribution Refinement. arXiv 2410.13842.
- [ZHEN20] Zheng et al. Enhancing Geometric Factors in Model Learning and Inference for Object Detection and Instance Segmentation. arXiv 2005.03572.
- [ZHAN22a] Zhang et al. Focal and Efficient IOU Loss for Accurate Bounding Box Regression. Neurocomputing 506, 146–157, 2022 (arXiv 2101.08158).
- [HE21a] He et al. Alpha-IoU: A Family of Power Intersection over Union Losses for Bounding Box Regression. arXiv 2110.13675.
- [GEVO22] Gevorgyan. SIoU Loss: More Powerful Learning for Bounding Box Regression. arXiv 2205.12740.
- [LI22b] Li et al. YOLOv6: A Single-Stage Object Detection Framework for Industrial Applications. arXiv 2209.02976.
- [TONG23] Tong et al. Wise-IoU: Bounding Box Regression Loss with Dynamic Focusing Mechanism. arXiv 2301.10051.
- [MA23] Ma, Xu. MPDIoU: A Loss for Efficient and Accurate Bounding Box Regression. arXiv 2307.07662.
- [ZHAN23] Zhang et al. Inner-IoU: More Effective Intersection over Union Loss with Auxiliary Bounding Box. arXiv 2311.02877.
- [ZHAN23a] Zhang, Zhang. Shape-IoU: More Accurate Metric considering Bounding Box Shape and Scale. arXiv 2312.17663.
- [ZHAN24] Zhang, Zhang. Focaler-IoU: More Focused Intersection over Union Loss. arXiv 2401.10525.
- [LIU24a] Liu et al. Powerful-IoU: More straightforward and faster bounding box regression loss with a nonmonotonic focusing mechanism. Neural Networks 170, 276–284, 2024 (formulas as in the authors' code, github.com/fppccc/Powerful-IoU).
- [LUO24] Luo et al. Unified-IoU: For High-Quality Object Detection. arXiv 2408.06636.
- [LIU25] Liu, Watanabe. InterpIoU: Rethinking Bounding Box Regression with Interpolation-Based IoU Optimization. arXiv 2507.12420.
- [LE25] Le et al. Marginalized Generalized IoU (MGIoU): A Unified Objective Function for Optimizing Any Convex Parametric Shapes. arXiv 2504.16443.
- [EDUL26] Edula, Bagade. MoEIoU: Rethinking Bounding-Box Regression as a Mixture of Experts. arXiv 2606.00844.
- [MING26] Ming, Zhou, Yang, Zhao, Zhao, Wang, Liu. Geometry Meets Semantics: Fractional Gradient Stabilization for Semantic-Driven Bounding Box Optimization in Visual Detection Tasks. arXiv 2607.23530.
- [WANG21a] Wang et al. A Normalized Gaussian Wasserstein Distance for Tiny Object Detection. arXiv 2110.13389.
- [GUAN25] Guan et al. Gaussian Combined Distance: A Generic Metric for Object Detection. arXiv 2510.27649.
- [YANG21] Yang et al. Rethinking Rotated Object Detection with Gaussian Wasserstein Distance Loss. arXiv 2101.11952.
- [YANG21a] Yang et al. Learning High-Precision Bounding Box for Rotated Object Detection via Kullback-Leibler Divergence. arXiv 2106.01883.
- [YANG22] Yang et al. The KFIoU Loss for Rotated Object Detection. arXiv 2201.12558.
- [LLER21] Llerena et al. Gaussian Bounding Boxes and Probabilistic Intersection-over-Union for Object Detection. arXiv 2106.06072 (IEEE TIP 33, 671–681, 2024).
- [JOCH26] Jocher et al. Ultralytics YOLO26: Unified Real-Time End-to-End Vision Models. arXiv 2606.03748.
- [MURR25] Murrugarra-Llerena et al. GauCho: Gaussian Distributions with Cholesky Decomposition for Oriented Object Detection. arXiv 2502.01565 (CVPR 2025).
- [LI20] Li et al. Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection. arXiv 2006.04388.
- [JIAN18] Jiang et al. Acquisition of Localization Confidence for Accurate Object Detection. arXiv 1807.11590.
- [ZHAN21] Zhang et al. VarifocalNet: An IoU-aware Dense Object Detector. arXiv 2008.13367.
- [FENG21] Feng et al. TOOD: Task-aligned One-stage Object Detection. arXiv 2108.07755.
- [HUAN24] Huang et al. DEIM: DETR with Improved Matching for Fast Convergence. arXiv 2412.04234.
- [JOCH20] Jocher et al. Ultralytics YOLOv5. Code, GitHub (bbox_iou(..., CIoU=True), commit af08ba1), 2020.
- [WANG23a] Wang et al. YOLOv7 official implementation. Official code, GitHub (bbox_iou(..., CIoU=True), commit a207844), 2022.
- [JOCH23] Jocher et al. Ultralytics YOLO (YOLOv8 to YOLO26) losses. Code, GitHub (BboxLoss: CIoU always, DFL or L1 when reg_max ≤ 1; YOLO26 config reg_max 1; loss gains box 7.5, dfl 1.5; commit 2e241d0), 2023.
- [GE21] Ge et al. YOLOX: Exceeding YOLO Series in 2021. arXiv 2107.08430.
- [GE21a] Megvii. YOLOX official implementation. Official code, GitHub (IOUloss, loss = 1 − IoU², commit 6ddff48), 2021.
- [XU22] Xu et al. PP-YOLOE: An evolved version of YOLO. arXiv 2203.16250.
- [XU22a] PaddlePaddle. PaddleDetection: PP-YOLOE configs. Official code, GitHub (PP-YOLOE: GIoU weight 2.5, DFL 0.5, commit 65e6435), 2022.
- [LYU23] Lv et al. RT-DETR official implementation (v1). Official code, GitHub (the v1 implementation folder, commit df2a96c), 2023.
- [HUAN24c] Huang et al. DEIM official implementation. Official code, GitHub (loss weights: MAL 1, L1 5, GIoU 2, FGL 0.15, DDF 1.5; commit 09d35d5), 2024.
- [COCO15] COCO Consortium. COCO Detection Evaluation. cocodataset.org/#detection-eval, read 2026-10-21.
- [ZHEN19c] Zheng et al. DIoU-darknet. Official code, GitHub (src/box.c: CIoU's α always on, used as a constant; the 1/(w² + h²) factor dropped; commit 257ba17), 2019.
- [ZHEN20c] Zheng et al. CIoU (YOLACT). Official code, GitHub (multibox_loss.py: α computed without gradient, gated at IoU > 0.5; commit a9f589f), 2020.
- [LI22c] Meituan. YOLOv6 official implementation. Official code, GitHub (configs: SIoU for N, GIoU for S/M/L, DFL for M/L; loss weights IoU 2.5, DFL 0.5; commit e86a483), 2022.
- [BOLY19] Bolya et al. YOLACT: Real-time Instance Segmentation. arXiv 1904.02689.
- [WANG23] Wang et al. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. arXiv 2207.02696.
17. Connections
What this page builds on, cites or links to, and what points back at it. A plain box is a “builds on”; “cited” and “linked in the text” are the lighter links. Hover a box for a preview.
Related
- Paper · linked from the text
- Paper · this builds on it
- Read · this builds on it
- Paper · this builds on it
- Project · this builds on it
- Paper · linked from the text
Go deeper
-
Start withRead
-
Paper
-
Paper
-
Paper
-
Paper
-
Read
-
Read
-
Paper
-
Read
-
Paper
-
Paper
-
Paper
-
Project
-
You are hereIoU Losses — From 1 − IoU to the 2026 Variants, One Box at a TimeRead
Go broader
- Sits under
- Its tags on the map
- Also under these tagsBenchmark Datasets: Gas-station for CVEvaluation and metrics, Object detectionJev — Thinking Fast, in One PassEvaluation and metricsUnderstanding DIoU Loss — A Quick ReadLoss functions, Object detectionTriplet Loss Demystified in 5 minsLoss functionsIn defense of triplet loss for person re-identificationLoss functions
- Ask the mapWhat connects IoU losses and …type the other page's name; the map answers with the chain of links between them