mmcv.ops.rel_roi_point_to_rel_img_point¶
- mmcv.ops.rel_roi_point_to_rel_img_point(rois: torch.Tensor, rel_roi_points: torch.Tensor, img: Union[tuple, torch.Tensor], spatial_scale: float = 1.0) → torch.Tensor[source]¶
Convert roi based relative point coordinates to image based absolute point coordinates.
- Parameters
rois (torch.Tensor) – RoIs or BBoxes, shape (N, 4) or (N, 5)
rel_roi_points (torch.Tensor) – Point coordinates inside RoI, relative to RoI, location, range (0, 1), shape (N, P, 2)
img (tuple or torch.Tensor) – (height, width) of image or feature map.
spatial_scale (float, optional) – Scale points by this factor. Default: 1.
- Returns
Image based relative point coordinates for sampling, shape (N, P, 2).
- Return type