pub fn roi_pool(
features: &Tensor,
rois: &[(f32, f32, f32, f32)],
output_size: (usize, usize),
) -> Result<Tensor, DetectError>Expand description
RoI Pooling: for each RoI, divides the region into an output_size grid
and max-pools each cell.
features–[H, W, C]single-image feature map.rois– slice of(x1, y1, x2, y2)in feature-map coordinates.output_size–(out_h, out_w).
Returns a tensor of shape [num_rois, out_h, out_w, C].