You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models.CustomVisionErrorException: 'Operation returned an invalid status code 'NotFound'' Error : Detail
| Body | {Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models.CustomVisionError} | Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models.CustomVisionError
| Code | "NotFoundIteration" | string
| Message | "Invalid iteration" | string
Above is the error , I am getting when running to test the prediction model.
Error is returned on this line of code var result = predictionApi.DetectImage(project.Id, lstIteration[0].Name, stream);
Sample Code :
private void TestIteration(CustomVisionPredictionClient predictionApi, Project project, IList lstIteration)
{
var imageFile = Server.MapPath("~/" + imgPath);
using (var stream = File.OpenRead(imageFile))
{ var result = predictionApi.DetectImage(project.Id, lstIteration[0].Name, stream);
foreach (var c in result.Predictions)
{
Console.WriteLine($"\t{c.TagName}: {c.Probability:P1} [ {c.BoundingBox.Left}, {c.BoundingBox.Top}, {c.BoundingBox.Width}, {c.BoundingBox.Height} ]");
}
}
}
The text was updated successfully, but these errors were encountered:
The iteration number mentioned is not correct. Check the iteration number in custom model, on which it is trained .
The iteration number changes every time it is trained / predicted.
Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models.CustomVisionErrorException: 'Operation returned an invalid status code 'NotFound''
Error : Detail
| Body | {Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models.CustomVisionError} | Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models.CustomVisionError
| Code | "NotFoundIteration" | string
| Message | "Invalid iteration" | string
Above is the error , I am getting when running to test the prediction model.
Error is returned on this line of code
var result = predictionApi.DetectImage(project.Id, lstIteration[0].Name, stream);
Sample Code :
private void TestIteration(CustomVisionPredictionClient predictionApi, Project project, IList lstIteration)
{
var imageFile = Server.MapPath("~/" + imgPath);
using (var stream = File.OpenRead(imageFile))
{
var result = predictionApi.DetectImage(project.Id, lstIteration[0].Name, stream);
foreach (var c in result.Predictions)
{
Console.WriteLine($"\t{c.TagName}: {c.Probability:P1} [ {c.BoundingBox.Left}, {c.BoundingBox.Top}, {c.BoundingBox.Width}, {c.BoundingBox.Height} ]");
}
}
}
The text was updated successfully, but these errors were encountered: