# YOLO: How many bounding boxes?

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".

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.

1. Discard bounding box which has low confidence score. Say less than 0.6. 2. Now pic the grid having highest confidence score. As mentioned below:  