Closed artus closed 6 years ago
You probably don't have a 'default' iteration, meaning you'll need to either pass an explicit iteration ID to PredictImage, or assign an iteration to be the default by clicking 'Make default' in the Performance tab.
@artus I would apply your setting / keys to that sample locally and compare whats wrong in your code.https://github.com/Microsoft/Cognitive-CustomVision-Windows/tree/master/Samples/CustomVision.Sample
The solution @chsienki provided was the correct one. I marked one of my iterations as "default" and it worked like a charm. Thank you for helping me! Maybe this information should be included in the HTTP response?
I'm using the NuGet package
Microsoft.Cognitive.CustomVision.Prediction
version1.2.0
. I created 1 trial project and trained it with a few images. Now when I try to call the API for a prediction using thePredicionEndpoint
, the system throws an exception:Microsoft.Rest.HttpOperationException
.When I debug the code and inspect the exception, it says:
This is my code:
attachmentStream
is a correct stream of an image, I am able to output it to a project-specific view.The exception gets thrown when calling
endpoint.PredictImage(...)
.