End of support notice: On October 31, 2025, AWS
will discontinue support for Amazon Lookout for Vision. After October 31, 2025, you will
no longer be able to access the Lookout for Vision console or Lookout for Vision resources.
For more information, visit this
blog post
Using an Amazon Sagemaker Ground Truth job
Labeling images can take significant time. For example, it can take 10s of seconds to accurately draw a mask around an anomaly. If you have 100s of images, it might take several hours to label them. As an alternative to labeling the images yourself, consider using Amazon SageMaker Ground Truth.
With Amazon SageMaker Ground Truth, you can use workers from either Amazon Mechanical Turk a vendor company that you choose, or an internal, private workforce to create a labeled set of images. For more information, see Use Amazon SageMaker Ground Truth to Label Data.
There is a cost for using Amazon Mechanical Turk. Also, It might take several days to complete an Amazon Ground Truth labeling job. If cost is an issue, or if you need to train your model quickly, we recommend that you use the Amazon Lookout for Vision console to label your images.
You can use an Amazon SageMaker Ground Truth labeling job to label images suitable for images classification models and image segmentation models. After the job completes, you use the output manifest file to create an Amazon Lookout for Vision dataset.
Image classification
To label images for an image classification model, create a labeling job for an Image Classification (Single Label) task.
Image segmentation
To label images for an image segmentation model, create a labeling job for an Image Classification (Single Label) task. Then, chain the job to create a labeling job for an Image Semantic Segmentation task.
You can also use a labeling job to create a partial manifest file for an image segmentation model. For example, you can classify images with an Image Classification (Single Label) task. After creating a Lookout for Vision dataset with the job output, use the Amazon Lookout for Vision console to add segmentation masks and anomaly labels to the dataset images.
Labeling images with Amazon SageMaker Ground Truth
The following procedure shows how to label images with Amazon SageMaker Ground Truth image labeling tasks. The procedure creates an image classification manifest file and optionally chains the image labeling task to create an image segmentation manifest file. If you want your project to have a separate test dataset, repeat this procedure to create the manifest file for the test dataset.
To label images with Amazon SageMaker Ground Truth (Console)
-
Create a Ground Truth job for an Image Classification (Single Label) task by following the instructions at Create a Labeling Job (Console).
-
For step 10, choose Image from the Task category dropdown menu, and choose Image Classification (Single Label) as the task type.
-
For step 16, in the Image classification (Single Label) labeling tool section, add two labels: normal and anomaly.
-
-
Wait until the workforce finishes classifying your images.
-
If you are creating a dataset for an image segmentation model, do the following. Otherwise go to to step 4.
-
In the Amazon SageMaker Ground Truth console, open the Labeling jobs page.
Choose the job you previously created. This enables the Actions menu.
From the Actions menu, choose Chain. The job details page opens.
In task type, choose semantic segmentation.
Choose Next.
-
In the Semantic segmentation labeling tool section, add anomaly labels for each type of anomaly that you want your model to find.
Choose Create.
Wait until the workforce labels your images.
-
Open the Ground Truth console and open the Labeling jobs page.
-
If you are creating an image classification model, choose the job you created in step 1. If you are creating an image segmentation model, choose the job created in step 3.
-
In Labeling job summary open the S3 location in Output dataset location. Note the manifest file location, which should be
s3://
.output-dataset-location
/manifests/output/output.manifest Repeat this procedure if you want to create a manifest file for a test dataset. Otherwise, follow the instructions at Creating the dataset to create a dataset with the manifest file.
Creating the dataset
Use this procedure to create a dataset in a Lookout for Vision project with the manifest file that you noted in step 6 of Labeling images with Amazon SageMaker Ground Truth. The manifest file creates the training dataset for a single dataset project. If you want your project to have a separate test dataset, you can run another Amazon SageMaker Ground Truth job to create a manifest file for the test dataset. Or you can create the manifest file yourself. You can also import images to your test dataset from an Amazon S3 bucket or from your local computer. (The images might need labeling before you can train the model).
This procedure assumes that your project doesn't have any datasets.
To create a dataset with Lookout for Vision (Console)
-
Open the Amazon Lookout for Vision console at https://console.aws.amazon.com/lookoutvision/
. -
Choose Get started.
-
In the left navigation pane, choose Projects.
-
Choose the project that you want to add to use with the manifest file.
-
In the How it works section, choose Create dataset.
-
Choose the Single dataset tab or the Separate training and test datasets tab and follow the steps.
-
Choose Submit.
-
Follow the steps in Training your model to train your model.