|View source on GitHub|
Greedily selects a subset of bounding boxes in descending order of score.
Compat aliases for migration
See Migration guide for more details.
tf.image.combined_non_max_suppression( boxes, scores, max_output_size_per_class, max_total_size, iou_threshold=0.5, score_threshold=float('-inf'), pad_per_class=False, clip_boxes=True, name=None )
This operation performs non_max_suppression on the inputs per batch, across all classes. Prunes away boxes that have high intersection-over-union (IOU) overlap with previously selected boxes. Bounding boxes are supplied as [y1, x1, y2, x2], where (y1, x1) and (y2, x2) are the coordinates of any diagonal pair of box corners and the coordinates can be provided as normalized (i.e., lying in the interval [0, 1]) or absolute. Note that this algorithm is agnostic to where the origin is in the coordinate system. Also note that this algorithm is invariant to orthogonal transformations and translations of the coordinate system; thus translating or reflections of the coordinate system result in the same boxes being selected by the algorithm. The output of this operation is the final boxes, scores and classes tensor returned after performing non_max_suppression.
| || A 4-D float |
| || A 3-D float |
| || A scalar integer |
| ||A scalar representing the maximum number of boxes retained over all classes.|
| ||A float representing the threshold for deciding whether boxes overlap too much with respect to IOU.|
| ||A float representing the threshold for deciding when to remove boxes based on score.|
| || If false, the output nmsed boxes, scores and classes are padded/clipped to |
| ||If true, the coordinates of output nmsed boxes will be clipped to [0, 1]. If false, output the box coordinates as it is. Defaults to true.|
| ||A name for the operation (optional).|
| ||A [batch_size, max_detections, 4] float32 tensor containing the non-max suppressed boxes.|
| ||A [batch_size, max_detections] float32 tensor containing the scores for the boxes.|
| ||A [batch_size, max_detections] float32 tensor containing the class for boxes.|
| ||A [batch_size] int32 tensor indicating the number of valid detections per batch item. Only the top valid_detections[i] entries in nms_boxes[i], nms_scores[i] and nms_class[i] are valid. The rest of the entries are zero paddings.|
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.