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

About the NMS #9

Open
DrugRui opened this issue Jun 4, 2019 · 5 comments
Open

About the NMS #9

DrugRui opened this issue Jun 4, 2019 · 5 comments

Comments

@DrugRui
Copy link

DrugRui commented Jun 4, 2019

Thanks for your clean and useful code implementation.I would like to consult you why 'class_bboxes' on the NMS are not arranged in descending order of 'class_probs' in 'model.py' when validating or testing. The code is as follows:
kept_indices = nms(class_bboxes, class_probs, threshold)

@potterhsu
Copy link
Owner

  1. First of all, the function nms has handled boxes sorting
  2. So that in generate_detections boxes doesn't require to sort before nms is called
  3. You might be confused by similar procedure in generate_proposals which has done sorting before nms, it's because that we want to take top N boxes and then pass to nms for the efficiency (note that #boxes between generate_detections and generate_proposals was different, typically <1k and >10k)

@DrugRui
Copy link
Author

DrugRui commented Jun 4, 2019

Thank you for your reply. It is useful to me

@DrugRui
Copy link
Author

DrugRui commented Jun 4, 2019

I have another question: why is the threshold of detection_probs for the verification phase very low, so that there are enough boxes involved in the calculation of map? As in the code in evaluator.py:
kept_indices = (detection_probs > 0.05).nonzero().view(-1)

@potterhsu
Copy link
Owner

Right, and this threshold is determined by reference to other popular repos, such as maskrcnn-benchmark

@DrugRui
Copy link
Author

DrugRui commented Jun 5, 2019

Well, thanks a lot for your help.

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