easy-faster-rcnn.pytorch icon indicating copy to clipboard operation
easy-faster-rcnn.pytorch copied to clipboard

About the NMS

Open DrugRui opened this issue 6 years ago • 5 comments

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)

DrugRui avatar Jun 04 '19 03:06 DrugRui

  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)

potterhsu avatar Jun 04 '19 09:06 potterhsu

Thank you for your reply. It is useful to me

DrugRui avatar Jun 04 '19 11:06 DrugRui

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)

DrugRui avatar Jun 04 '19 12:06 DrugRui

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

potterhsu avatar Jun 05 '19 05:06 potterhsu

Well, thanks a lot for your help.

DrugRui avatar Jun 05 '19 08:06 DrugRui