This op produces Region of Interests from given bounding boxes(bbox_deltas) encoded wrt anchors according to eq.2 in arXiv:1506.01497
tf.raw_ops.GenerateBoundingBoxProposals( scores, bbox_deltas, image_info, anchors, nms_threshold, pre_nms_topn, min_size, post_nms_topn=300, name=None )
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.
Returns | |
---|---|
A tuple of Tensor objects (rois, roi_probabilities). | |
rois | A Tensor of type float32 . |
roi_probabilities | A Tensor of type float32 . |