2021-03-26 06:49:37 +03:00
|
|
|
## ExperimentalDetectronGenerateProposalsSingleImage <a name="ExperimentalDetectronGenerateProposalsSingleImage"></a> {#openvino_docs_ops_detection_ExperimentalDetectronGenerateProposalsSingleImage_6}
|
|
|
|
|
|
|
|
|
|
**Versioned name**: *ExperimentalDetectronGenerateProposalsSingleImage-6*
|
|
|
|
|
|
|
|
|
|
**Category**: Object detection
|
|
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
**Short description**: The *ExperimentalDetectronGenerateProposalsSingleImage* operation computes ROIs and their scores
|
2021-03-26 06:49:37 +03:00
|
|
|
based on input data.
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
**Detailed description**: The operation performs the following steps:
|
2021-03-26 06:49:37 +03:00
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
1. Transposes and reshapes predicted bounding boxes deltas and scores to get them into the same order as the anchors.
|
|
|
|
|
2. Transforms anchors into proposals using deltas and clips proposals to an image.
|
|
|
|
|
3. Removes predicted boxes with either height or width < *min_size*.
|
|
|
|
|
4. Sorts all `(proposal, score)` pairs by score from highest to lowest; order of pairs with equal scores is undefined.
|
|
|
|
|
5. Takes top *pre_nms_count* proposals, if total number of proposals is less than *pre_nms_count* takes all proposals.
|
|
|
|
|
6. Applies non-maximum suppression with *nms_threshold*.
|
2021-07-15 09:17:23 +02:00
|
|
|
7. Takes top *post_nms_count* proposals and returns these top proposals and their scores. If total number of proposals
|
2021-04-06 17:34:12 +03:00
|
|
|
is less than *post_nms_count* returns output tensors filled with zeroes.
|
2021-03-26 06:49:37 +03:00
|
|
|
|
|
|
|
|
**Attributes**:
|
|
|
|
|
|
|
|
|
|
* *min_size*
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **Description**: The *min_size* attribute specifies minimum box width and height.
|
2021-07-16 06:48:45 +02:00
|
|
|
* **Range of values**: non-negative floating-point number
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Type**: float
|
|
|
|
|
* **Default value**: None
|
|
|
|
|
* **Required**: *yes*
|
|
|
|
|
|
|
|
|
|
* *nms_threshold*
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **Description**: The *nms_threshold* attribute specifies threshold to be used in the NMS stage.
|
2021-07-16 06:48:45 +02:00
|
|
|
* **Range of values**: non-negative floating-point number
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Type**: float
|
|
|
|
|
* **Default value**: None
|
|
|
|
|
* **Required**: *yes*
|
|
|
|
|
|
|
|
|
|
* *pre_nms_count*
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **Description**: The *pre_nms_count* attribute specifies number of top-n proposals before NMS.
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Range of values**: non-negative integer number
|
|
|
|
|
* **Type**: int
|
|
|
|
|
* **Default value**: None
|
|
|
|
|
* **Required**: *yes*
|
|
|
|
|
|
|
|
|
|
* *post_nms_count*
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **Description**: The *post_nms_count* attribute specifies number of top-n proposals after NMS.
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Range of values**: non-negative integer number
|
|
|
|
|
* **Type**: int
|
|
|
|
|
* **Default value**: None
|
|
|
|
|
* **Required**: *yes*
|
|
|
|
|
|
|
|
|
|
**Inputs**
|
|
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
* **1**: A 1D tensor of type *T* with 3 elements `[image_height, image_width, scale_height_and_width]` providing input
|
2021-03-26 06:49:37 +03:00
|
|
|
image size info. **Required.**
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **2**: A 2D tensor of type *T* with shape `[height * width * number_of_channels, 4]` providing anchors. **Required.**
|
2021-03-26 06:49:37 +03:00
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
* **3**: A 3D tensor of type *T* with shape `[number_of_channels * 4, height, width]` providing deltas for anchors.
|
2021-03-26 06:49:37 +03:00
|
|
|
Height and width for third and fourth inputs should be equal. **Required.**
|
|
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
* **4**: A 3D tensor of type *T* with shape `[number_of_channels, height, width]` providing proposals scores.
|
2021-03-26 06:49:37 +03:00
|
|
|
**Required.**
|
|
|
|
|
|
|
|
|
|
**Outputs**
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **1**: A 2D tensor of type *T* with shape `[post_nms_count, 4]` providing ROIs.
|
2021-03-26 06:49:37 +03:00
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **2**: A 1D tensor of type *T* with shape `[post_nms_count]` providing ROIs scores.
|
2021-03-26 06:49:37 +03:00
|
|
|
|
|
|
|
|
**Types**
|
|
|
|
|
|
2021-07-16 06:48:45 +02:00
|
|
|
* *T*: any supported floating-point type.
|
2021-03-26 06:49:37 +03:00
|
|
|
|
|
|
|
|
**Example**
|
|
|
|
|
|
|
|
|
|
```xml
|
|
|
|
|
<layer ... type="ExperimentalDetectronGenerateProposalsSingleImage" version="opset6">
|
|
|
|
|
<data min_size="0.0" nms_threshold="0.699999988079071" post_nms_count="1000" pre_nms_count="1000"/>
|
|
|
|
|
<input>
|
|
|
|
|
<port id="0">
|
|
|
|
|
<dim>3</dim>
|
|
|
|
|
</port>
|
|
|
|
|
<port id="1">
|
|
|
|
|
<dim>12600</dim>
|
|
|
|
|
<dim>4</dim>
|
|
|
|
|
</port>
|
|
|
|
|
<port id="2">
|
|
|
|
|
<dim>12</dim>
|
|
|
|
|
<dim>50</dim>
|
|
|
|
|
<dim>84</dim>
|
|
|
|
|
</port>
|
|
|
|
|
<port id="3">
|
|
|
|
|
<dim>3</dim>
|
|
|
|
|
<dim>50</dim>
|
|
|
|
|
<dim>84</dim>
|
|
|
|
|
</port>
|
|
|
|
|
</input>
|
|
|
|
|
<output>
|
|
|
|
|
<port id="4" precision="FP32">
|
|
|
|
|
<dim>1000</dim>
|
|
|
|
|
<dim>4</dim>
|
|
|
|
|
</port>
|
|
|
|
|
<port id="5" precision="FP32">
|
|
|
|
|
<dim>1000</dim>
|
|
|
|
|
</port>
|
|
|
|
|
</output>
|
|
|
|
|
</layer>
|
|
|
|
|
```
|