-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the YOLO wiki!
https://www.quora.com/How-can-YOLO-compute-the-confidence-score-at-test-time-They-say-they-compute-it-as-P-object-IOU-But-during-test-time-you-dont-have-the-ground-truth-boxes-How-is-it-possible Question: How can YOLO compute the confidence score at test time? They say they compute it as P (object) *IOU. But, during test time, you don't have the ground truth boxes. How is it possible? Answer: YOLO defines the confidence score as P(object) * (intersection/union).
At test time, the confidence score per bounding box is one of the outputs of the neural network; it is not recomputed, but it is used in making the final output based on which boxes have the highest confidence. From the 2016 paper:
At test time we multiply the conditional class probabilities and the individual box confidence predictions,
Pr(Classi|Object)∗Pr(Object)∗IOUtruthpred=Pr(Classi)∗IOUtruthpredPr(Classi|Object)∗Pr(Object)∗IOUpredtruth=Pr(Classi)∗IOUpredtruth
This is done per bounding box. They get a numerical output for each bounding box that’s treated as the confidence score. (2 such outputs are produced for the 2 bounding boxes per grid square that they used in their experiment.) In the equation above, that output corresponds to two terms on the left hand side.
Then they multiply by the conditional probability that the grid square contains a particular class, given that it contains an object. That gives a confidence score for each class, for each bounding box.
(At training time, they have some mechanisms to encourage the two bounding box predictors per cell to specialize at different tasks, which I admit I don’t fully understand, but seem to boil down to fiddling with the penalties for being wrong.)
ETA: In this slide from their presentation, they label the output P(object) but it’s actually their confidence interval, P(object) * IOU, like it says on the left. Of the 1470 outputs, 2 * 49 of them are confidence interval outputs.