【发布时间】:2019-04-30 16:32:59
【问题描述】:
我正在尝试获得一个非常简单的 c# sn-p 来预测图像,但出现以下错误(互联网上关于此主题的内容很少):
Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models.CustomVisionErrorException HResult=0x80131500 Message=Operation 返回无效状态代码“NotFound”
var predictionClient = GetPredictionClient();
predictionClient.ClassifyImageUrl(Guid.Parse("5329678e-2a6b-46cf-ac11-fbd19ce89353"), "Iteration2", new ImageUrl("https://storageinfluencer.blob.core.windows.net/social-media-images/1e8bfef3-f070-44b9-9ae4-4b0d8a31316d.jpg"));
CustomVisionPredictionClient GetPredictionClient()
{
CustomVisionPredictionClient endpoint = new CustomVisionPredictionClient()
{
ApiKey = "xxx",
Endpoint = "https://northeurope.api.cognitive.microsoft.com/customvision/v3.0/Prediction/"
};
return endpoint;
}
通过使用提琴手,我离得更近了一点。端点应该是https://northeurope.api.cognitive.microsoft.com,即使门户网站说复制另一个作为端点。但是现在我得到了:
{"code":"BadRequest","message":"操作的项目类型无效。"}
我在提琴手中有以下 POST:
【问题讨论】: