Azure Image Classification with Custom Vision REST API | Publish Iteration

Publishing Iteration

Question

You are tasked to use image classification in Azure to classify a set of images.

You plan to use Custom Vision REST API to upload and tag the images.

Review the code snippet given below and choose the class that you will use for publishing the current iteration:

private static void PublishIteration(................................................

trainingApi, Project project) { trainingApi.PublishIteration(project.Id, iteration.Id, publishedModelName, predictionResourceId); Console.WriteLine("Done!\n"); }

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: D

Here is the completed code snippet:

To learn more about creating an image classification project with the Custom Vision client library or REST API, use the link given below:

Based on the provided code snippet, it seems like the task is related to training a custom image classification model using Azure Custom Vision service, and then publishing the latest iteration of that model.

To publish the latest iteration of a Custom Vision model, we need to call the PublishIteration method of CustomVisionTrainingClient class, which is responsible for managing the training and publishing of Custom Vision models. Therefore, the correct answer is D. CustomVisionTrainingClient.

Here is an explanation of the other options and why they are not the correct choice:

A. PredictionModel: The PredictionModel class is part of the Microsoft.ML namespace and is used for making predictions using trained machine learning models, but it is not related to Custom Vision service.

B. CustomVisionPredictionClient: The CustomVisionPredictionClient class is used for making predictions using an already published Custom Vision model, not for publishing an iteration of a Custom Vision model.

C. ApiKeyServiceClientCredentials: The ApiKeyServiceClientCredentials class is used for authenticating Azure services that require an API key, but it is not related to Custom Vision service or publishing models.

Therefore, the correct choice is D. CustomVisionTrainingClient.