From 84ce94fbd954011fe187f7593950805c09030763 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Tue, 22 Mar 2022 11:03:00 +0800 Subject: [PATCH] docs(imperative): fix docs about vision related function GitOrigin-RevId: 55d12d5e7a7eb46a52bc1b3128e93ce320f1e999 --- imperative/python/megengine/functional/vision.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/imperative/python/megengine/functional/vision.py b/imperative/python/megengine/functional/vision.py index b643fe9d3..9e9f1ecea 100644 --- a/imperative/python/megengine/functional/vision.py +++ b/imperative/python/megengine/functional/vision.py @@ -300,13 +300,17 @@ def remap( Args: inp: input image - map_xy: batch, oh, ow, 2) transformation matrix - border_mode: pixel extrapolation method. - Default: "replicate". Currently also support "constant", "reflect", - "reflect_101", "wrap". + map_xy: transformation matrix, its shape represents [batch_size, H, W, 2]. map_xy's H and W are the same as output's H and W. + For each output location output[n, h, w], the vector map_xy[n, h, w] specifies input pixel location x and y, which are + used to interpolate the output value output[n, h, w]. In the case of 2D inputs, map_xy[n, h, w] specifies the x, y pixel + locations for interpolating output[n, h, w], map_xy specifies the sampling pixel locations normalized by the inp spatial + dimensions. Therefore, it should have most values in the range of [0, h - 1) and [0, w - 1). + border_mode: pixel extrapolation method. Default: "replicate". Currently also support "constant", "reflect", "reflect_101", "wrap". + "replicate": repeatedly fills the edge pixel values of the duplicate image, expanding the new boundary pixel values with + the edge pixel values. + "constant": fills the edges of the image with a fixed numeric value. scalar: value used in case of a constant border. Default: 0 - interp_mode: interpolation methods. - Default: "linear". Currently also support "nearest" mode. + interp_mode: interpolation methods. Default: "linear". Currently also support "nearest" mode. Returns: output tensor. -- GitLab