-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vision region tag update #1635
Vision region tag update #1635
Changes from all commits
4eb12bd
f385d28
86c1ca6
ab42e85
52d4541
bcb2505
57937db
e4948ec
6f66348
1c32f28
b0b4cb0
969ea41
d2546a9
462e422
02f8931
dcbbe35
a21c39d
215a1a3
d51ec85
846f067
525e3bc
4f6052c
07be308
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ def localize_objects(path): | |
# [END vision_localize_objects] | ||
|
||
|
||
# [START vision_localize_objects_uri] | ||
# [START vision_localize_objects_gcs] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if i remember correctly the API accepts both GCS URI and HTTP URI, in this case the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. _gcs and _uri were previously inconsistently used across languages and samples. I standardized to choose _gcs when it was a GCS URI. I will keep in mind to change if it is an HTTP URI. |
||
def localize_objects_uri(uri): | ||
"""Localize objects in the image on Google Cloud Storage | ||
|
||
|
@@ -81,7 +81,7 @@ 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_uri] | ||
# [END vision_localize_objects_gcs] | ||
|
||
|
||
# [START vision_handwritten_ocr] | ||
|
@@ -130,7 +130,7 @@ def detect_handwritten_ocr(path): | |
# [END vision_handwritten_ocr] | ||
|
||
|
||
# [START vision_handwritten_ocr_uri] | ||
# [START vision_handwritten_ocr_gcs] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on the other hand here i think the uri must be a GCS uri. |
||
def detect_handwritten_ocr_uri(uri): | ||
"""Detects handwritten characters in the file located in Google Cloud | ||
Storage. | ||
|
@@ -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_uri] | ||
# [END vision_handwritten_ocr_gcs] | ||
|
||
|
||
if __name__ == '__main__': | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the region tag need to be consistent with the function name? here the tag says
...draw_crop_hints
while the function's name isdraw_hint
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The region tag does not need to have the same name as the function