src.feature_align.interp_2d¶
- src.feature_align.interp_2d(z: torch.Tensor, P: torch.Tensor, ori_size: torch.Tensor, feat_size: torch.Tensor, out=None, device=None) torch.Tensor [source]¶
Interpolate in 2d grid space. z can be 3-dimensional where the first dimension is feature dimension.
- Parameters
z – \((c\times w\times h)\) feature map. \(c\): number of feature channels, \(w\): feature map width, \(h\): feature map height
P – \((n\times 2)\) point set containing point coordinates. The coordinates are at the scale of the original image size. \(n\): number of points
ori_size – \((2)\) size of the original image
feat_size – \((2)\) size of the feature map
out – optional output tensor
device – output device. If not specified, it will be the same as the input
- Returns
\((c \times n)\) extracted feature vectors