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
16 changes: 8 additions & 8 deletions vision/cloud-client/detect/beta_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import io


# [START vision_localize_objects]
# [START vision_localize_objects_beta]
def localize_objects(path):
"""Localize objects in the local image.

Expand All @@ -56,10 +56,10 @@ def localize_objects(path):
print('Normalized bounding polygon vertices: ')
for vertex in object_.bounding_poly.normalized_vertices:
print(' - ({}, {})'.format(vertex.x, vertex.y))
# [END vision_localize_objects]
# [END vision_localize_objects_beta]


# [START vision_localize_objects_gcs]
# [START vision_localize_objects_gcs_beta]
def localize_objects_uri(uri):
"""Localize objects in the image on Google Cloud Storage

Expand All @@ -81,10 +81,10 @@ def localize_objects_uri(uri):
print('Normalized bounding polygon vertices: ')
for vertex in object_.bounding_poly.normalized_vertices:
print(' - ({}, {})'.format(vertex.x, vertex.y))
# [END vision_localize_objects_gcs]
# [END vision_localize_objects_gcs_beta]


# [START vision_handwritten_ocr]
# [START vision_handwritten_ocr_beta]
def detect_handwritten_ocr(path):
"""Detects handwritten characters in a local image.

Expand Down Expand Up @@ -127,10 +127,10 @@ def detect_handwritten_ocr(path):
for symbol in word.symbols:
print('\tSymbol: {} (confidence: {})'.format(
symbol.text, symbol.confidence))
# [END vision_handwritten_ocr]
# [END vision_handwritten_ocr_beta]


# [START vision_handwritten_ocr_gcs]
# [START vision_handwritten_ocr_gcs_beta]
def detect_handwritten_ocr_uri(uri):
"""Detects handwritten characters in the file located in Google Cloud
Storage.
Expand Down Expand Up @@ -171,7 +171,7 @@ def detect_handwritten_ocr_uri(uri):
for symbol in word.symbols:
print('\tSymbol: {} (confidence: {})'.format(
symbol.text, symbol.confidence))
# [END vision_handwritten_ocr_gcs]
# [END vision_handwritten_ocr_gcs_beta]


if __name__ == '__main__':
Expand Down