1

I am trying to create a custom image classifier on Jupyter Notebooks via Python 2.7 using the VisualRecognitionV3 class from the python Watson developer cloud service. I created a Watson class to implement the create_classifier(), get_classifier(), delete_classifier(), and classify() functions. I had an api key from before but now after running the previous functions I have the following errors:

running get_classifier(classifier_id = ''):

Output: {u'classifiers': []}

running create_classifier():

Output:

WatsonException: Error: Cannot execute learning task.  : this plan instance can have only 1 custom classifier(s), and 1 already exist., Code: 400

running delete_classifier(classifier_id = ''):

Output:

WatsonException: Unknown error

running classify(classifier_id = '')

Output:

{
  "images": [
    {
      "image": filepath, 
      "classifiers": [
        {
          "classes": [
            {
              "score": 0.738, 
              "class": "open-end wrench", 
              "type_hierarchy": "/tool/open-end wrench"
            }, 
            {
              "score": 0.785, 
              "class": "wrench"
            }, 
            ...
            {
              "score": 0.644, 
              "class": "dark red color"
            }
          ], 
          "classifier_id": "default", 
          "name": "default"
        }
      ]
    }
  ], 
  "custom_classes": 0, 
  "images_processed": 1
}

I was supposed to get two classes for the bottom but I have zero classes. I have tried using another API key via a 30-day trial but I am getting an Error 403: invalid API key. Does anyone know how to eliminate the current class without a classifier_id and generate a new one, or use the old one to generate a working one? Any ideas would be much appreciated. Thanks!

1 Answers1

0

This is almost certainly a "hiccup" in the system where the custom classifier that you previously created and deleted was not fully purged, and therefore the system will not allow you to create another custom classifier while it stills think you have one existing. I assume that your API key is a free one?

If you create a Bluemix support ticket that includes your API key, we can reset the status so that you can proceed with training. If you have it, please also include the "owner" id field and "classifier_id" of the previous custom classifier that you had.

Thanks for trying Visual Recognition custom classification, and sorry for this inconvenience.

Matt Hill
  • 1,081
  • 6
  • 4
  • 1
    Thanks for the response! I will submit a Bluemix support ticket with the API key. And yes it is a free API key. It was by my company's account but right now I got a free API key from my personal Bluemix account and it works. Will troubleshoot with the former to get things cleared out. – Samba Njie Jr. Jun 28 '17 at 04:44