Google cloud vision api detects different number of labels

Viewed 1841

As per this page, the following code snippet returns 5 labels:

from google.cloud import vision
url = 'https://farm9.staticflickr.com/8215/8267748261_ea142faf5e.jpg'

client = vision.ImageAnnotatorClient()
client.label_detection({'source': {'image_uri': url}}) # yields 5

When I do it as described here, I get 10 labels:

client = vision.Client()
image = client.image(source_uri=url)
labels = image.detect_labels() # yields 10

When I use the Cloud Vision demo page, I get 18 labels for the same image.

Why do these approaches all differ? What am I missing here?

1 Answers
Related