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

I'm confused.
From 98 boxes to 3 boxes, it involve many other things as well. 


  
  x*y*2 = 98, where 2 are the anchor boxes i.e. each grid will predict two bounding box. 
  Non Max Suppression: As correctly said by you, discard those boxes which have lesser probability. You can set some threshold value.
  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:
  
  
  Discard bounding box which has low confidence score. Say less than 0.6.
  
  Now pic the grid having highest confidence score. As mentioned below: 
  Here 0.9 confidence score has been picked up.
  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. 
  
  
  
  
  
  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.