Overview
AIPP involves image resizing, CSC, and mean value subtraction and factor multiplication (for pixel changing). All these functions are implemented by the AI Core.
Static AIPP and dynamic AIPP modes are supported. However, the two modes are mutually exclusive.
- Static AIPP: During model conversion, set the AIPP mode to static and set the AIPP parameters. After the Da Vinci model is generated, the AIPP parameter values are saved in the model. The same AIPP parameter configurations are used in each model inference phase.
If the static AIPP mode is used, batches share the same set of AIPP parameters.
- Dynamic AIPP: During model conversion, set the AIPP mode to dynamic. The AIPP parameters must be set in the code of the inference engine before each model inference. In this way, different sets of AIPP configurations can be used for different model inference phases. For details about the dynamic AIPP APIs and usage example, see AIPP Configuration APIs in Matrix API Reference.
In dynamic AIPP mode, batches use separate parameter configurations (such as the crop and resize attributes) defined by the dynamic parameter structure. For details about the dynamic parameter structure, see Parameter Structure for Dynamic AIPP.
AIPP supports the following image input formats: YUV420SP_U8, XRGB8888_U8, RGB888_U8, and YUV400_U8.
- YUV420SP_U8 is classified into YUV420SP_UV(NV12) and YUV420SP_VU(NV21) based on the UV sequence. The default format is YUV420SP_UV(NV12).
- If rbuv_swap_switch in Configuration File Template is set to false, the AIPP output format is YUV420SP_UV(NV12)
- If rbuv_swap_switch in Configuration File Template is set to true, the AIPP output format is YUV420SP_UV(NV12).
- For RGB888_U8, the AIPP output format varies according to the value of rbuv_swap_switch.
- If rbuv_swap_switch in Configuration File Template is set to false, the AIPP output format is RGB888_U8.
- If rbuv_swap_switch in Configuration File Template is set to true, the AIPP output format is BGR888_U8.

- The input format of AIPP is YUV420SP_U8 (the default format is YUV420SP_UV). If the format is YUV420SP_VU, set rbuv_swap_switch to false. Otherwise, the output result will be affected.
- When AIPP is enabled, the model input is in RGB888_U8 or BGR888_U8 format. The two formats correspond to different CSC matrices.
- Pay attention to the following requirements on the input images:
- If AIPP is enabled for model conversion and the input image format is XRGB8888_U8 or RGB888_U8, the converted model accepts NHWC input only.
- If AIPP is disabled for model conversion, the converted model accepts NCHW input only for inference. Therefore, you need to manually convert the NHWC data to NCHW data.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot