aclmdlSetAIPPByInputIndex

Description

Sets the dynamic AIPP attributes for model inference based on an input index. This API is synchronous.

Dynamic AIPP provides the following functions and they are executed in the exact sequence: Cropping -> CSC -> Resizing (not supported currently) -> Mean subtraction/Normalization -> Padding

Restrictions

Prototype

aclError aclmdlSetAIPPByInputIndex(uint32_t modelId, aclmdlDataset *dataset, size_t index, const aclmdlAIPP *aippParmsSet)

Parameters

Parameter

Input/Output

Description

modelId

Input

Model ID.

A successful aclmdlLoadFromFile, aclmdlLoadFromMem, aclmdlLoadFromFileWithMem, or aclmdlLoadFromMemWithMem call returns a model ID.

dataset

Input

Pointer to the input data for model inference.

Data of type aclmdlDataset describes the input data for model inference, while data of type aclDataBuffer describes the input buffer size and address.

index

Input

Index of the dynamic AIPP input. If the input is not associated with a dynamic AIPP input, an error is reported.

Call aclmdlGetAippType to query whether a specified model input has an associated dynamic AIPP input. If yes, the index argument passed to this API call is the same as that of aclmdlGetAippType. If no, you do not need to set dynamic AIPP attributes.

aippParmsSet

Input

Pointer to the dynamic AIPP parameter object.

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

Returns

0 on success; else, failure.

See Also

For the API call example, see Dynamic AIPP (Multiple Dynamic AIPP Inputs).