aclmdlSetAIPPScfParams

Applicability

Product

Supported

Atlas 350 Accelerator Card

×

Atlas A3 training product/Atlas A3 inference product

×

Atlas A2 training product/Atlas A2 inference product

×

Atlas 200I/500 A2 inference product

×

Atlas inference product

×

Atlas training product

×

Function Usage

Sets resizing parameters in the dynamic AIPP scenario.

Prototype

1
2
3
4
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 switch

  • 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].