|
|
|
@ -1592,7 +1592,6 @@ selected indices from the boxes tensor, where M <= max_output_size. \n
|
|
|
|
|
*Compatible with onnx NonMaxSuppression operator.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
REG_OP(NonMaxSuppressionV7)
|
|
|
|
|
.INPUT(boxes, TensorType({DT_FLOAT16, DT_FLOAT}))
|
|
|
|
|
.INPUT(scores, TensorType({DT_FLOAT16, DT_FLOAT}))
|
|
|
|
@ -1649,6 +1648,84 @@ REG_OP(RoiExtractor)
|
|
|
|
|
.ATTR(aligned, Bool, true)
|
|
|
|
|
.OP_END_FACTORY_REG(RoiExtractor)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*@brief Performs Position Sensitive PS ROI Pooling . \n
|
|
|
|
|
|
|
|
|
|
*@par Inputs:
|
|
|
|
|
* Two inputs, including:
|
|
|
|
|
*@li x: An NC1HWC0 tensor of type float16 or float32, describing the feature
|
|
|
|
|
* map, dimension C1 must be equal to
|
|
|
|
|
* (int(output_dim+15)/C0))*group_size*group_size.
|
|
|
|
|
*@li rois: A tensor of type float16 or float32, with shape
|
|
|
|
|
* [batch, 5, rois_num], describing the ROIs, each ROI consists of five
|
|
|
|
|
* elements: "batch_id", "x1", "y1", "x2", and "y2", which "batch_id" indicates
|
|
|
|
|
* the index of the input feature map, "x1", "y1", "x2", or "y2" must be
|
|
|
|
|
* greater than or equal to "0.0" . \n
|
|
|
|
|
|
|
|
|
|
*@par Attributes:
|
|
|
|
|
*@li output_dim: A required int32, specifying the number of output channels,
|
|
|
|
|
* must be greater than 0.
|
|
|
|
|
*@li group_size: A required int32, specifying the number of groups to encode
|
|
|
|
|
* position-sensitive score maps, must be within the range (0, 128).
|
|
|
|
|
*@li spatial_scale: A required float32, scaling factor for mapping the input
|
|
|
|
|
* coordinates to the ROI coordinates . \n
|
|
|
|
|
|
|
|
|
|
*@par Outputs:
|
|
|
|
|
*y: An NC1HWC0 tensor of type float16 or float32, describing the result
|
|
|
|
|
* feature map . \n
|
|
|
|
|
|
|
|
|
|
*@attention Constraints:
|
|
|
|
|
* HC1HWC0: channel must be Group_size squared, rois_num is a multiple of 16
|
|
|
|
|
*/
|
|
|
|
|
REG_OP(PSROIPoolingV2)
|
|
|
|
|
.INPUT(x, TensorType({DT_FLOAT16, DT_FLOAT}))
|
|
|
|
|
.INPUT(rois, TensorType({DT_FLOAT16, DT_FLOAT}))
|
|
|
|
|
.OUTPUT(y, TensorType({DT_FLOAT16, DT_FLOAT}))
|
|
|
|
|
.REQUIRED_ATTR(spatial_scale, Float)
|
|
|
|
|
.REQUIRED_ATTR(output_dim, Int)
|
|
|
|
|
.REQUIRED_ATTR(group_size, Int)
|
|
|
|
|
.OP_END_FACTORY_REG(PSROIPoolingV2)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*@brief Performs Position Sensitive PS ROI Pooling Grad . \n
|
|
|
|
|
|
|
|
|
|
*@par Inputs:
|
|
|
|
|
* Two inputs, including:
|
|
|
|
|
*@li x: An NC1HWC0 tensor of type float16 or float32, describing the result
|
|
|
|
|
* feature map . \n
|
|
|
|
|
*@li rois: A tensor of type float16 or float32, with shape
|
|
|
|
|
* [batch, 5, rois_num], describing the ROIs, each ROI consists of five
|
|
|
|
|
* elements: "batch_id", "x1", "y1", "x2", and "y2", which "batch_id" indicates
|
|
|
|
|
* the index of the input feature map, "x1", "y1", "x2", or "y2" must be
|
|
|
|
|
* greater than or equal to "0.0" . \n
|
|
|
|
|
|
|
|
|
|
*@par Attributes:
|
|
|
|
|
*@li output_dim: A required int32, specifying the number of output channels,
|
|
|
|
|
* must be greater than 0.
|
|
|
|
|
*@li group_size: A required int32, specifying the number of groups to encode
|
|
|
|
|
* position-sensitive score maps, must be within the range (0, 128).
|
|
|
|
|
*@li spatial_scale: A required float32, scaling factor for mapping the input
|
|
|
|
|
* coordinates to the ROI coordinates . \n
|
|
|
|
|
*@li input_size: A required listInt, mapping the gradinput size: (H, W)
|
|
|
|
|
|
|
|
|
|
*@par Outputs:
|
|
|
|
|
*y: An NC1HWC0 tensor of type float16 or float32, describing the feature
|
|
|
|
|
* map, dimension C1 must be equal to
|
|
|
|
|
* (int(output_dim+15)/C0))*group_size*group_size.
|
|
|
|
|
|
|
|
|
|
*@attention Constraints:
|
|
|
|
|
* HC1HWC0: channel must be Group_size squared, rois_num is a multiple of 16
|
|
|
|
|
*/
|
|
|
|
|
REG_OP(PSROIPoolingGradV2D)
|
|
|
|
|
.INPUT(x, TensorType({DT_FLOAT16, DT_FLOAT}))
|
|
|
|
|
.INPUT(rois, TensorType({DT_FLOAT16, DT_FLOAT}))
|
|
|
|
|
.OUTPUT(y, TensorType({DT_FLOAT16, DT_FLOAT}))
|
|
|
|
|
.REQUIRED_ATTR(spatial_scale, Float)
|
|
|
|
|
.REQUIRED_ATTR(output_dim, Int)
|
|
|
|
|
.REQUIRED_ATTR(group_size, Int)
|
|
|
|
|
.REQUIRED_ATTR(input_size, ListInt)
|
|
|
|
|
.OP_END_FACTORY_REG(PSROIPoolingGradV2D)
|
|
|
|
|
|
|
|
|
|
} // namespace ge
|
|
|
|
|
|
|
|
|
|
#endif // OPS_BUILT_IN_OP_PROTO_INC_NN_DETECT_OPS_H_
|
|
|
|
|