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
@@ -737,7 +737,8 @@ For a detailed description on task specific hyperparameters, please refer to [Hy
737
737
738
738
If you want to use tiling, and want to control tiling behavior, the following parameters are available: `tile_grid_size`, `tile_overlap_ratio`and`tile_predictions_nms_thresh`. For more details on these parameters please check [Train a small object detection model using AutoML](./how-to-use-automl-small-object-detect.md).
739
739
740
-
740
+
### Test the deployment
741
+
Please check this [Test the deployment](./tutorial-auto-train-image-models.md#test-the-deployment) section to test the deployment and visualize the detections from the model.
Learn which hyperparameters are available specifically for computer vision tasks in automated ML experiments.
18
23
19
24
With support for computer vision tasks, you can control the model algorithm and sweep hyperparameters. These model algorithms and hyperparameters are passed in as the parameter space for the sweep. While many of the hyperparameters exposed are model-agnostic, there are instances where hyperparameters are model-specific or task-specific.
@@ -26,11 +31,11 @@ This table summarizes hyperparameters specific to the `yolov5` algorithm.
26
31
| ------------- |-------------|----|
27
32
|`validation_metric_type`| Metric computation method to use for validation metrics. <br> Must be `none`, `coco`, `voc`, or `coco_voc`. |`voc`|
28
33
|`validation_iou_threshold`| IOU threshold for box matching when computing validation metrics. <br>Must be a float in the range [0.1, 1]. | 0.5 |
29
-
|`img_size`| Image size for train and validation. <br> Must be a positive integer. <br> <br> *Note: training run may get into CUDA OOM if the size is too big*. | 640 |
30
-
|`model_size`| Model size. <br> Must be `small`, `medium`, `large`, or `xlarge`. <br><br> *Note: training run may get into CUDA OOM if the model size is too big*. |`medium`|
34
+
|`image_size`| Image size for train and validation. <br> Must be a positive integer. <br> <br> *Note: training run may get into CUDA OOM if the size is too big*. | 640 |
35
+
|`model_size`| Model size. <br> Must be `small`, `medium`, `large`, or `extra_large`. <br><br> *Note: training run may get into CUDA OOM if the model size is too big*. |`medium`|
31
36
|`multi_scale`| Enable multi-scale image by varying image size by +/- 50% <br> Must be 0 or 1. <br> <br> *Note: training run may get into CUDA OOM if no sufficient GPU memory*. | 0 |
32
-
|`box_score_thresh`| During inference, only return proposals with a score greater than `box_score_thresh`. The score is the multiplication of the objectness score and classification probability. <br> Must be a float in the range [0, 1]. | 0.1 |
33
-
|`nms_iou_thresh`| IOU threshold used during inference in non-maximum suppression post processing. <br> Must be a float in the range [0, 1]. | 0.5 |
37
+
|`box_score_threshold`| During inference, only return proposals with a score greater than `box_score_threshold`. The score is the multiplication of the objectness score and classification probability. <br> Must be a float in the range [0, 1]. | 0.1 |
38
+
|`nms_iou_threshold`| IOU threshold used during inference in non-maximum suppression post processing. <br> Must be a float in the range [0, 1]. | 0.5 |
34
39
35
40
This table summarizes hyperparameters specific to the `maskrcnn_*` for instance segmentation during inference.
36
41
@@ -50,12 +55,12 @@ The following table describes the hyperparameters that are model agnostic.
50
55
|`number_of_epochs`| Number of training epochs. <br>Must be a positive integer. | 15 <br> (except `yolov5`: 30) |
51
56
|`training_batch_size`| Training batch size.<br> Must be a positive integer. | Multi-class/multi-label: 78 <br>(except *vit-variants*: <br> `vits16r224`: 128 <br>`vitb16r224`: 48 <br>`vitl16r224`:10)<br><br>Object detection: 2 <br>(except `yolov5`: 16) <br><br> Instance segmentation: 2 <br> <br> *Note: The defaults are largest batch size that can be used on 12 GiB GPU memory*.|
52
57
|`validation_batch_size`| Validation batch size.<br> Must be a positive integer. | Multi-class/multi-label: 78 <br>(except *vit-variants*: <br> `vits16r224`: 128 <br>`vitb16r224`: 48 <br>`vitl16r224`:10)<br><br>Object detection: 1 <br>(except `yolov5`: 16) <br><br> Instance segmentation: 1 <br> <br> *Note: The defaults are largest batch size that can be used on 12 GiB GPU memory*.|
53
-
|`grad_accumulation_step`| Gradient accumulation means running a configured number of `grad_accumulation_step` without updating the model weights while accumulating the gradients of those steps, and then using the accumulated gradients to compute the weight updates. <br> Must be a positive integer. | 1 |
58
+
|`gradient_accumulation_step`| Gradient accumulation means running a configured number of `gradient_accumulation_step` without updating the model weights while accumulating the gradients of those steps, and then using the accumulated gradients to compute the weight updates. <br> Must be a positive integer. | 1 |
54
59
|`early_stopping`| Enable early stopping logic during training. <br> Must be 0 or 1.| 1 |
55
60
|`early_stopping_patience`| Minimum number of epochs or validation evaluations with<br>no primary metric improvement before the run is stopped.<br> Must be a positive integer. | 5 |
56
61
|`early_stopping_delay`| Minimum number of epochs or validation evaluations to wait<br>before primary metric improvement is tracked for early stopping.<br> Must be a positive integer. | 5 |
57
62
|`learning_rate`| Initial learning rate. <br>Must be a float in the range [0, 1]. | Multi-class: 0.01 <br>(except *vit-variants*: <br> `vits16r224`: 0.0125<br>`vitb16r224`: 0.0125<br>`vitl16r224`: 0.001) <br><br> Multi-label: 0.035 <br>(except *vit-variants*:<br>`vits16r224`: 0.025<br>`vitb16r224`: 0.025 <br>`vitl16r224`: 0.002) <br><br> Object detection: 0.005 <br>(except `yolov5`: 0.01) <br><br> Instance segmentation: 0.005 |
58
-
|`lr_scheduler`| Type of learning rate scheduler. <br> Must be `warmup_cosine` or `step`. |`warmup_cosine`|
63
+
|`learning_rate_scheduler`| Type of learning rate scheduler. <br> Must be `warmup_cosine` or `step`. |`warmup_cosine`|
59
64
|`step_lr_gamma`| Value of gamma when learning rate scheduler is `step`.<br> Must be a float in the range [0, 1]. | 0.5 |
60
65
|`step_lr_step_size`| Value of step size when learning rate scheduler is `step`.<br> Must be a positive integer. | 5 |
61
66
|`warmup_cosine_lr_cycles`| Value of cosine cycle when learning rate scheduler is `warmup_cosine`. <br> Must be a float in the range [0, 1]. | 0.45 |
@@ -66,12 +71,10 @@ The following table describes the hyperparameters that are model agnostic.
66
71
|`nesterov`| Enable `nesterov` when optimizer is `sgd`. <br> Must be 0 or 1.| 1 |
67
72
|`beta1`| Value of `beta1` when optimizer is `adam` or `adamw`. <br> Must be a float in the range [0, 1]. | 0.9 |
68
73
|`beta2`| Value of `beta2` when optimizer is `adam` or `adamw`.<br> Must be a float in the range [0, 1]. | 0.999 |
69
-
|`amsgrad`| Enable `amsgrad` when optimizer is `adam` or `adamw`.<br> Must be 0 or 1. | 0 |
74
+
|`ams_gradient`| Enable `ams_gradient` when optimizer is `adam` or `adamw`.<br> Must be 0 or 1. | 0 |
70
75
|`evaluation_frequency`| Frequency to evaluate validation dataset to get metric scores. <br> Must be a positive integer. | 1 |
71
76
|`checkpoint_frequency`| Frequency to store model checkpoints. <br> Must be a positive integer. | Checkpoint at epoch with best primary metric on validation.|
72
-
|`checkpoint_run_id`| The run id of the experiment that has a pretrained checkpoint for incremental training.| no default |
73
-
|`checkpoint_dataset_id`| FileDataset id containing pretrained checkpoint(s) for incremental training. Make sure to pass `checkpoint_filename` along with `checkpoint_dataset_id`.| no default |
74
-
|`checkpoint_filename`| The pretrained checkpoint filename in FileDataset for incremental training. Make sure to pass `checkpoint_dataset_id` along with `checkpoint_filename`.| no default |
77
+
|`checkpoint_run_id`| The run ID of the experiment that has a pretrained checkpoint for incremental training.| no default |
75
78
|`layers_to_freeze`| How many layers to freeze for your model. For instance, passing 2 as value for `seresnext` means freezing layer0 and layer1 referring to the below supported model layer info. <br> Must be a positive integer. <br><br>`'resnet': [('conv1.', 'bn1.'), 'layer1.', 'layer2.', 'layer3.', 'layer4.'],`<br>`'mobilenetv2': ['features.0.', 'features.1.', 'features.2.', 'features.3.', 'features.4.', 'features.5.', 'features.6.', 'features.7.', 'features.8.', 'features.9.', 'features.10.', 'features.11.', 'features.12.', 'features.13.', 'features.14.', 'features.15.', 'features.16.', 'features.17.', 'features.18.'],`<br>`'seresnext': ['layer0.', 'layer1.', 'layer2.', 'layer3.', 'layer4.'],`<br>`'vit': ['patch_embed', 'blocks.0.', 'blocks.1.', 'blocks.2.', 'blocks.3.', 'blocks.4.', 'blocks.5.', 'blocks.6.','blocks.7.', 'blocks.8.', 'blocks.9.', 'blocks.10.', 'blocks.11.'],`<br>`'yolov5_backbone': ['model.0.', 'model.1.', 'model.2.', 'model.3.', 'model.4.','model.5.', 'model.6.', 'model.7.', 'model.8.', 'model.9.'],`<br>`'resnet_backbone': ['backbone.body.conv1.', 'backbone.body.layer1.', 'backbone.body.layer2.','backbone.body.layer3.', 'backbone.body.layer4.']` | no default |
76
79
77
80
## Image classification (multi-class and multi-label) specific hyperparameters
@@ -80,30 +83,30 @@ The following table summarizes hyperparmeters for image classification (multi-cl
80
83
81
84
| Parameter name | Description | Default |
82
85
| ------------- |-------------|-----|
83
-
|`weighted_loss`| 0 for no weighted loss.<br>1 for weighted loss with sqrt.(class_weights) <br> 2 for weighted loss with class_weights. <br> Must be 0 or 1 or 2. | 0 |
84
-
|`valid_resize_size`| Image size to which to resize before cropping for validation dataset. <br> Must be a positive integer. <br> <br> *Notes: <li> `seresnext` doesn't take an arbitrary size. <li> Training run may get into CUDA OOM if the size is too big*. | 256 |
85
-
|`valid_crop_size`| Image crop size that's input to your neural network for validation dataset. <br> Must be a positive integer. <br> <br> *Notes: <li> `seresnext` doesn't take an arbitrary size. <li> *ViT-variants* should have the same `valid_crop_size` and `train_crop_size`. <li> Training run may get into CUDA OOM if the size is too big*. | 224 |
86
-
|`train_crop_size`| Image crop size that's input to your neural network for train dataset. <br> Must be a positive integer. <br> <br> *Notes: <li> `seresnext` doesn't take an arbitrary size. <li> *ViT-variants* should have the same `valid_crop_size` and `train_crop_size`. <li> Training run may get into CUDA OOM if the size is too big*. | 224 |
86
+
|`weighted_loss`|<li> 0 for no weighted loss. <li> 1 for weighted loss with sqrt.(class_weights) <li> 2 for weighted loss with class_weights. <li> Must be 0 or 1 or 2. | 0 |
87
+
|`validation_resize_size`|<li> Image size to which to resize before cropping for validation dataset. <li> Must be a positive integer. <br> <br> *Notes: <li> `seresnext` doesn't take an arbitrary size. <li> Training run may get into CUDA OOM if the size is too big*. | 256 |
88
+
|`validation_crop_size`|<li> Image crop size that's input to your neural network for validation dataset. <li> Must be a positive integer. <br> <br> *Notes: <li> `seresnext` doesn't take an arbitrary size. <li> *ViT-variants* should have the same `validation_crop_size` and `training_crop_size`. <li> Training run may get into CUDA OOM if the size is too big*. | 224 |
89
+
|`training_crop_size`|<li> Image crop size that's input to your neural network for train dataset. <li> Must be a positive integer. <br> <br> *Notes: <li> `seresnext` doesn't take an arbitrary size. <li> *ViT-variants* should have the same `validation_crop_size` and `training_crop_size`. <li> Training run may get into CUDA OOM if the size is too big*. | 224 |
87
90
88
91
## Object detection and instance segmentation task specific hyperparameters
89
92
90
93
The following hyperparameters are for object detection and instance segmentation tasks.
91
94
92
95
> [!WARNING]
93
-
> These parameters are not supported with the `yolov5` algorithm. See the [model specific hyperparameters](#model-specific-hyperparameters) section for `yolo5` supported hyperparmeters.
96
+
> These parameters are not supported with the `yolov5` algorithm. See the [model specific hyperparameters](#model-specific-hyperparameters) section for `yolov5` supported hyperparmeters.
94
97
95
98
| Parameter name | Description | Default |
96
99
| ------------- |-------------|-----|
97
100
|`validation_metric_type`| Metric computation method to use for validation metrics. <br> Must be `none`, `coco`, `voc`, or `coco_voc`. |`voc`|
98
101
|`validation_iou_threshold`| IOU threshold for box matching when computing validation metrics. <br>Must be a float in the range [0.1, 1]. | 0.5 |
99
102
|`min_size`| Minimum size of the image to be rescaled before feeding it to the backbone. <br> Must be a positive integer. <br> <br> *Note: training run may get into CUDA OOM if the size is too big*.| 600 |
100
103
|`max_size`| Maximum size of the image to be rescaled before feeding it to the backbone. <br> Must be a positive integer.<br> <br> *Note: training run may get into CUDA OOM if the size is too big*. | 1333 |
101
-
|`box_score_thresh`| During inference, only return proposals with a classification score greater than `box_score_thresh`. <br> Must be a float in the range [0, 1].| 0.3 |
102
-
|`nms_iou_thresh`| IOU (intersection over union) threshold used in non-maximum suppression (NMS) for the prediction head. Used during inference. <br>Must be a float in the range [0, 1]. | 0.5 |
103
-
|`box_detections_per_img`| Maximum number of detections per image, for all classes. <br> Must be a positive integer.| 100 |
104
+
|`box_score_threshold`| During inference, only return proposals with a classification score greater than `box_score_threshold`. <br> Must be a float in the range [0, 1].| 0.3 |
105
+
|`nms_iou_threshold`| IOU (intersection over union) threshold used in non-maximum suppression (NMS) for the prediction head. Used during inference. <br>Must be a float in the range [0, 1]. | 0.5 |
106
+
|`box_detections_per_image`| Maximum number of detections per image, for all classes. <br> Must be a positive integer.| 100 |
104
107
|`tile_grid_size`| The grid size to use for tiling each image. <br>*Note: tile_grid_size must not be None to enable [small object detection](how-to-use-automl-small-object-detect.md) logic*<br> A tuple of two integers passed as a string. Example: --tile_grid_size "(3, 2)" | No Default |
105
108
|`tile_overlap_ratio`| Overlap ratio between adjacent tiles in each dimension. <br> Must be float in the range of [0, 1) | 0.25 |
106
-
|`tile_predictions_nms_thresh`| The IOU threshold to use to perform NMS while merging predictions from tiles and image. Used in validation/ inference. <br> Must be float in the range of [0, 1]| 0.25 |
109
+
|`tile_predictions_nms_threshold`| The IOU threshold to use to perform NMS while merging predictions from tiles and image. Used in validation/ inference. <br> Must be float in the range of [0, 1]| 0.25 |
0 commit comments