In the research paper, for S=7,B=2, the model predicts 2 bounding boxes for every 7x7 grid cell hence 7x7x2=98 images are predicted per image. Yet the demo output image only has 3 boxes. Why is that?

My theory is that since thickness of the lines is proportionate to the confidence scores of the bounding box, after the model is trained, the "lousy" bounding boxes are so thin that they don't even appear.

The paper also says "Often it is clear which grid cell an object falls in to and the network only predicts one box for each object".

I'm confused. output image


1 Answer 1


From 98 boxes to 3 boxes, it involve many other things as well.

  1. x*y*2 = 98, where 2 are the anchor boxes i.e. each grid will predict two bounding box.
  2. Non Max Suppression: As correctly said by you, discard those boxes which have lesser probability. You can set some threshold value.
  3. IOU (Intersection over Union): Step used to identify and discard the overlapping boxes.

Once you done all these activities you will get 3 final boxes.

More about the complete process:

  1. Discard bounding box which has low confidence score. Say less than 0.6. enter image description here

  2. Now pic the grid having highest confidence score. As mentioned below: enter image description here

  3. Here 0.9 confidence score has been picked up.
  4. Now identify all those girds which has IoU score greater than some threshold, say 0.5. Here highlighted in dark blue and discard such grids.

enter image description here

  1. Still left some grids which predicts the object say car, but IoU is low that is not yet discarded. Repeat such process from step 2 again, until we left no such grid.

Note: Suggest you to read more about last two process as it involve the core concept of identifying the bounding boxes.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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