Soft-NMS -- Improving Object Detection With One Line of Code
Navaneeth Bodla, Bharat Singh, Rama Chellappa, Larry S. Davis
{, }
Navaneeth Bodla, Bharat Singh, Rama Chellappa, Larry S. Davis
{, }
Non-maximum suppression is an integral part of the object detection pipeline.
Sort all detection boxes on the basis of their scores.
The detection box M with the maximum score is selected and all other detection boxes with a significant overlap (using a pre-defined threshold) with M are suppressed.
This process is recursively applied on the remaining boxes.
As per the design of the algorithm, if an object lies within the predefined overlap threshold, it leads to a miss.
An algorithm that decays the detection scores of all other objects as a continuous function of their overlap with M.
Soft-NMS just changes the NMS algorithm without any additional hyper-parameters by using Deformable-RFCN.
NMS sets a hard threshold while deciding what should be kept or removed from the neighborhood of M.
Non-maximum suppression starts with a list of detection boxes B with scores S.
After selecting the detection with the maximum score M, it removes it from the set B and appends it to the set of final detections D. It also removes any box that has an overlap greater than a threshold Nt with M in the set B.
This process is repeated for the remaining boxes B.
For human detection, Dalal and Triggs [4] demonstrated that a greedy NMS algorithm, where a bounding box with the maximum detection score is selected and its neighboring boxes are suppressed using a pre-defined overlap threshold improves performance over the approach used for face detection [29].
Since then, greedy NMS has been the de facto algorithm used in object detection [8, 10, 24, 16]
Rescoring Functions for Soft-NMS
Decaying the scores of other detection boxes which have an overlap with M seems to be a promising approach for improving NMS.
The scores for detection boxes which have a higher overlap with M should be decayed more, as they have a higher likelihood of being false positives.
The above function would decay the scores of detections above a threshold Nt as a linear function of overlap with M. Hence, detection boxes that are far away from M would not be affected and those that are very close would be assigned a greater penalty.
Update the pruning step with a Gaussian penalty function
It would be ideal if the penalty function was continuous, otherwise it could lead to abrupt changes to the ranked list of detections.
A continuous penalty function should have no penalty when there is no overlap and very high penalty at a high overlap. Also, when the overlap is low, it should increase the penalty gradually, as M should not affect the scores of boxes that have a very low overlap with it.
However, when the overlap of a box bi with M becomes close to one, bi should be significantly penalized.
This update rule is applied in each iteration and scores of all remaining detection boxes are updated.
The computational complexity for Soft-NMS is O(N2 ).
Open Images Dataset
COCO Dataset
IoU
Precision.
AP
Nt = 0.3 when using the linear weighting function.
σ = 0.5 with the Gaussian weighting function.
There are two versions of Soft-NMS:
Linear weighting function.
Gaussian weighting function.
n2 n0
θ