Create Custom Models using Amazon Rekognition Custom Labels

   Go back to the Task List

  « 2. Prepare Data    4. Train the Model »

3. Prepare the Training Images

In this step, you create data set for the training images by importing them. You also label the images as cat and dog for the training purpose.

  1. Goto Amazon Rekognition console, click on the Use Custom Labels menu option in the left.

    Amazon Rekognition

  2. On the next screen, click on the Get started button.

    Amazon Rekognition

  3. Amazon Rekognition uses a S3 bucket for data and modeling purpose. If you are using Amazon Rekognition custom label for the first time, it will ask confirmation to create a bucket in a popup. Click on the Create S3 bucket button. It will create the bucket.

    Amazon Rekognition

  4. On the next screen, type in dojoproject as the project name and click on the Create project button. The project is created in no time.

    Amazon Rekognition

  5. On the next screen, click on the Create dataset button.

    Amazon Rekognition

  6. On the next screen, type in dojodataset as the dataset name. Select Upload images from your computer option and click on the Submit button.

    Amazon Rekognition

  7. It will create dataset in no time. Use Add images button to add all 100 training images from your local computer. These are the images which you downloaded with training_data.zip file. Since, you can upload only 30 images at a time, you will upload images in 4 attempts. Once all 100 images uploaded, you should see images count to 100. The images are not labeled yet. Hence, it shows 100 images as unlabeled.

    Amazon Rekognition

  8. Before the images are labeled, you need to add the labels. Click on the Add labels button.

    Amazon Rekognition

  9. On the popup, select Add labels option. Add dog and cat as two labels using the Add label button. Click on the Save button.

    Amazon Rekognition

  10. The labels are ready. You now need to select each of the cat images and assign cat label to them. Similarly, select each of the dog images and assign dog label to them. Since each cat and dog image names are starting with cat and dog, you can use search image by file name to make your life easy. You can also select more than one images at the same time and assign label to them.

  11. For instance, select first six cat images and click on the Assign labels button.

    Amazon Rekognition

  12. In the popup, select cat option and click on the Assign button.

    Amazon Rekognition

  13. The selected images are labeled. Click the save changes (6) button.

    Amazon Rekognition

  14. You can see that six images are labeled and they are labeled as cat.

    Amazon Rekognition

  15. Similarly, select remain 94 images and label them carefully as cat or dog depending on if it is a picture of a cat or dog. End of the labeling, you should see all 100 images labeled and they are spread as 50 labeled cat and 50 labeled dog.

    Amazon Rekognition

  16. Since all images are labeled. Click on the Exit button.

    Amazon Rekognition

  17. You stay on the dataset screen. In the next step, you train the model using the training images.