How to solve 401 error: "ClassifyImageUrl Operation under Custom_Vision_Prediction_3.1 is not supported"
Hello! I am trying to get prediction of image classification by API using the model which was trained previously on the customvision.ai web portal (meaning it was trained manually, not by API).
And I am getting this error when calling predictor.classify_image_url()
:
'error': {'code': '401', 'message': 'The ClassifyImageUrl Operation under Custom_Vision_Prediction_3.1 is not supported with the current subscription key and pricing tier Custom_Vision.Training.S0.'
My code below:
ENDPOINT = "https://westeurope.api.cognitive.microsoft.com/"
training_key = [HIDDEN]
prediction_key = [HIDDEN]
project_id = [HIDDEN]
training_credentials = ApiKeyCredentials(in_headers={"Training-key": training_key})
trainer = CustomVisionTrainingClient(ENDPOINT, training_credentials)
iterations: list[Iteration] = trainer.get_iterations(project_id)
prediction_credentials = ApiKeyCredentials(in_headers={"Prediction-key": prediction_key})
predictor = CustomVisionPredictionClient(ENDPOINT, prediction_credentials)
results: ImagePrediction = predictor.classify_image_url(project_id, iterations[0].name, url)
I used this guide: https://learn.microsoft.com/en-us/azure/ai-services/Custom-Vision-Service/quickstarts/image-classification
I also have double-checked my keys, both are actual.
What I need to solve this issue?
May be to find another endpoint for predictor (if yes, give me please the exact instructions where I can find it in my Azure portal) or something else...
1 ответ
Сортировать по: Наиболее полезные
-
Deleted
Этот ответ был удален из-за нарушения правил поведения. Ответ был отправлен вручную или идентифицирован с помощью автоматического обнаружения до выполнения действия. Дополнительные сведения см. в разделе правила поведения.
Комментарии отключены. Подробнее