The whole idea.
The object-detection page slides a window over the picture and checks thousands of positions one by
one. YOLO — You Only Look Once — does not slide anything. It lays a grid
over the picture, and one pass of a CNN gives an answer for every cell at the same time. Each cell answers the
same short list of numbers: where the box is (x, y, w,
h), how sure it is that the box holds an object (the confidence), and which class it
is (one probability per class). The whole answer is one block of numbers, grid × grid × numbers
per cell, so the network is fast enough for live video. The grid does not cut the picture into small
pictures: the CNN looks at the whole picture once, and each cell is just one slot in its answer. That is
why a cell can draw a box much bigger than itself.
Which cell answers?
The cell that holds the center of an animal is the one responsible for it. Neighbor cells that
only overlap part of the animal also guess a box, but each cell’s box must be centered inside that cell,
so their guesses sit off to one side and score lower. The score of a box is its confidence times its
class probability. That still leaves a few duplicates around each animal, so YOLO ends with the same
two clean-up steps as the other pages: drop the low scores, then NMS.
What is simulated here.
A real YOLO learns its numbers from thousands of labeled photos. This page has no trained network, so
each cell’s numbers are made the way a trained one behaves: the box is the real box plus a small,
fixed error, moved inside the cell if needed; the confidence is the share of the cell the animal covers
(1 for the responsible cell) times the IoU of the cell’s box with the real one; and the class
probabilities are the share of the cell covered by cats and by dogs. On this page each cell gives one box;
the first YOLO gave two per cell, newer ones give more.