VOOZH about

URL: https://thenewstack.io/a-tutorial-introduction-to-google-vertex-ai-automl-data-preparation/

⇱ A Tutorial Introduction to Google Vertex AI AutoML: Data Preparation - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-06-18 08:25:34
A Tutorial Introduction to Google Vertex AI AutoML: Data Preparation
tutorial,
Operations

A Tutorial Introduction to Google Vertex AI AutoML: Data Preparation

Google's newly-launched Vertex AI, a unified machine learning and deep learning platform, is explored here. This post delves into data preparation.
Jun 18th, 2021 8:25am by Janakiram MSV
👁 Featued image for: A Tutorial Introduction to Google Vertex AI AutoML: Data Preparation
Google image par Sasin Tipchai de Pixabay
This post is the first in a two-part series exploring Google’s newly-launched Vertex AI, a unified machine learning and deep learning platform. This post delves into data preparation. Check back on Monday for the second installment on the training and inference process.

Google’s Vertex AI is a unified machine learning and deep learning platform that supports AutoML models and custom models. In this tutorial, we will train an image classification model to detect face masks with Vertex AI AutoML. For an introduction to Vertex AI, read this article I published last week at The New Stack.

To complete this tutorial, you need an active Google Cloud subscription and Google Cloud SDK installed on your workstation.

There are three steps involved in training this model: dataset creation, training, and inference.

Dataset creation involves uploading the images and labeling them. Since we are using AutoML, training needs minimal intervention. We don’t need to write code or perform steps like hyperparameter tuning. When the training is done, we can download the model for deployment in edge devices or host it for performing inference.

In the first part of this tutorial, we will focus on creating the dataset. For this tutorial, we will use the raw dataset of faces with mask and without mask created by Prajna Bhandary.

👁 Image

She used image augmentation techniques to generate 600+ images for each class.

👁 Image

While this is not the most comprehensive dataset, it makes a good choice for AutoML which can train models with a lesser number of images.

We will upload these images to Google Cloud Storage bucket with two folders — mask and no-mask. A CSV file with the path of each image and the label will be uploaded to the same bucket which becomes the input for Vertex AI.

Let’s create the Google Cloud Storage bucket.

BUCKET=j-mask-nomask
REGION=EUROPE-WEST4

Feel free to change the values to reflect your bucket name and the region. At the time of launch, Vertex AI AutoML is available only in US-CENTRAL1 (Iowa) and EUROPE-WEST4 (Netherlands) regions.

gsutil mb -l $REGION -c STANDARD gs://$BUCKET

We will now start uploading the images to the above bucket.

Clone the GitHub repository on your local machine.

git clone https://github.com/prajnasb/observations.git

Navigate to the data directory and run the following commands:

gsutil cp -r with_mask gs://$BUCKET
gsutil cp -r without_mask gs://$BUCKET

To upload images simultaneously from both the directories, run the commands in two different terminal windows.

Check the Google Cloud Console and browse the folders.

👁 Image

Once the images are uploaded, we need to generate a CSV file with the path and label of each image.

We will run a simple BASH script for this task.

for filename in with_mask/*.jpg; do
 [ -e "$filename" ] || continue
 echo "gs://$BUCKET/$filename,mask" >> mask-ds.csv
done

This populates the file, mask-ds.csv with entries that looks like this:

gs://j-mask-nomask/with_mask/0-with-mask.jpg,mask
gs://j-mask-nomask/with_mask/1-with-mask.jpg,mask
gs://j-mask-nomask/with_mask/10-with-mask.jpg,mask
gs://j-mask-nomask/with_mask/100-with-mask.jpg,mask

Let’s repeat this for the second folder to generate the path and label for no-mask.

for filename in without_mask/*.jpg; do
 [ -e "$filename" ] || continue
 echo "gs://$BUCKET/$filename,no-mask" >> mask-ds.csv
done

This will append lines to the CSV file with the path of images with no mask.

gs://j-mask-nomask/without_mask/0.jpg,no-mask
gs://j-mask-nomask/without_mask/1.jpg,no-mask
gs://j-mask-nomask/without_mask/10.jpg,no-mask
gs://j-mask-nomask/without_mask/100.jpg,no-mask
gs://j-mask-nomask/without_mask/101.jpg,no-mask

Finally, we need to upload the CSV file to the bucket.

gsutil cp mask-ds.csv gs://$BUCKET

The CSV file becomes the critical input to Vertex AI AutoML to create the final dataset.

Running the command, gsutil ls gs://$BUCKET confirms that the CSV file is successfully uploaded to Google Cloud Storage bucket.

👁 Image

With the data uploaded to cloud storage, let’s turn that into a Vertex AI dataset.

Access the Vertex AI Dashboard in the Google Cloud Console and enable the API. Choose the region and click on create dataset:

👁 Image

Give the dataset a name, choose image classification with a single label, and click on create:

👁 Image

In the next section, choose select import files from Cloud Storage:

👁 Image

Browse the Cloud Storage bucket and select the CSV file uploaded earlier, and click on continue:

👁 Image

The import process takes a few minutes. When it completes, you are taken to the next page that shows all of the images identified from the dataset, both labeled and unlabeled images:

👁 Image

You may see some warnings and errors during the import process due to duplicate images found by Vertex AI. They can be safely ignored.

👁 Image

We are now ready to kick off the training. Stay tuned for the next part of the tutorial for a walkthrough of the training and inference process.

TRENDING STORIES
Janakiram MSV (Jani) is a practicing architect, research analyst, and advisor to Silicon Valley startups. He focuses on the convergence of modern infrastructure powered by cloud-native technology and machine intelligence driven by generative AI. Before becoming an entrepreneur, he spent...
Read more from Janakiram MSV
SHARE THIS STORY
TRENDING STORIES
Amazon Web Services is a sponsor of The New Stack.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.