AI-102 Question 155
Select 3You have deployed a Custom Vision model in Azure to classify images of defective and non-defective products in your factory. You want to consume this model from a web application to provide real-time image classification. Which of the following steps is required to consume the Custom Vision model?
- A
Obtain the prediction endpoint URL and prediction key from the Custom Vision portal.
- B
Use the Azure Machine Learning SDK to publish the model as a web service.
- C
Send an HTTP POST request with the image data to the prediction endpoint URL.
- D
Deploy the model to an Azure Container Instance before using it.
- E
Include the prediction key in the HTTP request headers for authorization.
Show answer and explanation
Correct answers: A, C, E
Explanation
To consume a deployed Custom Vision model, you need to use the prediction endpoint URL and key provided in the Custom Vision portal. The model accepts HTTP POST requests containing the image data, and the prediction key must be included in the headers for authentication. Additional deployment to an Azure Container Instance is not required unless you have specific deployment needs.
- A. Correct.
This is correct. The prediction endpoint URL and key are necessary to send requests to the deployed Custom Vision model.
- B. Incorrect.
This is incorrect. The Custom Vision model is already published as a service when deployed, and the Azure Machine Learning SDK is not required for consumption.
- C. Correct.
This is correct. The model is consumed by sending an HTTP POST request with the image as input to the prediction endpoint.
- D. Incorrect.
This is incorrect. Deploying to an Azure Container Instance is optional and is only needed if you want a custom deployment scenario. The default deployment provided by Custom Vision is sufficient for the described scenario.
- E. Correct.
This is correct. The prediction key must be included in the HTTP request headers for authentication and authorization.