bharatsingh430 / soft-nms

Object Detection
779 stars 227 forks source link

How to use soft-nms with SSD? #5

Closed bailvwangzi closed 7 years ago

bailvwangzi commented 7 years ago

there is a default parameter threshold = 0.001 for RCNN, def soft_nms(dets, sigma=0.5, Nt=0.3, threshold=0.001, method=1): which is not accord with SSD ? i got result mAP = 53% worse than 78% with NMS

bharatsingh430 commented 7 years ago

NMS cannot affect AP by 25%. There should be something incorrect in the implementation

bailvwangzi commented 7 years ago

NMS: nms

Soft-NMS: soft-nms

i don't understand why soft-nms mAP is better as there are more false positive. Thanks for your explaintation.

bharatsingh430 commented 7 years ago

As you can see, the false positives have a very low score. If you apply a detection threshold of 0.6, these false positives will not be there for both NMS and Soft-NMS. At a score of 0.15 or even 0.4, NMS in other images will also have many many false positives. At these scores, what matters more is weather you can cover more objects at a lower threshold or not. NMS typically misses objects at a low score, while soft-nms is able to retain them, especially at higher overlap thresholds. The paper explains these things in more detail.

bailvwangzi commented 7 years ago

@bharatsingh430 I use soft-NMS with SSD, now I get mAP = 78.4% with NMS while mAP = 78.3% with soft-NMS, a little lower, is this normal?

bharatsingh430 commented 7 years ago

We are going to update the arXiv version. We mention in the updated draft that only under the COCO evaluation metric, you would observe improvement of 0.5% mAP with SSD/YOLO. This is because they are not proposal based. For faster-rcnn, r-fcn, deformable r-fcn, which are proposal based, you should notice more improvement.

408550969 commented 6 years ago

Hi,I use soft-NMS with SSD but I only get 77.1% mAP while the NMS is 77.7%(Pascal Voc 2007 with NMS_threshold: 0.45 Confidence_threshold:0.01). Does anyone implement soft-NMS on SSD?And can anyone share the code?

foralliance commented 6 years ago

@bailvwangzi ,@408550969 ,@bharatsingh430

If I want to implement soft_nms in SSD, what code should I change?? many many thanks!!

Qinying-Liu commented 6 years ago

@bailvwangzi I replaced nms with soft-nms in a framework just like SSD,but got a fairly worse mAP. It seem happend to you in your fisrt case( 53% Vs 78%), too. So I wonder how you fixed it. Any help will be appreciated.

ujsyehao commented 5 years ago

@foralliance You can refer here