expose area interpolation for resize

This commit is contained in:
ms_yan 2021-01-03 15:08:20 +08:00
parent f31dfa129a
commit 3bfee0599b
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