Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regarding non-max suppression in README #1

Closed
Denielll opened this issue Jul 18, 2018 · 3 comments
Closed

regarding non-max suppression in README #1

Denielll opened this issue Jul 18, 2018 · 3 comments
Assignees

Comments

@Denielll
Copy link

Hi,

Thank you for the writeup ! It's really useful.
I have one question regarding non-max suppression interpretation you wrote in README :

You mentioned..

1,Select the box that has the highest score.
2,Compute its overlap with all other boxes, and remove boxes that overlap it more than iou_threshold.
3,Iterate until there's no more boxes with a lower score than the current selected box.

My question is about step3.
What if there is a ,say, car in the up right corner of the pic with prob = 0.8, and another car in the up left corner of the pic with prob = 0.6. They are not overlapped. ( IOU = 0 )
We should keep both of them

But...if we do as what step3 says, the algorithm will remove the prob = 0.6 box right ?

@tejaslodaya
Copy link
Owner

tejaslodaya commented Jul 18, 2018

Hi @Denielll ,
Thanks for reading my write-up. Really appreciate it.

The steps are as follows:

  1. Select the box with highest score.
  2. Compute its overlap with all other boxes, and remove boxes that overlap it more than iou_threshold.
  3. Iterate over all the boxes which have an overlap with the selected box until there's no more boxes with a lower score than the current selected box.
    (notice the rephrase in step3)

Coming to your example.
Suppose p(box1) = 0.9 and p(box2) = 0.6 but iou(box1, box2) = 0.
The steps it follows are:

  1. It will select the box1 since it has highest score
  2. Since there's no overlap, box1 is selected.

Now, box2 is selected next since it is the next box with the highest score.
Follow the above steps and repeat.

Let me know if it makes sense.

@Denielll
Copy link
Author

Wow, thanks for your prompt reply. Yeah it makes sense. Now I get it
Thank you !

@tejaslodaya tejaslodaya self-assigned this Jul 18, 2018
@tejaslodaya
Copy link
Owner

Thanks @Denielll ,
Updated README for clarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants