Before you can read the parent note, you must be able to read its alphabet. This page picks up every symbol and idea it uses and builds it from nothing — a box, a number, a picture. Read top to bottom; each block only uses things defined above it.
Everything starts with the picture. To a computer an image is not "a photo" — it is a rectangle of numbers.
Notice y grows downwards — the opposite of school graphs. Look at the figure: the top-left corner is (0,0) and the bottom-right is the largest (x,y). This is a convention every detector obeys, so lock it in now.
Look at the figure: the same red box is written both ways. The parent note uses letters x,y,w,h constantly — now you know each is just one of the four numbers that pin down a rectangle.
Why these exact expressions?
The centre sits exactly halfway between the two corners. Halfway between two numbers on a line is their arithmetic mean — add them and split in two. So x=2x1+x2 is literally "the point midway between the left edge and the right edge," and likewise for y.
The width is the gap between the left edge x1 and the right edge x2; a gap between two positions on a line is found by subtracting them, hence w=x2−x1. Because x2 (right) is larger than x1 (left), this is positive, as a width must be. Same story for h=y2−y1.
Why this undoes the first? Starting from the centre, walk half a width left to reach the left edge and half a width right to reach the right edge — the box is symmetric about its own centre. This is the exact reverse of the mean/subtraction above, so you can always travel between the two descriptions in either direction with no loss.
The parent writes P=(Px,Py,Pw,Ph) and G=(Gx,Gy,Gw,Gh). This looks scary; it is not.
The whole game of box regression (parent's boxed formulas) is: nudge P until it matches G. Everything with a hat, G^, means "our prediction of G" — the hat means estimated, not exact.
The parent keeps saying things like "offset as a fraction of box width" and writes PwGx−Px. Why divide?
Look at the figure: two boxes, one small one large, both shifted by "half a width." The pixel shifts differ wildly, but the fractionPwGx−Px is 0.5 for both. That single shared number is what makes learning easier.
The parent writes P(object), P(Ci∣object), and pobj=σ(zobj).
Look at the S-shaped curve: very negative z → near 0; very positive z → near 1; z=0 → exactly 0.5 (maximum uncertainty). This is why the parent wraps objectness in σ — it converts a free-floating output channel into an honest "yes/no confidence."
Recall Why must confidence be squashed to
[0,1]?
Because it is later multiplied with other probabilities (e.g. P(Ci)⋅confidence). Multiplying probabilities only makes sense when each lives in [0,1]. ::: A raw logit could be 8 or −3 and would corrupt the product.
The parent's confidence formula uses IoUpredtruth.
This single number scores "how good is this box?" We give it its own deep dive — see Intersection over Union (IoU). It also drives which guesses survive filtering — see Non-Maximum Suppression.
Cover the right side and test yourself. If any answer surprises you, reread that section.
In image coordinates, which way does y grow? ::: Downwards, starting from the top edge at 0.
What four numbers describe a box in centre form? ::: Centre x, centre y, width w, height h.
How do you get the box centre from its corners, and why? ::: Take the arithmetic mean of the corners (x=2x1+x2) — the mean is exactly the midpoint between two positions.
How do you get corner form back from centre form? ::: Walk half a width/height out from the centre: x1=x−2w, x2=x+2w (same for y,h).
What does P mean and what does G mean? ::: P = proposal (a guess), G = ground truth (the correct human-drawn box).
How can you tell Px (a box coordinate) from P(object) (a probability)? ::: A subscript letter after P means the proposal box; parentheses around an event mean the probability operator.
What are dx,dy,dw,dh? ::: The raw nudges the network outputs; formulas turn them into the predicted box G^, and the targets tx,… are the correct nudges.
Why do we divide offsets by Pw? ::: To make them scale-invariant — a fraction of the box's own size means the same thing at every scale.
Which base is the log in this topic, and why predict log of the width ratio? ::: Natural log (base e); it makes grow/shrink symmetric, and exp then guarantees the recovered width is positive.
What does the sigmoid σ do to a raw logit zobj? ::: Squashes that objectness output channel into [0,1] so it can be read as a probability.
In softmax, what does the index k run over? ::: All classes from 1 to C; the denominator sums ezk over every class so the outputs total 1.
In words, what is IoU? ::: Shared area divided by combined area of two boxes; 1 = identical, 0 = no overlap.
How does the pair (i,j) address a box, and what is the last valid i? ::: i = cell index in row-major order (i=r⋅S+c), running 0 to S2−1; j = box number 0..B−1 within that cell.
What does 1ijobj do inside a sum? ::: Acts as a switch — it's 1 only when box j in cell i is responsible for an object, so the term is counted only then.
What do S, B, C stand for in YOLO? ::: Grid side length, boxes per cell, number of classes.
Why is a feature-map size like 37.5 never literally stored, and what replaces it? ::: Real sizes are integers: flooring (VALID → 37) or padding then ceiling (SAME → 38).