1

I would like to use the Google Vision API for label detection. But I want to decrease the labels percentages and I do not know how I can do this. Could someone help me? I am using a sample. I'm using a sample for android that google makes available This is the code:

https://github.com/GoogleCloudPlatform/cloud-vision/blob/master/android/CloudVision/app/src/main/java/com/google/sample/cloudvision/MainActivity.java

And this and that aside it displays the results:

 // add the features we want
     annotateImageRequest.setFeatures(new ArrayList<Feature>() {{
                            Feature labelDetection = new Feature();
                            labelDetection.setType("LABEL_DETECTION");
                            labelDetection.setMaxResults(10);
                            add(labelDetection);
                        }});

1 Answers1

0

Do you mean you'd like to show more results (labels)? If this is the case, just increase MAX_LABEL_RESULTS value (the default is set to 10).

In code snippet you posted you just need to change labelDetection.setMaxResults(10); for example to labelDetection.setMaxResults(15);

ajot
  • 1