# tf.image.generate_bounding_box_proposals

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/ops/image_ops_impl.py#L5880-L5928) |

Generate bounding box proposals from encoded bounding boxes.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.image.generate_bounding_box_proposals`](https://www.tensorflow.org/api_docs/python/tf/image/generate_bounding_box_proposals)

<br />

    tf.image.generate_bounding_box_proposals(
        scores,
        bbox_deltas,
        image_info,
        anchors,
        nms_threshold=0.7,
        pre_nms_topn=6000,
        min_size=16,
        post_nms_topn=300,
        name=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `scores` | 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 4-D float `Tensor` of shape `[num_images, height, width, 4 x num_anchors]` encoding boxes with respect to each anchor. Coordinates are given in the form `[dy, dx, dh, dw]`. |
| `image_info` | A 2-D float `Tensor` of shape `[num_images, 5]` containing image information Height, Width, Scale. |
| `anchors` | 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 scalar float `Tensor` for non-maximal-suppression threshold. Defaults to 0.7. |
| `pre_nms_topn` | A scalar int `Tensor` for the number of top scoring boxes to be used as input. Defaults to 6000. |
| `min_size` | A scalar float `Tensor`. Any box that has a smaller size than min_size will be discarded. Defaults to 16. |
| `post_nms_topn` | An integer. Maximum number of rois in the output. |
| `name` | A name for this operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `rois` | Region of interest boxes sorted by their scores. |
| `roi_probabilities` | scores of the ROI boxes in the ROIs' `Tensor`. |

<br />