Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions vision/snippets/detect/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,12 @@ def detect_logos(path):

image = vision.Image(content=content)

response = client.logo_detection(image=image)
request = {
"image": image,
"features": [{"type_": vision.Feature.Type.LOGO_DETECTION}],
}

response = client.annotate_image(request=request)
Comment thread
Alan5142 marked this conversation as resolved.
logos = response.logo_annotations
print("Logos:")

Expand All @@ -293,7 +298,13 @@ def detect_logos_uri(uri):
image = vision.Image()
image.source.image_uri = uri

response = client.logo_detection(image=image)
request = {
"image": image,
"features": [{"type_": vision.Feature.Type.LOGO_DETECTION}],
}

response = client.annotate_image(request=request)
Comment thread
Alan5142 marked this conversation as resolved.

logos = response.logo_annotations
print("Logos:")

Expand Down