Function: dvpp_set_resize_config_interpolation

C Prototype

aclError acldvppSetResizeConfigInterpolation(acldvppResizeConfig *resizeConfig, uint32_t interpolation)

Python Function

ret = acl.media.dvpp_set_resize_config_interpolation(dvpp_resize_config, interpolation)

Function Usage

Sets the image resizing algorithm.

Input Description

dvpp_resize_config: int, pointer address of the resizing configuration data to be set. Call acl.media.dvpp_create_resize_config to create data of the acldvppResizeConfig type in advance.

interpolation: int, resizing algorithm. You are advised to use the same resizing algorithm as in model training.

For the Atlas 200/300/500 Inference Product, the following resizing algorithms are supported:
  • 0 (default): high-order filtering algorithm developed by Huawei.
  • 1: conventional bilinear algorithm, whose compute process is close to that of OpenCV.
  • 2: conventional nearest neighbor algorithm, whose compute process is close to that of OpenCV.
  • 3: conventional bilinear algorithm, whose compute process is close to that of TensorFlow.
  • 4: conventional nearest neighbor algorithm, whose compute process is close to that of TensorFlow.
For the Atlas Training Series Product, the following resizing algorithms are supported:
  • 0 (default): high-order filtering algorithm developed by Huawei.
  • 1: conventional bilinear algorithm, whose compute process is close to that of OpenCV.
  • 2: conventional nearest neighbor algorithm, whose compute process is close to that of OpenCV.
  • 3: conventional bilinear algorithm, whose compute process is close to that of TensorFlow.
  • 4: conventional nearest neighbor algorithm, whose compute process is close to that of TensorFlow.

Return Value

ret: int, error code.