5

I am a bit confused with how Yolo works. In the paper, they say that:

"The confidence prediction represents the IOU between the predicted box and any ground truth box."

But how do we have the ground truth box? Let's say I use my Yolo network (already trained) on an image that is not labelled. What is my confidence then?

Sorry if the question is simple, but I really don't get this part... Thank you!

1
  • simplicity is important, liked the question.
    – prosti
    Dec 14, 2018 at 10:57

4 Answers 4

3

But how do we have the ground truth box?

You seem to be confused about what exactly is training data and what is the output or prediction by YOLO.

Training data is a bounding box along with the class label(s). This is referred to as 'ground truth box', b = [bx, by, bh, bw, class_name (or number)] where bx, by is the midpoint of annotated bounding box and bh, bw is height and width of box.

Output or prediction is bounding box b along with class c for an image i. Formally: y = [ pl, bx, by, bh, bw, cn ] where bx, by is the midpoint of annotated bounding box. bh, bw is height and width of box and pc - The probability of having class(es) c in 'box' b.

Let's say I use my Yolo network (already trained) on an image that is not labelled. What is my confidence then?

When you say you have a pre-trained model (which you refer to already trained), your network already 'knows' bounding boxes for certain object classes and it tries to approximate where the object might be in new image but while doing so your network might predict bounding box somewhere else than its supposed to be. So how do you calculate how much is the box 'somewhere else'? IOU to the rescue! What IOU (Intersection Over Union) does is, it gets you a score of area of overlap over area of union.

IOU = Area of Overlap / Area of Union

While it's rarely perfect or 1. Its somewhat closer, the lesser the value of IOU, the worse YOLO is predicting the bounding box with reference to ground truth. IOU Score of 1 means the bounding box is accurately or very confidently predicted with reference to ground truth.

0

YOLO uses IOU to measure weights for training.When you searched what's IOU it like that.How IoU works

So when training this IoU scores calculate the prediction on validation data.It means

(Prediction of object)*IoU score

Hope it'll helps you.

1
  • But what are the 2 boxes? One is the prediction, the other is the ground truth. From what I understand, this value is calculated every time, even on inference mode. So, even when I use my network on an image without label, it gives me a confidence. But what is the second box? What is the ground truth if I don't have any labels? May 3, 2018 at 13:59
0

I think all you need is a good image that clarifies what is the ground truth.

enter image description here

As you may see on the left the rectangle that perfectly envelopes the object is the ground truth (the blue one).

The orange rectangle is the predicted one. The IoU is what you can visually understand from the right hand side of the image.

Hope this helps.

0

I think I know the answer Guess YOLO uses IoU in 2 cases for different gooals 1- to asses prediction while training 2- when you use already trained model, sometimes you get many boxes for the same object. I have red that This is the way YOLO tackles this issue (not sure if this is a part of Non Maximum Suppresion)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.