Leon Moodley
Leon Moodley

Reputation: 57

IBM Watson Visual Recognition Sample for Unity SDK - Custom Classifier not found

I created a new classifier from the Visual Recognition Beta Tool and I am trying to access the new classifier from Unity. In the demo sample I see the classify function should ideally loop through all classifiers found in your bluemix visual recognition service instance.

However when I look at the output log on the console the only classifier that is found is the default classifier.

I know my credentials and the service instance are correct. Does this mean I should create my new classifier from code instead of doing it in the visual recognition beta tool? I don't see why this would make a difference as the classifier is up and running and works from the web gui.

Its only when I connect to my service instance from unity and test with the sample visual recognition unity SDK that this customer classifier isn't found I am not sure why the unity Sdk sample demo does not see my classifier.

Regards Leon

Upvotes: 1

Views: 462

Answers (1)

taj
taj

Reputation: 1138

The Visual Recognition service abstraction in the Unity SDK does not iterate through all trained classifiers. Please specify the classifier you would like to use as a string array (classifierIDs).

VisualRecognition visualRecognition = new VisualRecognition();

string[] owners = {"IBM", "me"};
string[] classifierIDs = {"default", "<classifier-id>"};
visualRecognition.Classify(OnClassify, <imagePath>, owners, classifierIds, 0.5f);

Upvotes: 0

Related Questions