RoiAlign
Description
Performs a pooling operation in each Region of Interest (ROI).
Input
- x: 4D input tensor of type float16 or float. The data format is NCHW, and the shape is (N, C, H, W).
- rois: ROIs. The data type can be float16 or float. The shape is (num_rois, 4).
- batch_indices: index of the image corresponding to the batch. The data type is int64. The shape is (num_rois,).
Output
y: output tensor of the identical data type as input x, with a shape of (num_rois, C, output_height, output_width).
Attribute
- mode: string, indicating the pooling mode. The default value is avg.
- output_height: int, indicating the height of y. The default value is 1.
- output_width: int, indicating the width of y. The default value is 1.
- sampling_ratio: int, indicating the number of sampling points of the interpolation algorithm. The default value is 0.
- spatial_scale: float, indicating the spatial sampling rate relative to the input image. The default value is 1.0.
- coordinate_transformation_mode: string, indicating whether to offset the input value. The default value is half_pixel. This attribute is supported in Opset v16 and later.
Constraints
The input of float64 is not supported when the atc tool parameter --precision_mode=must_keep_origin_dtype is used.
ONNX Opset Support
Opset v10/v11/v12/v13/v14/v15/v16/v17/v18
Parent topic: Supported ONNX Operators