Topic · Tasks

Evaluation and metrics

Everything on this site about evaluation and metrics, 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. Project · read first: Object Detection — A Quick Read

The figures these pages use

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

From Jev — Thinking Fast, in One Pass › 1. Two Systems in Your Head

10035
Two equal lines. Which line is longer? Stretch the bottom one until the two look equal, then switch on the ruler. The picture is the Müller-Lyer illusion from chapter 1 of Kahneman's book: measuring it does not make it go away.

From Jev — Thinking Fast, in One Pass › 1. Two Systems in Your Head

1 / 3 · bat and ball0
Three quick questions, and their checks. Answer each puzzle in your head first, then set the slider to your answer and read what it implies. The check is one addition, one rate or one step back. The three puzzles are Frederick's Cognitive Reflection Test (2005).

From Jev — Thinking Fast, in One Pass › 1. Two Systems in Your Head

1060
Linda, counted. A hundred women who fit Linda's description. Shaded: the bank tellers. Dark: the tellers who are also active feminists. Move either slider: the dark group can never outgrow the shaded one.

From Jev — Thinking Fast, in One Pass › 1. Two Systems in Your Head

1580
The cab problem, counted. A hundred cabs. Dark squares are Blue cabs, light ones Green. Outlined: the cabs the witness would call Blue. Of all the outlined cabs, how many are really Blue? The story is from chapter 16 of Kahneman's book; the counting is Bayes' rule.

From Jev — Thinking Fast, in One Pass › 2. From Brains to Models

850010
Steps per answer: one pass against token by token. Sequential steps (forward passes that must wait for the previous one) to answer k questions about one input. Token counts per answer and per stretch of thinking are my estimates, set with the sliders; the 2 + 3 preset uses Chen et al.'s example of 901 tokens for one sum.

From Jev — Thinking Fast, in One Pass › 2. From Brains to Models

Is a 0.9 right nine times in ten?. Simulated answers, not any model's: 2,000 reports spread evenly, each right with the chance its temperature hides. Ten bins by reported top probability; the dashed diagonal is a perfectly calibrated model. Shifted data keeps the reports and makes every answer a fifth less likely to be right.

From Jev — Thinking Fast, in One Pass › 3. Jev, From the Outside

1.50.5-10.90.5
One question, its probabilities and a threshold. Numbers you set, run through TypeSafe's published confidence formulas; the presets marked "saved call" put back the probabilities of the real call in this section. The two threshold sliders are rules in your code; Jev has none.

From Jev — Thinking Fast, in One Pass › 4. Jev, From the Inside

510011.1
Thirteen questions, one call. Count: forward passes for N questions about one state, my estimates of the token counts, not a timing. Cost: the list price applied to one call with N questions and to N calls with one each. Time: only points someone measured; TypeSafe's own are marked as such.

From Jev — Thinking Fast, in One Pass › 4. Jev, From the Inside

00
Learning from a score. A toy, not Jev: three options that pay 1 point with hidden chances of 0.2, 0.5 and 0.8. Nobody tells the model which option is right. It picks by its current chances, gets a score, compares the score with its average so far, and nudges the picked option up if the score beat the average and down if it fell short. Press play to watch the chances move. Then add 4 to every score and compare with zero: every pick now looks like good news, and over 200 runs the chance of the best option after 500 pulls is 0.53 instead of 0.95.

From Jev — Thinking Fast, in One Pass › 4. Jev, From the Inside

0.70.9
Rewards that pay for an honest probability. A yes/no question whose true chance of “yes” is p. Each panel shows what one reward pays on average for reporting the probability q. The dashed line is q = p, the honest report; the filled dot is the report that pays most. Only squared error and log put their peak on the dashed line, at every p. The hollow dot is the report you choose with the slider.

From Jev — Thinking Fast, in One Pass › 4. Jev, From the Inside

40
Training on a reward: where the reported chances end up. A toy training run, not Jev and not a language model: ten kinds of yes/no question whose true chance of “yes” runs from 0.05 to 0.95, and one number per kind that sets the probability the model reports. Each step it reports, sees the outcome, gets the reward, and is nudged by the score against its average, as in the three-option figure. Dots on the dashed diagonal are honest. Press play: squared error and log pull the dots onto the diagonal; rewarding confidence when right pushes them toward 0 and 1; scoring only the decision gets each dot to the correct side of 0.5 and then lets it wander.

From Jev — Thinking Fast, in One Pass › 4. Jev, From the Inside

0.4
Names against definitions. A toy that shows one way this can happen: a model that reads the definitions but also leans on what the option names mean. Hollow bars are the toy; solid bars are measurements on Jev, which the toy is not fitted to.

From Jev — Thinking Fast, in One Pass › 5. Visual Jev and Other Models That Read Pictures

Answering without looking. Accuracy by chance, with the picture replaced by flat grey, and with the picture, for the same questions and options (Yu & Yao, Table 1, original 4B backbone). Whatever the grey bar has above chance came from the wording of the question and its options alone.

From Jev — Thinking Fast, in One Pass › 5. Visual Jev and Other Models That Read Pictures

6 / 6 · 32
One look, many questions. Milliseconds per question as more questions are asked about the same image, on one RTX 5090 (Yu & Yao, Table 13). Sharing the image and batching the questions is slower for one question and about nine times faster for 32. Times are averages over the group and leave out image decoding and the network.

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 › 8. DIoU-NMS, Briefly

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 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".

Tags that go with it

Object detection 3Datasets and labelling 1Developer tools 1Language models 1Loss functions 1Tracking 1Vision and language 1