2021-12-21 20:26:37 +03:00
|
|
|
# ExperimentalDetectronPriorGridGenerator {#openvino_docs_ops_detection_ExperimentalDetectronPriorGridGenerator_6}
|
2021-03-26 06:49:37 +03:00
|
|
|
|
|
|
|
|
**Versioned name**: *ExperimentalDetectronPriorGridGenerator-6*
|
|
|
|
|
|
2021-08-23 12:12:46 +02:00
|
|
|
**Category**: *Object detection*
|
2021-03-26 06:49:37 +03:00
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
**Short description**: The *ExperimentalDetectronPriorGridGenerator* operation generates prior grids of specified sizes.
|
2021-03-26 06:49:37 +03:00
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
**Detailed description**: The operation takes coordinates of centres of boxes and adds strides with offset `0.5` to them to
|
2021-03-26 06:49:37 +03:00
|
|
|
calculate coordinates of prior grids.
|
|
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
Numbers of generated cells is `featmap_height` and `featmap_width` if *h* and *w* are zeroes; otherwise, *h* and *w*,
|
|
|
|
|
respectively. Steps of generated grid are `image_height` / `layer_height` and `image_width` / `layer_width` if
|
2021-04-06 17:34:12 +03:00
|
|
|
*stride_h* and *stride_w* are zeroes; otherwise, *stride_h* and *stride_w*, respectively.
|
2021-03-26 06:49:37 +03:00
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
`featmap_height`, `featmap_width`, `image_height` and `image_width` are spatial dimensions values from second and third
|
2021-04-06 17:34:12 +03:00
|
|
|
inputs, respectively.
|
2021-03-26 06:49:37 +03:00
|
|
|
|
|
|
|
|
**Attributes**:
|
|
|
|
|
|
|
|
|
|
* *flatten*
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **Description**: The *flatten* attribute specifies whether the output tensor should be 2D or 4D.
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Range of values**:
|
2021-04-06 17:34:12 +03:00
|
|
|
* `true` - the output tensor should be a 2D tensor
|
|
|
|
|
* `false` - the output tensor should be a 4D tensor
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Type**: boolean
|
|
|
|
|
* **Default value**: true
|
|
|
|
|
* **Required**: *no*
|
|
|
|
|
|
|
|
|
|
* *h*
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **Description**: The *h* attribute specifies number of cells of the generated grid with respect to height.
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Range of values**: non-negative integer number less or equal than `featmap_height`
|
|
|
|
|
* **Type**: int
|
|
|
|
|
* **Default value**: 0
|
|
|
|
|
* **Required**: *no*
|
2021-07-15 09:17:23 +02:00
|
|
|
|
2021-03-26 06:49:37 +03:00
|
|
|
* *w*
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **Description**: The *w* attribute specifies number of cells of the generated grid with respect to width.
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Range of values**: non-negative integer number less or equal than `featmap_width`
|
|
|
|
|
* **Type**: int
|
|
|
|
|
* **Default value**: 0
|
|
|
|
|
* **Required**: *no*
|
|
|
|
|
|
|
|
|
|
* *stride_x*
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **Description**: The *stride_x* attribute specifies the step of generated grid with respect to x coordinate.
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Range of values**: non-negative float number
|
|
|
|
|
* **Type**: float
|
|
|
|
|
* **Default value**: 0.0
|
|
|
|
|
* **Required**: *no*
|
2021-07-15 09:17:23 +02:00
|
|
|
|
2021-03-26 06:49:37 +03:00
|
|
|
* *stride_y*
|
|
|
|
|
|
2021-04-06 17:34:12 +03:00
|
|
|
* **Description**: The *stride_y* attribute specifies the step of generated grid with respect to y coordinate.
|
2021-03-26 06:49:37 +03:00
|
|
|
* **Range of values**: non-negative float number
|
|
|
|
|
* **Type**: float
|
|
|
|
|
* **Default value**: 0.0
|
|
|
|
|
* **Required**: *no*
|
|
|
|
|
|
|
|
|
|
**Inputs**
|
|
|
|
|
|
|
|
|
|
* **1**: A 2D tensor of type *T* with shape `[number_of_priors, 4]` contains priors. **Required.**
|
|
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
* **2**: A 4D tensor of type *T* with input feature map `[1, number_of_channels, featmap_height, featmap_width]`. This
|
2021-03-26 06:49:37 +03:00
|
|
|
operation uses only sizes of this input tensor, not its data.**Required.**
|
|
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
* **3**: A 4D tensor of type *T* with input image `[1, number_of_channels, image_height, image_width]`. The number of
|
|
|
|
|
channels of both feature map and input image tensors must match. This operation uses only sizes of this input tensor,
|
2021-03-26 06:49:37 +03:00
|
|
|
not its data. **Required.**
|
|
|
|
|
|
|
|
|
|
**Outputs**
|
|
|
|
|
|
2021-07-15 09:17:23 +02:00
|
|
|
* **1**: A tensor of type *T* with priors grid with shape `[featmap_height * featmap_width * number_of_priors, 4]`
|
2021-04-06 17:34:12 +03:00
|
|
|
if flatten is `true` or `[featmap_height, featmap_width, number_of_priors, 4]`, otherwise.
|
2021-07-15 09:17:23 +02:00
|
|
|
If 0 < *h* < `featmap_height` and/or 0 < *w* < `featmap_width` the output data size is less than
|
|
|
|
|
`featmap_height` * `featmap_width` * `number_of_priors` * 4 and the output tensor is filled with undefined values for
|
2021-03-26 06:49:37 +03:00
|
|
|
rest output tensor elements.
|
|
|
|
|
|
|
|
|
|
**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="ExperimentalDetectronPriorGridGenerator" version="opset6">
|
|
|
|
|
<data flatten="true" h="0" stride_x="32.0" stride_y="32.0" w="0"/>
|
|
|
|
|
<input>
|
|
|
|
|
<port id="0">
|
|
|
|
|
<dim>3</dim>
|
|
|
|
|
<dim>4</dim>
|
|
|
|
|
</port>
|
|
|
|
|
<port id="1">
|
|
|
|
|
<dim>1</dim>
|
|
|
|
|
<dim>256</dim>
|
|
|
|
|
<dim>25</dim>
|
|
|
|
|
<dim>42</dim>
|
|
|
|
|
</port>
|
|
|
|
|
<port id="2">
|
|
|
|
|
<dim>1</dim>
|
|
|
|
|
<dim>3</dim>
|
|
|
|
|
<dim>800</dim>
|
|
|
|
|
<dim>1344</dim>
|
|
|
|
|
</port>
|
|
|
|
|
</input>
|
|
|
|
|
<output>
|
|
|
|
|
<port id="3" precision="FP32">
|
|
|
|
|
<dim>3150</dim>
|
|
|
|
|
<dim>4</dim>
|
|
|
|
|
</port>
|
|
|
|
|
</output>
|
|
|
|
|
</layer>
|
|
|
|
|
```
|