Hello image data: Deploying a model to an endpoint and send a prediction

After your AutoML image classification model is done training, use the AI Platform (Unified) UI to create an endpoint and deploy your model to the endpoint. After your model is deployed to this new endpoint, send an image to the model for label prediction.

This tutorial has several pages:

  1. Setting up your project and environment.

  2. Creating an image classification dataset and importing images.

  3. Training an AutoML image classification model.

  4. Deploying a model to an endpoint and send a prediction.

  5. Cleaning up your project.

Each page assumes that you have already performed the instructions from the previous pages of the tutorial.

1. Deploy your model to an endpoint

Access your trained model to deploy it to a new or existing endpoint from the Models page:

  1. Go to the Models page

  2. Select your trained AutoML model. This will take you to the Evaluate tab. In this tab you can view model performance metrics.

  3. Choose the Deploy & test tab to create an endpoint.

  4. Click Deploy to endpoint to open the endpoint options window.

  5. In the first "Define your endpoint" section, choose to Create new endpoint and set the endpoint name to hello_automl_image.

  6. In the same "Define your endpoint" section, accept the Traffic split of 100%, and set the Number of compute nodes to 1 compute node. Click Continue to move to the following set of options.

    Deploy to endpoint window

  7. In the "Endpoint details" section, click Deploy to create your new endpoint.

It takes several minutes to create the endpoint and deploy the AutoML model to the new endpoint.

2. Send a prediction to your model

After the endpoint creation process finishes you can send a single image annotation (prediction) request in the AI Platform (Unified) UI.

  1. Navigate to the "Test your model" section of the same Deploy & test tab you used to create an endpoint in the previous step (Models > your_model > Deploy & test).

  2. Click Upload image and choose a locally saved image for prediction, and view its predicted label.

    Image prediction in UI
    Image credit: Siming Ye, Unsplash (shown in UI view).

What's next

Follow the last page of the tutorial to clean up resources that you have created.