Functions

Spatial Pooling

psroi_pooling_2d

chainercv.functions.psroi_pooling_2d(x, rois, roi_indices, out_c, out_h, out_w, spatial_scale, group_size)

Position Sensitive Region of Interest (ROI) pooling function.

This function computes position sensitive average of input spatial patch with the given region of interests. Each ROI is splitted into \((group\_size, group\_size)\) regions, and position sensitive values in each region is computed.

Parameters:
  • x (Variable) – Input variable. The shape is expected to be 4 dimentional: (n: batch, c: channel, h, height, w: width).
  • rois (array) – Input roi. The shape is expected to be \((R, 4)\), and each datum is set as below: (y_min, x_min, y_max, x_max). The dtype is numpy.float32.
  • roi_indices (array) – Input roi indices. The shape is expected to be \((R, )\). The dtype is numpy.int32.
  • out_c (int) – Channels of output image after pooled.
  • out_h (int) – Height of output image after pooled.
  • out_w (int) – Width of output image after pooled.
  • spatial_scale (float) – Scale of the roi is resized.
  • group_size (int) – Position sensitive group size.
Returns:

Output variable.

Return type:

Variable

See the original paper proposing PSROIPooling: R-FCN.