IoU is way to measure how much two areas overlap. As said in the comments IoU is used as a threshold parameter for NMS, so You could decide how much common space two areas have to have to be considered as overlapping.
- According to first YoLo paper IoU is used first time to calculate confidence score for each bounding box according to the formula:
Confidence is 5th parameter in prediction vector: (x, y, w, h, c)
predicted for every bounding box and it tells how good the bounding box is according to ground truth. Thanks to usage of IoU, confidence gives the full information about bounding box position, dimensions and its class probability.
- Using NMS algorithm to merge overlapping boxes is very popular technique in object detection algorithms. However in original YoLo architecture You can see that output is a tensor of
SxSx(B*5+C)
where SxS
are grid dimensions, B
is number of bounding boxes per grid and C
is number of possible classes. 5
is there because it's the length of prediction vector. It means that output tensor is constant, and You have to analyze the results it gives by yourself.
Authors claim that
Non-maximal suppression can be used to fix these multiple detections. While not critical to performance as it is for R-CNN or DPM,
non-maximal suppression adds 2- 3% in mAP.
Reading the VOC 2007 Error Analysis
section of the Yolo paper also might be useful.
Hope it helps.