You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not clear how to do label detection with google-cloud-vision. There's a complete mismatch between what's specified in this repository and what's on the docs page. If there's been a breaking change, the docs page should be clear in making it known.
Hi @nwaughachukwuma, thanks for reaching out. I tried the sample provided in the link and it seems to work as expected.
Code:
# Imports the Google Cloud client libraryfromgoogle.cloudimportvisiondefrun_quickstart() ->vision.EntityAnnotation:
"""Provides a quick start example for Cloud Vision."""# Instantiates a clientclient=vision.ImageAnnotatorClient()
# The URI of the image file to annotatefile_uri="gs://cloud-samples-data/vision/label/wakeupcat.jpg"image=vision.Image()
image.source.image_uri=file_uri# Performs label detection on the image fileresponse=client.label_detection(image=image)
print("response: ", response)
labels=response.label_annotationsprint("Labels:")
forlabelinlabels:
print(label.description)
returnlabelsrun_quickstart()
It's not clear how to do label detection with google-cloud-vision. There's a complete mismatch between what's specified in this repository and what's on the docs page. If there's been a breaking change, the docs page should be clear in making it known.
Nothing in the following link works for me - https://cloud.google.com/vision/docs/libraries
Please specify how to perform label detection using cloud vision or what document I should be looking at. Thank you.
The text was updated successfully, but these errors were encountered: