[Glean] IoU and NMS

Published: by Creative Commons Licence (Last updated: )

IoU and NMS

Intersection over Union (IoU)

Intersection over Union is an evaluation metric used to measure the accuracy of an object detector on a particular dataset.1

Computing the Intersection over Union is as simple as dividing the area  of overlap between the bounding boxes by the area of union

Non-maximum Suppression (NMS)

NMS is a technique to remove duplicates and false positives in object detection.

Algorithm:

  1. Select the proposal with highest confidence score, remove it from B and add it to the final proposal list D. (Initially D is empty).
  2. Now compare this proposal with all the proposals — calculate the IOU (Intersection over Union) of this proposal with every other proposal. If the IOU is greater than the threshold N, remove that proposal from B.
  3. Again take the proposal with the highest confidence from the remaining proposals in B and remove it from B and add it to D.
  4. Once again calculate the IOU of this proposal with all the proposals in B and eliminate the boxes which have high IOU than threshold.
  5. This process is repeated until there are no more proposals left in B.

NMS Algorithm

  1. https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/