我想使用 Google Vision API 进行标签检测。但我想减少标签百分比,但我不知道如何做到这一点。有人可以帮助我吗?我正在使用一个样本。我正在使用谷歌提供的 Android 示例 这是代码:
除了这个和那个之外,它还显示结果:
// add the features we want
annotateImageRequest.setFeatures(new ArrayList<Feature>() {{
Feature labelDetection = new Feature();
labelDetection.setType("LABEL_DETECTION");
labelDetection.setMaxResults(10);
add(labelDetection);
}});
最佳答案
您的意思是您想显示更多结果(标签)吗?如果是这种情况,只需增加 MAX_LABEL_RESULTS
值(默认设置为 10)。
在您发布的代码 fragment 中,您只需将 labelDetection.setMaxResults(10);
更改为 labelDetection.setMaxResults(15);
关于java - Google Vision APi 标签降低了标签百分比,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46594701/