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:
score_threshold
then stop. Otherwise add the box to the output and continue to the next step.iou_threshold
threshold then remove the input box from further consideration.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:
[y1, x1, y2, x2]
where (y1, x1)
and (y2, x2)
are the coordinates of any diagonal pair of box corners.[x_center, y_center, width, height]
.Inputs:
boxes
- floating point tensor of shape [num_batches, num_boxes, 4]
with box coordinates. Required.scores
- floating point tensor of shape [num_batches, num_classes, num_boxes]
with box scores. Required.max_output_boxes_per_class
- integer scalar tensor specifying maximum number of boxes to be selected per class. Optional with default value 0 meaning select no boxes.iou_threshold
- floating point scalar tensor specifying intersection over union threshold. Optional with default value 0 meaning keep all boxes.score_threshold
- floating point scalar tensor specifying minimum score to consider box for the processing. Optional with default value 0.Outputs:
selected_indices
- integer tensor of shape [min(num_boxes, max_output_boxes_per_class * num_classes), 3]
containing information about selected boxes as triplets [batch_index, class_index, box_index]
. The output tensor is filled with -1s for output tensor elements if the total number of selected boxes is less than the output tensor size.Example