Function: set_input_aipp
|
C Prototype |
aclError aclmdlSetInputAIPP(uint32_t modelId, aclmdlDataset *dataset, size_t index, const aclmdlAIPP *aippParmsSet) |
|---|---|
|
Python Function |
ret = acl.mdl.set_input_aipp(model_id, dataset, index, aipp_parms_set) |
|
Function Usage |
Sets the AIPP attributes for model inference based on the index of the dynamic AIPP input in the dynamic AIPP scenario. Dynamic AIPP provides the following operations and they are executed in the exact sequence:
|
|
Input Description |
model_id: int, model ID. You can obtain the model ID after the model is successfully loaded by calling the following APIs:
dataset: int, pointer address of a model's input data. Data of type aclmdlDataset describes the input data for model inference, while data of type aclDataBuffer describes the input buffer size and address. index: int, input index of the dynamic AIPP input.
aipp_parms_set: int, pointer address of the dynamic AIPP configuration object. The aclmdlAIPP data must be created by calling acl.mdl.create_aipp in advance. |
|
Return Value |
ret: int, error code.
|
|
Restrictions |
|
|
Reference |
For details about the API call sequence and example, see Dynamic AIPP (Single Dynamic AIPP Input). |
|
Cropping |
Resizing |
Padding |
Output Width and Height |
|---|---|---|---|
|
No |
No |
No |
aippOutputW = srcImageSizeW aippOutputH = srcImageSizeH |
|
Yes |
No |
No |
aippOutputW = cropSizeW aippOutputH = cropSizeH |
|
Yes |
Yes |
No |
aippOutputW = scfOutputSizeW aippOutputH = scfOutputSizeH |
|
Yes |
No |
Yes |
aippOutputW = cropSizeW + paddingSizeLeft + paddingSizeRight aippOutputH = cropSizeH + paddingSizeTop + paddingSizeBottom |
|
No |
No |
Yes |
aippOutputW = srcImageSizeW + paddingSizeLeft + paddingSizeRight aippOutputH = srcImageSizeH + paddingSizeTop + paddingSizeBottom |
|
No |
Yes |
Yes |
aippOutputW = scfOutputSizeW + paddingSizeLeft + paddingSizeRight aippOutputH = scfOutputSizeH + paddingSizeTop + paddingSizeBottom |
|
No |
Yes |
No |
aippOutputW = scfOutputSizeW aippOutputH = scfOutputSizeH |
|
Yes |
Yes |
Yes |
aippOutputW = scfOutputSizeW + paddingSizeLeft + paddingSizeRight aippOutputH = scfOutputSizeH + paddingSizeTop + paddingSizeBottom |