tf.raw_ops.GenerateBoundingBoxProposals

This op produces Region of Interests from given bounding boxes(bbox_deltas) encoded wrt anchors according to eq.2 in arXiv:1506.01497

The op selects top `pre_nms_topn` scoring boxes, decodes them with respect to anchors,
applies non-maximal suppression on overlapping boxes with higher than
`nms_threshold` intersection-over-union (iou) value, discarding boxes where shorter
side is less than `min_size`.
Inputs:
`scores`: A 4D tensor of shape [Batch, Height, Width, Num Anchors] containing the scores per anchor at given position
`bbox_deltas`: is a tensor of shape [Batch, Height, Width, 4 x Num Anchors] boxes encoded to each anchor
`anchors`: A 1D tensor of shape [4 x Num Anchors], representing the anchors.
Outputs:
`rois`: output RoIs, a 3D tensor of shape [Batch, post_nms_topn, 4], padded by 0 if less than post_nms_topn candidates found.
`roi_probabilities`: probability scores of each roi in 'rois', a 2D tensor of shape [Batch,post_nms_topn], padded with 0 if needed, sorted by scores.
Args
scores A Tensor of type float32. A 4-D float tensor of shape [num_images, height, width, num_achors] containing scores of the boxes for given anchors, can be unsorted.
bbox_deltas A Tensor of type float32. A 4-D float tensor of shape [num_images, height, width, 4 x num_anchors]. encoding boxes with respec to each anchor. Coordinates are given in the form [dy, dx, dh, dw].
image_info A Tensor of type float32. A 2-D float tensor of shape [num_images, 5] containing image information Height, Width, Scale.
anchors A Tensor of type float32. A 2-D float tensor of shape [num_anchors, 4] describing the anchor boxes. Boxes are formatted in the form [y1, x1, y2, x2].
nms_threshold A Tensor of type float32. A scalar float tensor for non-maximal-suppression threshold.
pre_nms_topn A Tensor of type int32. A scalar int tensor for the number of top scoring boxes to be used as input.
min_size A Tensor of type float32. A scalar float tensor. Any box that has a smaller size than min_size will be discarded.
post_nms_topn An optional int. Defaults to 300. An integer. Maximum number of rois in the output.
name A name for the operation (optional).
Returns
A tuple of Tensor objects (rois, roi_probabilities).
rois A Tensor of type float32.
roi_probabilities A Tensor of type float32.

© 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.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/raw_ops/GenerateBoundingBoxProposals