Concepts and Restrictions
What Is AIPP?
The Artificial Intelligence Pre-Processing (AIPP) module implements image preprocessing on the AI Core, including Color Space Conversion (CSC), image normalization (by subtracting the mean value or multiplying a factor), image cropping (by specifying the crop start and cropping the image to the size required by the NN), and much more.
AIPP supports static and dynamic modes. These two modes are mutually exclusive.
- Static AIPP: If you use this mode and specify the AIPP parameters when converting a model, the AIPP attribute values are saved in the offline model (.om file) after the model is generated. Fixed AIPP configurations are used in each model inference.
In static AIPP mode, batches share the same set of AIPP parameters.
- Dynamic AIPP: If you use this mode when converting a model, you can set dynamic AIPP parameters each time before running the model for inference.
In dynamic AIPP mode, batches can use different sets of AIPP parameters.
Restrictions
- If dynamic AIPP and dynamic batch size are both enabled:
- If dynamic AIPP and dynamic image size are both enabled:
- If the image cropping, resizing, or padding function is enabled in setting the dynamic AIPP attributes, dynamic image size becomes unavailable.
- If the image cropping, resizing, or padding function is not enabled in setting the dynamic AIPP attributes, and dynamic AIPP and dynamic image size are both available, ensure that the maximum allowed image size profile is passed to the aclmdlSetAIPPSrcImageSize call and aclmdlSetDynamicHWSize call.
- For data nodes that require dynamic AIPP, the input buffer must be allocated based on the maximum allowed image size.
- When dynamic AIPP and dynamic shape input (setting the shape range) are used at the same time, the width and height of the output image of dynamic AIPP must be within the configured shape range.
- For a single model, AIPP (static or dynamic) and dynamic dimensions (ND format) are mutually exclusive.
- Digital Vision Pre-Processing (DVPP) is also supported, which introduces hardware-based media data processing techniques, such as resizing, cropping, format conversion, image encoding and decoding, and video encoding and decoding. Compared with AIPP, DVPP offers a wider set of processing operations, but it has particular restrictions on the image input/output and memory allocation.
For details about the DVPP APIs, see Media Data Processing (Including Images and Videos).
Parent topic: Dynamic AIPP Model Inference