--dynamic_image_size
Applicability
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Description
Sets dynamic image size profiles. Applies to the scenario where the resolution of images input for inference is unfixed.
See Also
This option must be used in conjunction with --input_shape and is mutually exclusive with --dynamic_batch_size and --dynamic_dims.
Arguments
Argument: dynamic image size, for example, "imagesize1_height,imagesize1_width;imagesize2_height,imagesize2_width".
Format: Enclose the whole argument in double quotation marks (""), and separate the image sizes by commas (,).
Restrictions: The number of image size profiles has a value range (1, 100]. Separate each image size by a semicolon (;).
Suggestions and Benefits
- Too large image sizes or too many image size profiles will cause model tuning failures.
- In the scenario where you have set too large image sizes or too many image size profiles, you are advised to run the swapoff -a command to disable the use of swap space as memory to prevent slow operating environment.
Examples
--input_shape="data:8,3,-1,-1;img_info:8,4,-1,-1" --dynamic_image_size="416,416;832,832"
Where, -1 in --input_shape indicates dynamic image size enabled. When the AOE tunes a model, the supported input combinations are as follows:
Profile 0: data(8,3,416,416)+img_info(8,4,416,416)
Profile 1: data(8,3,832,832)+img_info(8,4,832,832)
Dependencies and Restrictions
- Restrictions:
If dynamic image size is enabled, the sizes of the dataset images used for inference must match the runtime image size in use.