我正在使用云视觉 API 的 android 示例,我只得到了 LABEL_DETECTION 的正确响应,对于 FACE_DETECTION 或 SAFE_SEARCH_DETECTION 之类的任何其他响应,我的响应中什么都没有。注意:我使用的是浏览器密钥,API 密钥不起作用。
我正在将下面的代码 .setType LABEL_DETECTION 更改为例如 FACE_DETECTION,它不起作用。
https://github.com/GoogleCloudPlatform/cloud-vision/tree/master/android
// add the features we want
annotateImageRequest.setFeatures(new ArrayList<Feature>() {{
Feature labelDetection = new Feature();
labelDetection.setType("LABEL_DETECTION");
labelDetection.setMaxResults(10);
add(labelDetection);
}});
任何指针。