Non-Maximum Suppression (NMS)

Non-max suppression is the final step of these Object Detection algorithms and is used to select the most appropriate bounding box for the object. NMS makes sure we only detect object only once.

  • We have this because usually, several bounding boxes are generated from the model, and they overlap a lot. NMS makes sure that we don’t have too many bboxes generated.

Choose the bbox with the highest IoU, and suppress the other ones.


Independently carry out NMS for each of the classes, using the following algorithm (per class):

  • Discard all bboxes with
  • While there are remaining bboxes:
    • pick the bbox with largest , and output that as prediction
    • Discord remaining bboxes with IoU > 0.5 with the bbox above