NonMaxSuppression

Versioned name: NonMaxSuppression-1

Category: Sorting and maximization

Short description: NonMaxSuppression performs non maximum suppression of the boxes with predicted scores.

Detailed description: NonMaxSuppression layer performs non maximum suppression algorithm as described below:

  1. Take the box with highest score. If the score is less than score_threshold then stop. Otherwise add the box to the output and continue to the next step.
  2. For each input box, calculate the IOU (intersection over union) with the box added during the previous step. If the value is greater than the iou_threshold threshold then remove the input box from further consideration.
  3. Return to step 1.

This algorithm is applied independently to each class of each batch element. The total number of output boxes for each class must not exceed max_output_boxes_per_class.

Attributes:

Inputs:

Outputs:

Example

<layer ... type="NonMaxSuppression" ... >
<data box_encoding="corner" sort_result_descending="1"/>
<input>
<port id="0">
<dim>1</dim>
<dim>1000</dim>
<dim>4</dim>
</port>
<port id="1">
<dim>1</dim>
<dim>1</dim>
<dim>1000</dim>
</port>
<port id="2"/>
<port id="3"/>
<port id="4"/>
</input>
<output>
<port id="5" precision="I32">
<dim>1000</dim>
<dim>3</dim>
</port>
</output>
</layer>