!10903 dataset: expose area interpolation for resize op

From: @ms_yan
Reviewed-by: @pandoublefeng,@heleiwang
Signed-off-by: @heleiwang
This commit is contained in:
mindspore-ci-bot 2021-01-05 16:27:18 +08:00 committed by Gitee
commit 61c83bef88
2 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,8 @@ from .validators import check_prob, check_crop, check_resize_interpolation, chec
DE_C_INTER_MODE = {Inter.NEAREST: cde.InterpolationMode.DE_INTER_NEAREST_NEIGHBOUR,
Inter.LINEAR: cde.InterpolationMode.DE_INTER_LINEAR,
Inter.CUBIC: cde.InterpolationMode.DE_INTER_CUBIC}
Inter.CUBIC: cde.InterpolationMode.DE_INTER_CUBIC,
Inter.AREA: cde.InterpolationMode.DE_INTER_AREA}
DE_C_BORDER_TYPE = {Border.CONSTANT: cde.BorderType.DE_BORDER_CONSTANT,
Border.EDGE: cde.BorderType.DE_BORDER_EDGE,
@ -731,6 +732,8 @@ class Resize(cde.ResizeOp):
- Inter.BICUBIC, means interpolation method is bicubic interpolation.
- Inter.AREA, means interpolation method is pixel area interpolation.
Examples:
>>> from mindspore.dataset.vision import Inter
>>> decode_op = c_vision.Decode()

View File

@ -22,6 +22,7 @@ class Inter(IntEnum):
ANTIALIAS = 1
BILINEAR = LINEAR = 2
BICUBIC = CUBIC = 3
AREA = 4
# Padding Mode, Border Type