Skip to content

Commit a8b485d

Browse files
committed
More fixes
1 parent 7c99986 commit a8b485d

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

articles/machine-learning/how-to-use-automl-small-object-detect.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ In this article, you'll learn how to train an object detection model to detect s
2424

2525
Typically, computer vision models for object detection work well for datasets with relatively large objects. However, due to memory and computational constraints, these models tend to under-perform when tasked to detect small objects in high-resolution images. Because high-resolution images are typically large, they are resized before input into the model, which limits their capability to detect smaller objects--relative to the initial image size.
2626

27-
To help with this problem, automated ML supports tiling as part of the public preview computer vision capabilities. The tiling capability in automated ML is based on the concepts in [The Power of Tiling for Small Object Detection](https://openaccess.thecvf.com/content_CVPRW_2019/papers/UAVision/Unel_The_Power_of_Tiling_for_Small_Object_Detection_CVPRW_2019_paper.pdf).
27+
To help with this problem, automated ML supports tiling as part of the computer vision capabilities. The tiling capability in automated ML is based on the concepts in [The Power of Tiling for Small Object Detection](https://openaccess.thecvf.com/content_CVPRW_2019/papers/UAVision/Unel_The_Power_of_Tiling_for_Small_Object_Detection_CVPRW_2019_paper.pdf).
2828

2929
When tiling, each image is divided into a grid of tiles. Adjacent tiles overlap with each other in width and height dimensions. The tiles are cropped from the original as shown in the following image.
3030

@@ -42,32 +42,28 @@ Small object detection using tiling is supported for all models supported by Aut
4242

4343
## Enable tiling during training
4444

45-
To enable tiling, you can set the `tile_grid_size` parameter to a value like `'3x2'`; where 3 is the number of tiles along the width dimension and 2 is the number of tiles along the height dimension. When this parameter is set to `'3x2'`, each image is split into a grid of 3 x 2 tiles. Each tile overlaps with the adjacent tiles, so that any objects that fall on the tile border are included completely in one of the tiles. This overlap can be controlled by the `tile_overlap_ratio` parameter, which defaults to 25%.
45+
To enable tiling, you can set the `tile_grid_size` parameter to a value like '3x2'; where 3 is the number of tiles along the width dimension and 2 is the number of tiles along the height dimension. When this parameter is set to '3x2', each image is split into a grid of 3 x 2 tiles. Each tile overlaps with the adjacent tiles, so that any objects that fall on the tile border are included completely in one of the tiles. This overlap can be controlled by the `tile_overlap_ratio` parameter, which defaults to 25%.
4646

4747
When tiling is enabled, the entire image and the tiles generated from it are passed through the model. These images and tiles are resized according to the `min_size` and `max_size` parameters before feeding to the model. The computation time increases proportionally because of processing this extra data.
4848

49-
For example, when the `tile_grid_size` parameter is `'3x2'`, the computation time would be approximately seven times when compared to no tiling.
49+
For example, when the `tile_grid_size` parameter is '3x2', the computation time would be approximately seven times when compared to no tiling.
5050

51-
You can specify the value for `tile_grid_size` in your hyperparameter space as a string.
51+
You can specify the value for `tile_grid_size` in your training parameters as a string.
5252

5353
# [CLI v2](#tab/CLI-v2)
5454

5555
[!INCLUDE [cli v2](../../includes/machine-learning-cli-v2.md)]
5656

5757
```yaml
58-
search_space:
59-
- model_name: "fasterrcnn_resnet50_fpn"
60-
tile_grid_size: "choice('3x2')"
58+
training_parameters:
59+
tile_grid_size: '3x2'
6160
```
6261
6362
# [Python SDK v2 (preview)](#tab/SDK-v2)
6463
6564
```python
66-
image_object_detection_job.extend_search_space(
67-
ImageObjectDetectionSearchSpace(
68-
model_name=Choice(['fasterrcnn_resnet50_fpn']),
69-
tile_grid_size=Choice(['3x2'])
70-
)
65+
image_object_detection_job.set_training_parameters(
66+
tile_grid_size='3x2'
7167
)
7268
```
7369
---
@@ -82,15 +78,19 @@ To choose the optimal value for this parameter for your dataset, you can use hyp
8278

8379
```yaml
8480
search_space:
85-
- model_name: "fasterrcnn_resnet50_fpn"
86-
tile_grid_size: "choice('2x1', '3x2', '5x3')"
81+
- model_name:
82+
type: choice
83+
values: ['fasterrcnn_resnet50_fpn']
84+
tile_grid_size:
85+
type: choice
86+
values: ['2x1', '3x2', '5x3']
8787
```
8888

8989
# [Python SDK v2 (preview)](#tab/SDK-v2)
9090

9191
```python
9292
image_object_detection_job.extend_search_space(
93-
ImageObjectDetectionSearchSpace(
93+
SearchSpace(
9494
model_name=Choice(['fasterrcnn_resnet50_fpn']),
9595
tile_grid_size=Choice(['2x1', '3x2', '5x3'])
9696
)
@@ -138,4 +138,4 @@ See the [object detection sample notebook](https://github.com/Azure/azureml-exam
138138
* For definitions and examples of the performance charts and metrics provided for each job, see [Evaluate automated machine learning experiment results](how-to-understand-automated-ml.md).
139139
* [Tutorial: Train an object detection model (preview) with AutoML and Python](tutorial-auto-train-image-models.md).
140140
* See [what hyperparameters are available for computer vision tasks](reference-automl-images-hyperparameters.md).
141-
*[Make predictions with ONNX on computer vision models from AutoML](how-to-inference-onnx-automl-image-models.md)
141+
* [Make predictions with ONNX on computer vision models from AutoML](how-to-inference-onnx-automl-image-models.md)

articles/machine-learning/v1/how-to-use-automl-small-object-detect-v1.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ ms.custom: sdkv1, event-tier1-build-2022
1414

1515
[!INCLUDE [sdk v1](../../../includes/machine-learning-sdk-v1.md)]
1616

17+
> [!div class="op_single_selector" title1="Select the version of Azure Machine Learning CLI extension you are using:"]
18+
> * [v1](how-to-use-automl-small-object-detect-v1.md)
19+
> * [v2 (current version)](../how-to-use-automl-small-object-detect.md)
20+
21+
[!INCLUDE [cli-version-info](../../../includes/machine-learning-cli-version-1-only.md)]
22+
23+
1724
> [!IMPORTANT]
1825
> This feature is currently in public preview. This preview version is provided without a service-level agreement. Certain features might not be supported or might have constrained capabilities. For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
1926
@@ -106,4 +113,4 @@ See the [object detection sample notebook](https://github.com/Azure/azureml-exam
106113
* For definitions and examples of the performance charts and metrics provided for each job, see [Evaluate automated machine learning experiment results](../how-to-understand-automated-ml.md).
107114
* [Tutorial: Train an object detection model (preview) with AutoML and Python](tutorial-auto-train-image-models-v1.md).
108115
* See [what hyperparameters are available for computer vision tasks](../reference-automl-images-hyperparameters.md).
109-
*[Make predictions with ONNX on computer vision models from AutoML](how-to-inference-onnx-automl-image-models-v1.md)
116+
* [Make predictions with ONNX on computer vision models from AutoML](how-to-inference-onnx-automl-image-models-v1.md)

0 commit comments

Comments
 (0)