Concepts and Restrictions
Concepts
Term |
Description |
|---|---|
Dynamic batch/image size |
The batch size or image size is not fixed in certain scenarios. For example, as the number of detected objects is subject to change in the object detection+target recognition cascade scenario, the batch size of the target recognition input is dynamic.
|
Dynamic dimension sizes (ND format only) |
Dynamic dimensions for the ND format are useful in scenarios where input dimensions are unknown (such as the Transformer network). |
Restrictions
Scenario |
NOTE |
|---|---|
Inference is performed on the same model. |
AIPP (static or dynamic) and dynamic dimensions (ND format only) are mutually exclusive. |
Inference is performed on the same model. |
Select only one of the following methods:
|
Output buffer allocation for model inference |
You can allocate the memory based on the actual size of each level, or call aclmdlGetOutputSizeByIndex to obtain the memory size and then allocate the memory. (You are advised to use this method to ensure that the memory is sufficient.) |
When static AIPP and dynamic image size are used at the same time |
In the dynamic image size scenario, the width and height of the input image are uncertain. Therefore, when the insert_op_conf parameter of the ATC tool is used to transfer the AIPP configuration file, the cropping and padding functions cannot be enabled in the AIPP configuration file, and the values of src_image_size_w and src_image_size_h in the configuration file must be set to 0. |
Both dynamic AIPP and dynamic batch size enabled |
|
When dynamic AIPP and dynamic image size are used at the same time |
|
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. |