VOOZH about

URL: https://thenewstack.io/an-introduction-to-google-vertex-ai-automl-training-and-inference/

⇱ An Introduction to Google Vertex AI AutoML: Training and Inference - 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-21 13:30:07
An Introduction to Google Vertex AI AutoML: Training and Inference
tutorial,
Cloud Services

An Introduction to Google Vertex AI AutoML: Training and Inference

This post is the second in a two-part series exploring Google’s newly-launched Vertex AI, a unified machine learning and deep learning platform. This post delves into the training and inference process. Read the previous installment, on data preparation, here.
Jun 21st, 2021 1:30pm by Janakiram MSV
👁 Featued image for: An Introduction to Google Vertex AI AutoML: Training and Inference
Feature Image par Julius Silver de Pixabay
This post is the second in a two-part series exploring Google’s newly-launched Vertex AI, a unified machine learning and deep learning platform. This post delves into the training and inference process. Read the previous installment, on data preparation, here.

Google’s Vertex AI is a unified machine learning and deep learning platform from 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.

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.

Refer to the previous part of the tutorial to complete the dataset creation step. This tutorial will focus on the training and inference of the model.

With the dataset in place, let’s start by clicking on the train new model button:

👁 Image

In the next step, choose AutoML and click on continue:

👁 Image

Give the model a name and leave the defaults for the data split:

👁 Image

Let’s provide eight hours of node budget for the training. Make sure to enable early stopping to finish training when the model accuracy reaches a satisfactory level:

👁 Image

Finally, start the training and wait for an email sent after the completion of the job:

👁 Image

The model is now trained and available in the Vertex AI dashboard:

👁 Image

Feel free to explore the attributes such as precision, recall, and confusion matrix:

👁 Image

Let’s go ahead and deploy the model to test the accuracy. Under the deploy and test section, click on deploy to endpoint:

👁 Image

Configure the endpoint by giving it a name, 100% of traffic split and one compute node.

👁 Image

Wait for the endpoint to become ready to test the model by uploading an image:

👁 Image

Play with the model by uploading images of faces with and without masks:

👁 Image

Let’s now use cURL to invoke the model endpoint from the command line.

Create a JSON object to hold the image data. It should be a base64-encoded string.

cat test-1.jpg| base64

Put the base-64 encoded string in a file called input.json populating the content element with the string.

{
 "instances": [{
 "content": ""
 }],
 "parameters": {
 "confidenceThreshold": 0.5,
 "maxPredictions": 5
 }
}

Set environment variables for endpoint id, project id, region, and the input JSON file.

#replace with your model endpoint
ENDPOINT_ID=""
#replace with your project id 
PROJECT_ID="" 
REGION="europe-west4"
INPUT_DATA_FILE="input.json"

Generate the cURL request and evaluate the response.

curl \
-X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
https://$REGION-aiplatform.googleapis.com/v1alpha1/projects/${PROJECT_ID}/locations/$REGION/endpoints/${ENDPOINT_ID}:predict \
-d "@${INPUT_DATA_FILE}"

I got the below response from a sample image of U.S. President Joe Biden wearing a mask:

👁 Image

As you can see, the model correctly predicted the image with a face mask with 82% confidence:

👁 Image

This model can now be used with any application that can invoke a REST endpoint.

In one of the upcoming tutorials, we will create a Vertex AI custom model to train a convolutional neural network to detect face masks. Stay tuned.

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
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.