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
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-prepare-datasets-for-automl-images.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.subservice: automl
9
9
ms.topic: how-to
10
10
ms.custom: template-how-to, update-code, sdkv2
11
11
ms.reviewer: rvadthyavath
12
-
ms.date: 09/03/2024
12
+
ms.date: 09/06/2024
13
13
#customer intent: As a data scientist, I want to prepare image data for training computer vision models.
14
14
---
15
15
@@ -20,31 +20,29 @@ ms.date: 09/03/2024
20
20
> [!IMPORTANT]
21
21
> Support for training computer vision models with automated ML in Azure Machine Learning is an experimental public preview feature. 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/).
22
22
23
-
In this article, you learn how to prepare image data for training computer vision models with [automated machine learning in Azure Machine Learning](concept-automated-ml.md).
23
+
In this article, you learn how to prepare image data for training computer vision models with [automated machine learning in Azure Machine Learning](concept-automated-ml.md). To generate models for computer vision tasks with automated machine learning, you need to bring labeled image data as input for model training in the form of an `MLTable`.
24
24
25
-
To generate models for computer vision tasks with automated machine learning, you need to bring labeled image data as input for model training in the form of an `MLTable`.
26
-
27
-
You can create an `MLTable` from labeled training data in JSONL format. If your labeled training data is in a different format (like, Pascal Visual Object Classes (VOC) or COCO), you can use a [conversion script](https://github.com/Azure/azureml-examples/blob/v1-archive/v1/python-sdk/tutorials/automl-with-azureml/image-object-detection/coco2jsonl.py) to first convert it to JSONL, and then create an `MLTable`. Alternatively, you can use Azure Machine Learning's data labeling tool to manually label images, and export the labeled data to use for training your AutoML model.
25
+
You can create an `MLTable` from labeled training data in JSONL format. If your labeled training data is in a different format, like Pascal Visual Object Classes (VOC) or COCO, you can use a [conversion script](https://github.com/Azure/azureml-examples/blob/v1-archive/v1/python-sdk/tutorials/automl-with-azureml/image-object-detection/coco2jsonl.py) to convert it to JSONL, and then create an `MLTable`. Alternatively, you can use Azure Machine Learning's data labeling tool to manually label images. Then export the labeled data to use for training your AutoML model.
28
26
29
27
## Prerequisites
30
28
31
29
- Familiarize yourself with the accepted [schemas for JSONL files for AutoML computer vision experiments](reference-automl-images-schema.md).
32
30
33
31
## Get labeled data
34
32
35
-
In order to train computer vision models using AutoML, you need to first get labeled training data. The images need to be uploaded to the cloud and label annotations need to be in JSONL format. You can either use the Azure Machine Learning Data Labeling tool to label your data or you could start with prelabeled image data.
33
+
In order to train computer vision models using AutoML, you need to get labeled training data. The images need to be uploaded to the cloud. Label annotations need to be in JSONL format. You can either use the Azure Machine Learning Data Labeling tool to label your data or you could start with prelabeled image data.
36
34
37
35
### Use Azure Machine Learning Data Labeling tool to label your training data
38
36
39
37
If you don't have prelabeled data, you can use Azure Machine Learning's data labeling tool to manually label images. This tool automatically generates the data required for training in the accepted format. For more information, see [Set up an image labeling project](how-to-create-image-labeling-projects.md).
40
38
41
-
It helps to create, manage, and monitor data labeling tasks for:
39
+
The tool helps to create, manage, and monitor data labeling tasks for:
42
40
43
41
- Image classification (multi-class and multi-label)
44
42
- Object detection (bounding box)
45
43
- Instance segmentation (polygon)
46
44
47
-
If you already labeled data you want to use, you can export your labeled data as an Azure Machine Learning Dataset and access the dataset under the **Datasets** tab in Azure Machine Learning studio. This exported dataset can then be passed as an input using `azureml:<tabulardataset_name>:<version>` format. For more information, see [Export the labels](how-to-manage-labeling-projects.md#export-the-labels).
45
+
If you already labeled data you want to use, you can export your labeled data as an Azure Machine Learning Dataset and access the dataset under the **Datasets** tab in Azure Machine Learning studio. You can pass this exported dataset as an input using `azureml:<tabulardataset_name>:<version>` format. For more information, see [Export the labels](how-to-manage-labeling-projects.md#export-the-labels).
48
46
49
47
Here's an example of how to pass existing dataset as input for training computer vision models.
50
48
@@ -82,11 +80,11 @@ Refer to CLI/SDK tabs for reference.
82
80
83
81
### Use prelabeled training data from local machine
84
82
85
-
If you labeled data that you would like to use to train your model, you need to upload the images to Azure. You can upload your images to the default Azure Blob Storage of your Azure Machine Learning Workspace and register it as a *data asset*. For more information, see [Create and manage data assets](how-to-create-data-assets.md).
83
+
If you labeled data that you want to use to train your model, you need to upload the images to Azure. You can upload your images to the default Azure Blob Storage of your Azure Machine Learning Workspace. Register it as a *data asset*. For more information, see [Create and manage data assets](how-to-create-data-assets.md).
86
84
87
85
The following script uploads the image data on your local machine at path *./data/odFridgeObjects* to datastore in Azure Blob Storage. It then creates a new data asset with the name `fridge-items-images-object-detection` in your Azure Machine Learning Workspace.
88
86
89
-
If there already exists a data asset with the name `fridge-items-images-object-detection` in your Azure Machine Learning Workspace, it updates the version number of the data asset and points it to the new location where the image data uploaded.
87
+
If there already exists a data asset with the name `fridge-items-images-object-detection` in your Azure Machine Learning Workspace, the code updates the version number of the data asset and points it to the new location where the image data uploaded.
@@ -119,7 +117,7 @@ az ml data create -f [PATH_TO_YML_FILE] --workspace-name [YOUR_AZURE_WORKSPACE]
119
117
120
118
---
121
119
122
-
If you already have your data present in an existing datastore and want to create a data asset out of it, you provide the path to the data in the datastore, instead of the path of your local machine. Update [the prededing code](#using-prelabeled-training-data-from-local-machine) with the following snippet.
120
+
If you already have your data in an existing datastore, to create a data asset out of it, provide the path to the data in the datastore, instead of the path of your local machine. Update [the preceding code](#using-prelabeled-training-data-from-local-machine) with the following snippet.
Next, you need to get the label annotations in JSONL format. The schema of labeled data depends on the computer vision task at hand. To learn more about the required JSONL schema for each task type, see [Data schemas to train computer vision models with automated machine learning](reference-automl-images-schema.md).
152
+
Next, get the label annotations in JSONL format. The schema of labeled data depends on the computer vision task at hand. To learn more about the required JSONL schema for each task type, see [Data schemas to train computer vision models with automated machine learning](reference-automl-images-schema.md).
155
153
156
-
If your training data is in a different format (like, pascal VOC or COCO), [helper scripts](https://github.com/Azure/azureml-examples/blob/v1-archive/v1/python-sdk/tutorials/automl-with-azureml/image-object-detection/coco2jsonl.py)to convert the data to JSONL are available in [notebook examples](https://github.com/Azure/azureml-examples/blob/main/sdk/python/jobs/automl-standalone-jobs).
154
+
If your training data is in a different format, like pascal VOC or COCO, [helper scripts](https://github.com/Azure/azureml-examples/blob/v1-archive/v1/python-sdk/tutorials/automl-with-azureml/image-object-detection/coco2jsonl.py)can convert the data to JSONL. The scripts are available in [notebook examples](https://github.com/Azure/azureml-examples/blob/main/sdk/python/jobs/automl-standalone-jobs).
157
155
158
-
After you create the *.jsonl* file following the preceding steps, you can register it as a data asset using UI. Make sure you select `stream` type in schema section as shown in this animation.
156
+
After you create the *.jsonl* file, you can register it as a data asset using UI. Make sure that you select `stream` type in schema section as shown in this animation.
159
157
160
158
:::image type="content" source="media\how-to-prepare-datasets-for-automl-images\ui-dataset-jsnol.gif" alt-text="Animation showing how to register a data asset from the jsonl files.":::
161
159
162
-
### Using prelabeled training data from Azure Blob storage
160
+
### Use prelabeled training data from Azure Blob storage
163
161
164
-
If your labeled training data is present in a container in Azure Blob storage, you can access it directly from there by [creating a datastore referring to that container](how-to-datastore.md#create-an-azure-blob-datastore).
162
+
If your labeled training data is present in a container in Azure Blob storage, you can access it directly. Create a datastore to that container. For more information, see [Create and manage data assets](how-to-datastore.md#create-an-azure-blob-datastore).
165
163
166
164
## Create MLTable
167
165
@@ -184,6 +182,6 @@ You can then pass in the `MLTable` as a data input for your AutoML training job.
184
182
185
183
## Related content
186
184
187
-
- [Train computer vision models with automated machine learning](how-to-auto-train-image-models.md).
188
-
- [Train a small object detection model with automated machine learning](how-to-use-automl-small-object-detect.md).
189
-
- [Tutorial: Train an object detection model (preview) with AutoML and Python](tutorial-auto-train-image-models.md).
185
+
- [Set up AutoML to train computer vision models](how-to-auto-train-image-models.md).
186
+
- [Train a small object detection model with AutoML](how-to-use-automl-small-object-detect.md).
187
+
- [Tutorial: Train an object detection model with AutoML and Python](tutorial-auto-train-image-models.md).
0 commit comments