Shortcuts

mmcv.ops.point_sample

mmcv.ops.point_sample(input: torch.Tensor, points: torch.Tensor, align_corners: bool = False, **kwargs)torch.Tensor[源代码]

A wrapper around grid_sample() to support 3D point_coords tensors Unlike torch.nn.functional.grid_sample() it assumes point_coords to lie inside [0, 1] x [0, 1] square.

参数
  • input (torch.Tensor) – Feature map, shape (N, C, H, W).

  • points (torch.Tensor) – Image based absolute point coordinates (normalized), range [0, 1] x [0, 1], shape (N, P, 2) or (N, Hgrid, Wgrid, 2).

  • align_corners (bool, optional) – Whether align_corners. Default: False

返回

Features of point on input, shape (N, C, P) or (N, C, Hgrid, Wgrid).

返回类型

torch.Tensor

Read the Docs v: 2.x
Versions
latest
stable
2.x
v2.0.1
v2.0.0
1.x
v1.7.1
v1.7.0
v1.6.2
v1.6.1
v1.6.0
v1.5.3
v1.5.2_a
v1.5.1
v1.5.0
v1.4.8
v1.4.7
v1.4.6
v1.4.5
v1.4.4
v1.4.3
v1.4.2
v1.4.1
v1.4.0
v1.3.18
v1.3.17
v1.3.16
v1.3.15
v1.3.14
v1.3.13
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.