Getting Started with the Amazon Lookout for Vision console - Amazon Lookout for Vision

Getting Started with the Amazon Lookout for Vision console

The Getting Started instructions show you how to create, train, evaluate, and use a model that detects anomalies in images. To help you learn, Amazon Lookout for Vision provides example images of circuit boards (that is, circuitboard) that you can use.

The general workflow is as follows:

Set up Amazon Lookout for Vision

Set up Amazon Lookout for Vision and prepare the circuitboard example images for use in Getting Started.

Step 1: Set up Amazon Lookout for Vision.

Be sure to do Step 8: (Optional) Prepare example images.

Create a project

Create a project to manage the datasets and the models that you create. A project should be used for a single use case, such as detecting anomalies in a single type of machine part.

You can use the dashboard to get an overview of your projects. For more information, see Using the Amazon Lookout for Vision dashboard.

Step 2: Create your project.

Create a dataset

A dataset is a set of images and labels (that is, normal or anomaly) that describe those images. You use datasets to train and test the models you create. The images should represent a single type of object. For more information, see Preparing images for a dataset. With Amazon Lookout for Vision you can have a project that uses a single dataset, or a project that has separate training and test datasets. We recommend using a single dataset project unless you want finer control over training, testing, and performance tuning. To create a dataset, you import the images in one of the following ways:

  • Import images from your local computer.

  • Import images from an S3 bucket. Amazon Lookout for Vision can label the images using the folder names that contain the images.

  • Import an Amazon SageMaker Ground Truth manifest file.

To help you understand how Amazon Lookout for Vision works, create a project with a training dataset and a test dataset. Import your training dataset images from s3://your bucket/circuitboard/train/. Import your test dataset images from s3://your bucket/circuitboard/test/.

Step 3: Create your dataset (Import images from Amazon S3).

After you create the dataset, you can add more images and also label the images. For more information, see Editing your dataset. For Getting Started, you don't need to add any more images to create your first model.

Train your model

Training creates a model and trains it to predict the presence of anomalies in images. A new version of your model is created each time you train.

At the start of training, Amazon Lookout for Vision chooses the most suitable algorithm to train your model with. The model is trained and then tested. When you train a single dataset project, the dataset is internally split to create a training dataset and a test dataset. In Getting Started, your project has separate training and test datasets. In this configuration, Amazon Lookout for Vision trains your model with the training dataset and tests the model with the test dataset.

Step 4: Train your model.

Note

You are charged for the amount of time it takes to successfully train your model.

Evaluate your model

Evaluate the performance of your model by using the performance metrics created during testing.

Performance metrics enable you to understand the performance of your trained model, and decide if you're ready to use it in production.

Step 5: View your performance metrics.

Step 6: Evaluate and improve your model.

If the performance metrics indicate that improvements are needed, you can add more training data by running a trial detection task with new images. After the task completes you can verify the results and add the verified images to your training dataset. Alternatively, you can add new training images directly to the dataset. In these steps, improve the model by running a trial detection task and adding the verified images to your training dataset. Use the example images in the extra_images folder.

Step 7: Run a trial detection task.

Step 8: Retrain your model.

If the performance results indicate acceptable performance, you can verify the performance by running a trial detection. The performance results after retraining should confirm the readiness of your model.

Use your model

Before you can use your model, you start the model with the StartModel operation. You can get the StartModel CLI command for your model from the console.

Step 9: Start your model.

A trained Amazon Lookout for Vision model predicts whether an input image contains normal or anomalous content.

To make a prediction with your model, call the DetectAnomalies operation and pass an input image from your local computer. For Getting Started, use one of the images in the extra_images folder. You can get the CLI command that calls DetectAnomalies from the console.

Step 10: Detect anomalies in an image.

You are charged for the time that your model is running. If you are no longer using your model, use the StopModel operation to stop the model. You can get the CLI command from the console.

Step 11: Stop your model.

Use your dashboard

You can use the dashboard to get an overview of all your projects and overview information for individual projects.

Step 12: Use your dashboard.