Ibm cloud watson视觉识别错误400:无法执行学习任务:未给出分类器名称

Ibm cloud watson视觉识别错误400:无法执行学习任务:未给出分类器名称,ibm-cloud,ibm-watson,visual-recognition,Ibm Cloud,Ibm Watson,Visual Recognition,我正要创建一个新的分类器,并用图片训练视觉识别,但当我执行以下命令时,我得到了标题中所述的错误代码 curl -u "0xxxxxxxxxxx":"vxxxxxxxxxxxxxx" \ -X POST \ -F "positive_examples=@bottle-positive.zip" \ -F "negative_examples=@bottle-negative.zip" \ -F "name=plasticbottle" \ -k "https://gateway.wats

我正要创建一个新的分类器,并用图片训练视觉识别,但当我执行以下命令时,我得到了标题中所述的错误代码

curl -u "0xxxxxxxxxxx":"vxxxxxxxxxxxxxx" \
 -X POST \
 -F "positive_examples=@bottle-positive.zip" \
 -F "negative_examples=@bottle-negative.zip" \
 -F "name=plasticbottle" \
 -k "https://gateway.watsonplatform.net/visual-recognition-beta/api/v2/classifiers?version=2015-12-02"

要设置要使用的分类器,必须发送包含以下内容的JSON:

{"classifier_ids": ["ClassifierName"]}
curl -u "username":"pwd"  \
-X POST \
-F "images_file=@imagefilename.jpg" \
-F "classifier_ids={\"classifier_ids\":[\"ClassifierName\"]}"
"https://gateway.watsonplatform.net/visual-recognition-beta/api/v2/classify?version=2015-12-02"
所以你的卷曲应该是这样的:

{"classifier_ids": ["ClassifierName"]}
curl -u "username":"pwd"  \
-X POST \
-F "images_file=@imagefilename.jpg" \
-F "classifier_ids={\"classifier_ids\":[\"ClassifierName\"]}"
"https://gateway.watsonplatform.net/visual-recognition-beta/api/v2/classify?version=2015-12-02"

我不确定使用v2api时出现了什么问题,但是现在,使用v3api时,您的CURL应该与下面的示例类似

curl -X POST
-F "apple_positive_examples=@apples1.zip"
-F "banana_positive_examples=@yellow.zip"
-F "orange_positive_example=@pos_ex.zip"
-F "negative_examples=@vegetables.zip"
-F "name=fruit"
"https://gateway-a.watsonplatform.net/visual-recognition/api/v3/classifiers?api_key={api-key}&version=2016-05-20"
所以你的奶瓶卷曲应该是

curl -X POST
 -F "bottle_positive_examples=@bottle-positive.zip"
 -F "negative_examples=@bottle-negative.zip"
 -F "name=plasticbottle"
 "https://gateway-a.watsonplatform.net/visual-recognition/api/v3/classifiers?api_key={api-key}&version=2016-05-20"
请注意,现在应该使用api_密钥进行身份验证,而不再是用户/密码

这在v3文档中有记录:

我修改了您的curl命令以满足我的需要,现在它一直运行了一段时间,没有任何反馈。我在另一台机器上运行它,它说{“代码”:400,“错误”:“无法分类。请验证指定的分类器ID是否有效,是否上载了有效的图像。”}然后在我看来,我需要在我的原始帖子中使用curl命令来创建一个分类器,我该怎么做呢?在发送zip图像之前,我尝试以发送name=plasticBattle的方式重新组织curl命令,错误消息是无法训练分类器。验证是否至少有10个正面训练图像和10个负面训练图像彼此不同。“}但是,我确实有50个不同的图像压缩在每个图像中。任何评论都将非常受欢迎,请参见:(部分:创建分类器).该调用返回您可以在上述调用中使用的分类器ID。是的,我读过,但这不是我在原始帖子中看到的吗?