1
$\begingroup$

Hello I am trying to implement Non Max suppression algorithm for removing overlapping bounding boxes. I have a list of bounding detected by an object detector in the format B(x,y,w,h,s) x,y are coordinates, w,h are size, and s is confidence score. Aim of NMS is to remove overlapping boxes and retaining only ones with high confidence score.

For that I came across 2 approaches:

  1. Brute Force approach: Compute IOU (Intersection-over-Union, a metric to measure overlap) of every two boxes in the list. For every pair having IOU greater than threshold, remove the box with low confidence score
  2. GreedyNMS: Sort the list in descending order of score. pick the box with highest score and discard all the boxes overlapping with highest one with IOU> threshold. Repeat till end of the list.

I found that the greedy approach this way does not give same result as Brute force. It fails to remove boxes with low score which have low overlap with highest scored box.

Now here is my issue, I came up with a modified version of the above GreedyNMS. I traverse the list in ascending order. This gave me same results as brute force for all the cases I tested. But I am trying to establish that both give exactly same result theoretically. Brute Force approach

$\endgroup$

1 Answer 1

1
$\begingroup$

Your description of the problem and your solutions are not very accurate. I will rephrase as follows: "any rectangle that has a sufficient overlap with another rectangle of a higher score must be discarded".

With this interpretation, you have to proceed by increasing scores, to make sure that you don't discard a rectangle before you compare it to lower ones.

$\endgroup$
1
  • $\begingroup$ @D.W.: I just said by increasing scores to mean that high scores may not be deleted before low scores. But I did not specify any precise method. Overlap detection acceleration techniques can be integrated. $\endgroup$
    – user16034
    Sep 19, 2023 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.