NonMaxSuppression
Description
Filters the optimal boundary box from the many overlapping candidate boundary boxes, and filters out the boxes that have high intersection-over-union (IOU) overlap with the previously selected boxes. Bounding boxes with score less than score_threshold are removed. The bounding box format is indicated by the center_point_box attribute.
The algorithm is independent of the origin of the coordinate system, and the orthogonal transformation and translation operations of the coordinate system remain unchanged. The output selected_indices is an integer set. The corresponding bounding box coordinates can be obtained through the Gather or GatherND operation.
Input
- boxes: tensor of type float, for storing information about candidate bounding boxes.
- scores: input tensor of type float, indicating the confidence scores of the candidate bounding box.
- max_output_boxes_per_class (optional): a constant of type int64, indicating the maximum number of bounding boxes that can be selected for each type.
- iou_threshold (optional): a constant of type float, indicating the IOU overlap threshold.
- score_threshold (optional): a constant value of type float, indicating the confidence threshold.
Attribute
center_point_box: int, determining the bounding box format. The default value is 0.
- When the value is 0, it is mainly used for the TF model. The data is provided in the form of (y1, x1, y2, x2), where (y1, x1) (y2, x2) is the coordinate of the diagonal box. Ensure that x1 is less than x2 and y1 is less than y2.
- When the value is 1, it is mainly used for the PyTorch model. The box data is provided in the (x_center, y_center, width, height) format.
Output
selected_indices: output tensor of type int64.
Constraints
- The
Atlas 200/300/500 inference products andAtlas training products support only the float16 data input to boxes and scores. - If the value of max_output_boxes_per_class is greater than 700, hardware resources may be insufficient.
ONNX Opset Support
Opset v11/v12/v13/v14/v15/v16/v17/v18.