Class ov::op::v0::ROIPooling#

class ROIPooling : public ov::op::Op#

ROIPooling operation.

Public Functions

ROIPooling(const Output<Node> &input, const Output<Node> &coords, const Shape &output_size, const float spatial_scale, const std::string &method = "max")#

Constructs a ROIPooling operation.

  • inputInput feature map {N, C, H, W}

  • coords – Coordinates of bounding boxes

  • output_size – Height/Width of ROI output features

  • spatial_scale – Ratio of input feature map over input image size

  • method – Method of pooling - Max or Bilinear

virtual void validate_and_infer_types() override#

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

void set_output_roi(Shape output_size)#

Set the output ROI feature map (pooled_h, pooled_w).


output_sizeShape with pooling attributes pooled_h and pooled_w sizes.

const Shape &get_output_roi() const#

Get the output ROI feature map shape (H x W)


Shape with pooled_h and pooled_w attributes.

void set_spatial_scale(float scale)#

Set the spatial scale value.


scale – Scale value to set.

void set_method(std::string method_name)#

Set the method of pooling.


method_name – Pooling method name.