aclmdlSetAIPPScfParams

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

x

Atlas A2 training products/Atlas A2 inference products

x

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Description

Sets resizing parameters in the dynamic AIPP scenario.

Prototype

aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet, int8_t scfSwitch,
int32_t scfInputSizeW, int32_t scfInputSizeH,
int32_t scfOutputSizeW, int32_t scfOutputSizeH,
uint64_t batchIndex)

Parameters

Parameter

Input/Output

Description

aippParmsSet

Output

Pointer to the dynamic AIPP parameter object.

Call aclmdlCreateAIPP in advance to create data of the aclmdlAIPP type.

scfSwitch

Input

Resizing enable.

  • 0: disabled. When this parameter is set to 0, scfInputSizeW, scfInputSizeH, scfOutputSizeW, and scfOutputSizeH are invalid.
  • 1: enabled

scfInputSizeW

Input

Source image width.

Value range: [16, 4096]

If cropping is enabled, the source image width is the same as that of the cropped image. If cropping is disabled, the source image width is the same as that of the original input.

scfInputSizeH

Input

Source image height.

Value range: [16, 4096]

If cropping is enabled, the source image height is the same as that of the cropped image. If cropping is disabled, the source image height is the same as that of the original input.

scfOutputSizeW

Input

Destination image width.

Value range: [16, 1920]

scfOutputSizeH

Input

Destination image height.

Value range: [16, 4096]

batchIndex

Input

Index of batch for image resizing.

Value range: [0, batchSize)

batchSize is set when data of the aclmdlAIPP type is created by the aclmdlCreateAIPP call.

Returns

0 on success; else, failure. For details, see aclError.

Restrictions

The resizing ratio is scfOutputSizeW/scfInputSizeW ∈ [1/16, 16] or scfOutputSizeH/scfInputSizeH ∈ [1/16, 16].