# GenerateBoundingBoxProposals

public final class **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.

<br />

### Nested Classes

|---|---|---|---|
| class | [GenerateBoundingBoxProposals.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals.Options) || Optional attributes for `https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals` |

### Public Methods

|---|---|
| static [GenerateBoundingBoxProposals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals) | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<java.lang.Float>,%20org.tensorflow.Operand<java.lang.Float>,%20org.tensorflow.Operand<java.lang.Float>,%20org.tensorflow.Operand<java.lang.Float>,%20org.tensorflow.Operand<java.lang.Float>,%20org.tensorflow.Operand<java.lang.Integer>,%20org.tensorflow.Operand<java.lang.Float>,%20org.tensorflow.op.core.GenerateBoundingBoxProposals.Options...))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> scores, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> bboxDeltas, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> imageInfo, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> anchors, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> nmsThreshold, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> preNmsTopn, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> minSize, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals.Options) options) Factory method to create a class wrapping a new GenerateBoundingBoxProposals operation. |
| static [GenerateBoundingBoxProposals.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals.Options) | [postNmsTopn](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals#postNmsTopn(java.lang.Long))(Long postNmsTopn) |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<Float\> | [roiProbabilities](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals#roiProbabilities())() A 2-D float tensor of shape \`\[num_images, post_nms_topn\]\` representing the score of the region of interest box in \`rois\` tensor at the same index. |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<Float\> | [rois](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals#rois())() A 3-D float tensor of shape \`\[num_images,post_nms_topn,4\]\` representing the selected region of interest boxes. |

### Inherited Methods

From class [org.tensorflow.op.PrimitiveOp](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp)

|---|---|
| final boolean | [equals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#equals(java.lang.Object))(Object obj) |
| final int | [hashCode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#hashCode())() |
| [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation) | [op](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#op())() Returns the underlying `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation` |
| final String | [toString](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#toString())() |

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Public Methods

#### public static [GenerateBoundingBoxProposals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals)
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> scores, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> bboxDeltas, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> imageInfo, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> anchors, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> nmsThreshold, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> preNmsTopn, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> minSize, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals.Options) options)

Factory method to create a class wrapping a new GenerateBoundingBoxProposals operation.

##### Parameters

| scope | current scope |
| 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. |
| bboxDeltas | 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\]. |
| imageInfo | 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\]. |
| nmsThreshold | A scalar float tensor for non-maximal-suppression threshold. |
| preNmsTopn | A scalar int tensor for the number of top scoring boxes to be used as input. |
| minSize | A scalar float tensor. Any box that has a smaller size than min_size will be discarded. |
| options | carries optional attributes values |
|---|---|

##### Returns

- a new instance of GenerateBoundingBoxProposals

#### public static [GenerateBoundingBoxProposals.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/GenerateBoundingBoxProposals.Options)
**postNmsTopn**
(Long postNmsTopn)

<br />

##### Parameters

| postNmsTopn | An integer. Maximum number of rois in the output. |
|---|---|

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<Float\>
**roiProbabilities**
()

A 2-D float tensor of shape \`\[num_images, post_nms_topn\]\` representing the score of the
region of interest box in \`rois\` tensor at the same index.

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<Float\>
**rois**
()

A 3-D float tensor of shape \`\[num_images,post_nms_topn,4\]\` representing the selected
region of interest boxes. Sorted in descending order in scores.