AIPP Verification of the Model Input Size
If static or dynamic AIPP is configured, the size (input_size) of the generated image received by the Da Vinci model is changed due to operations such as crop and padding. In the model inference phase, the OME verifies the size of the input image. In dynamic AIPP mode, the input size must be less than or equal to max_src_image_size. In static AIPP mode, calculate the input size according to Table 1.
For static AIPP, assume that the batch count of the model is N, the image width is src_image_size_w, and the height width is src_image_size_h. Table 1 describes the verification formulas for the size of the model input.
input_format |
input_size |
---|---|
YUV400_U8 |
N * src_image_size_w * src_image_size_h |
YUV420SP_U8 |
N * src_image_size_w * src_image_size_h * 1.5 |
XRGB8888_U8 |
N * src_image_size_w * src_image_size_h * 4 |
RGB888_U8 |
N * src_image_size_w * src_image_size_h * 3 |
The OMG adds a model input before a model with dynamic AIPP is generated, according to the following formula:
sizeof(kAippDynamicPara) + (batch_count – 1) x sizeof(kAippDynamicBatchPara)
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