You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, AutoML for Images supports batch scoring for classification.But object detection and instance segmentation models don't support batch inferencing. In case of batch inference for object detection and instance segmentation, use the following procedure to generate an ONNX model for the required batch size. Models generated for a specific batch size don't work for other batch sizes.
89
89
90
-
While exporting ONNX models, height and width of the images can be set by the user (choose values closer to training images for better predictions) to generate ONNX models.
91
-
92
-
93
90
94
91
```python
95
92
from azureml.core.script_run_config import ScriptRunConfig
@@ -127,7 +124,7 @@ For multi-label image classification, the generated ONNX model for the best chil
127
124
# [Object detection with Faster R-CNN or RetinaNet](#tab/object-detect-cnn)
128
125
```python
129
126
arguments = ['--model_name', 'fasterrcnn_resnet34_fpn', # enter the faster rcnn or retinanet model name
130
-
'--batch_size', 5, # enter the batch size of your choice
127
+
'--batch_size', 8, # enter the batch size of your choice
131
128
'--height_onnx', 600, # enter the height of input to ONNX model
132
129
'--width_onnx', 800, # enter the width of input to ONNX model
133
130
'--experiment_name', experiment_name,
@@ -148,7 +145,7 @@ arguments = ['--model_name', 'fasterrcnn_resnet34_fpn', # enter the faster rcnn
148
145
149
146
```python
150
147
arguments = ['--model_name', 'yolov5', # enter the yolo model name
151
-
'--batch_size', 5, # enter the batch size of your choice
148
+
'--batch_size', 8, # enter the batch size of your choice
152
149
'--height_onnx', 640, # enter the height of input to ONNX model
153
150
'--width_onnx', 640, # enter the width of input to ONNX model
154
151
'--experiment_name', experiment_name,
@@ -168,7 +165,7 @@ arguments = ['--model_name', 'yolov5', # enter the yolo model name
168
165
169
166
```python
170
167
arguments = ['--model_name', 'maskrcnn_resnet50_fpn', # enter the maskrcnn model name
171
-
'--batch_size', 5, # enter the batch size of your choice
168
+
'--batch_size', 8, # enter the batch size of your choice
172
169
'--height_onnx', 600, # enter the height of input to ONNX model
173
170
'--width_onnx', 800, # enter the width of input to ONNX model
0 commit comments