IBM Watson Visual Recognition 服务中 class 名称的规则是什么?

What are the rules for class names in IBM Watson Visual Recognition service?

我正在探索 IBM Watson Visual Recognition 服务,当我创建一个 classifier 使用 class 名称如'black-dog'(即black-dog_positive_example),此 classname 稍后返回为 'black_dog'(用 下划线 替换 dash) 当我 class 使用 /v3/classify 端点验证图像时。

但是当我使用 /v3/classifiers/{classifier_id} 检索 classifier 详细信息时,class 被正确地列为 'black-dog'。

所以,我对 GET /v3/classifiers/{classifier_id} 的结果是这样的:

{
    "classifier_id": "dog_561932172",
    "name": "dog",
    "owner": "xxxxxxxx-xxx-xxx-xxx-xxxxxxxxxxxx",
    "status": "ready",
    "created": "2016-07-30T22:06:39.327Z",
    "classes": [
        {"class": "black-dog"}
    ]
}

而我 GET /v3/classify 的结果是

{
  "custom_classes": 1,
  "images": [
    {
      "classifiers": [
        {
          "classes": [
            {
              "class": "black_dog",
              "score": 0.546941
            }
          ],
          "classifier_id": "dog_561932172",
          "name": "dog"
        }
      ],
      "image": "20160620_142113.jpg"
    }
  ],
  "images_processed": 1
}

这是意料之中的还是缺陷?我应该避免在 class 名称中使用“-”吗? classname 的值是否有任何其他规则?

更新:

通过马特的回答更新。


与支持团队交谈,这确实是一个错误。这是他们的回复:

Thanks for pointing this out. I reproduced and confirmed with dev team, and we do consider this inconsistency between the listed class name and the class name in results is a bug.

And this is because the class name been altered in result from what is submitted.

I have raised a ticket for tracking on this. According to developer, currently the output can be either a document to list the substitutions or find a way to remove them.

...所以他们目前正在努力。

Are there any other rules for the value of a classname?

我们进行了更新,该服务不应再修改任何 class 名称,例如用下划线替换破折号。相反,它不会接受具有以下任何字符的 class 名称用于自定义学习:\,|,*,{,},$,-,/,',`,"

(您会看到破折号包含在其中。)空格是可以接受的。此更新不具有追溯力,因此在训练期间修改的现有 class 个名称不受影响。