Function: get_first_aipp_info

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

Obtains the AIPP (static or dynamic) configuration of a model.

AIPP provides the following operations and they are executed in the exact sequence:

  1. Cropping
  2. Color space conversion
  3. Resizing (not supported in the current version)
  4. Mean subtraction/Normalization
  5. Padding

Prototype

  • C Prototype
    1
    aclError aclmdlGetFirstAippInfo(uint32_t modelId, size_t index, aclAippInfo *aippInfo)
    
  • Python Function
    1
    aipp_info, ret = acl.mdl.get_first_aipp_info(model_id, index)
    

Parameter Description

Parameter

Description

model_id

Int, model ID.

You can obtain the model ID after the model is successfully loaded by calling the following APIs:

index

Int, the sequence number of the specified input image of the model

Return Value Description

Return Value

Description

aipp_info

Dict, static AIPP configuration of the specified input. For details, see aclAippInfo.

For details, see ATC Instructions.

ret

Int, error code.

Restrictions

To obtain the dynamic AIPP configuration, this API call returns the values of only the following parameters in aipp_info: srcFormat, srcDatatype, srcDimNum, shapeCount, and outDims.