1 Tasks:

  • The Objectives is to teach how to use Google Cloud AutoML Vision API for images Classification
    • how to upload a labeled dataset to Google Cloud Storage
    • how to connect it to AutoML Vision with a CSV label file.
    • how to train a model with AutoML Vision and evaluate its accuracy.
    • how to generate predictions on your trained model.
  • Of Course,please note that running the Google Cloud AutoML Vision API have to pay fee and charges.

1.1 Google Cloud Platform Console

1.2 Set up AutoML Vision

1.3 Cloud Shell

  • paste these commands to create environment variables for your Project ID
  • Qwiklabs Username, replacing with the user name you logged into the lab with:

1.6 Specify a Google Cloud project

1.7 Click the setup-now button

1.8 Upload training images

  • In the GCP console, open the Navigation menu and select Storage > Browser:

  • in Cloud Shell, naming YOUR_BUCKET_NAME
  • gsutil command line utility for Cloud Storage to copy the training images into your bucket
  • click the Refresh button at the top of the Cloud Storage browser

1.9 Create a dataset

The training data is in Cloud Storage, you need a way for AutoML Vision to access it

  • create a CSV file where each row contains a URL to a training image and the associated label for that image.

  • run the following command to copy the file to your Cloud Shell instance:

  • update the CSV with the files in your project:
  • upload this CSV file to your Cloud Storage bucket:
  • click the Refresh bucket button. Confirm that you see the data.csv file in your bucket

  • Navigate back to the AutoML Vision Datasets page

  • At the top of the console, click + NEW DATASET.
  • Type “clouds” for the Dataset name.
  • Leave “Single-label Classification” checked.
  • Click CREATE DATASET to continue

  • Choose Select a CSV file on Cloud Storage
  • add the file name to the URL for the file you just uploaded
  • gs://your-project-name-vcm/data.csv.

1.10 Inspect images

1.11 Train your model

1.12 Evaluate your model

1.13 Check Confusion matrix

1.14 Generate predictions