microsoft / Cognitive-CustomVision-Windows

Custom Vision Client Library and Sample for Windows
MIT License
67 stars 60 forks source link

Issue in Predicting Images #7

Closed arafattehsin closed 7 years ago

arafattehsin commented 7 years ago

Hi

I'm having an issue in predicting the images;

issue issue-2

Please let me know how can I resolve them?

Thanks Arafat

Mimetis commented 7 years ago

Exact same issue here.

Edit : Eventually, I found the issue. The Iteration must be explicitely declared :

var result = endpoint.PredictImage(towerProject.Id, testImage, new Guid("6c651131-c113-4ecb-b4ae-c852cec3b60d"));

This code works for me

arafattehsin commented 7 years ago

Hi @Mimetis, yes, I figured out later and not only this. The other way to achieve is to set the Custom Vision project as Default by choosing this;

image

Mimetis commented 7 years ago

You're Right !! thx for the tips :)

chsienki commented 7 years ago

Yes, you have to have already set a default iteration if you don't provide an explicit iteration ID. You can see an example of how to set a default iteration programatically in the sample code:

https://github.com/Microsoft/Cognitive-CustomVision-Windows/blob/master/Samples/CustomVision.Sample/Program.cs#L95