Skip to content

Commit 1edffce

Browse files
Merge pull request #221989 from nvijayrania/patch-2
Documented the flag to toggle the OD & IS Augs
2 parents 91888a3 + 2cbf0f1 commit 1edffce

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

articles/machine-learning/how-to-auto-train-image-models.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,34 @@ In general, deep learning model performance can often improve with more data. Da
533533
|Object detection, instance segmentation| Training <br><br> Validation & Test |Random crop around bounding boxes, expand, horizontal flip, normalization, resize <br><br><br>Normalization, resize
534534
|Object detection using yolov5| Training <br><br> Validation & Test |Mosaic, random affine (rotation, translation, scale, shear), horizontal flip <br><br><br> Letterbox resizing|
535535

536+
Currently the augmentations defined above are applied by default for an Automated ML for image job. To provide control over augmentations, Automated ML for images exposes below two flags to turn-off certain augmentations. Currently, these flags are only supported for object detection and instance segmentation tasks.
537+
1. **apply_mosaic_for_yolo:** This flag is only specific to Yolo model. Setting it to False turns off the mosaic data augmentation which is applied at the training time.
538+
2. **apply_automl_train_augmentations:** Setting this flag to false turns off the augmentation applied during training time for the object detection and instance segmentation models. For augmentations, see the details in the table above.
539+
- For non-yolo object detection model and instance segmentation models, this flag turns off only the first three augmentations i.e., *Random crop around bounding boxes, expand, horizontal flip*. The normalization and resize augmentations are still applied regardless of this flag.
540+
- For Yolo model, this flag turns off the random affine and horizontal flip augmentations.
541+
542+
These two flags are supported via *advanced_settings* under *training_parameters* and can be controlled in the following way.
543+
544+
[!INCLUDE [cli v2](../../includes/machine-learning-cli-v2.md)]
545+
546+
```yaml
547+
training_parameters:
548+
advanced_settings: >
549+
{"apply_mosaic_for_yolo": false}
550+
```
551+
```yaml
552+
training_parameters:
553+
advanced_settings: >
554+
{"apply_automl_train_augmentations": false}
555+
```
556+
Please note that these two flags are independent of each other and can also be used in combination using the following settings.
557+
```yaml
558+
training_parameters:
559+
advanced_settings: >
560+
{"apply_automl_train_augmentations": false, "apply_mosaic_for_yolo": false}
561+
```
562+
In our experiments, we found that these augmentations help the model to generalize better. Therefore, when these augmentations are switched off, we recommend the users to combine them with other offline augmentations to get better results.
563+
536564
## Incremental training (optional)
537565

538566
Once the training run is done, you have the option to further train the model by loading the trained model checkpoint. You can either use the same dataset or a different one for incremental training.

0 commit comments

Comments
 (0)