Versioned name: NonMaxSuppression-4
Category: Sorting and maximization
Short description: NonMaxSuppression performs non maximum suppression of the boxes with predicted scores.
Detailed description: NonMaxSuppression 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
- tensor of type T and shape [num_batches, num_boxes, 4]
with box coordinates. Required.scores
- tensor of type T and shape [num_batches, num_classes, num_boxes]
with box scores. Required.max_output_boxes_per_class
- scalar tensor of type T_MAX_BOXES specifying maximum number of boxes to be selected per class. Optional with default value 0 meaning select no boxes.iou_threshold
- scalar tensor of type T_THRESHOLDS specifying intersection over union threshold. Optional with default value 0 meaning keep all boxes.score_threshold
- scalar tensor of type T_THRESHOLDS specifying minimum score to consider box for the processing. Optional with default value 0.Outputs:
selected_indices
- tensor of type T_IND and shape [min(num_boxes, max_output_boxes_per_class) * num_batches * 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.Types
int64
or int32
.Example