Add vision label detection#2237
Conversation
8395fa7 to
c49f0c2
Compare
c49f0c2 to
8669d3a
Compare
|
@tseaver LMKWYT! |
google/cloud/vision/entity.py
Outdated
| bounds = Bounds.from_api_repr(response['boundingPoly']) | ||
| bounds = [] | ||
| if 'boundingPoly' in response: | ||
| bounds = Bounds.from_api_repr(response['boundingPoly']) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/cloud/vision/entity.py
Outdated
| bounds = [] | ||
| if 'boundingPoly' in response: | ||
| bounds = Bounds.from_api_repr(response['boundingPoly']) | ||
| bounds = Bounds.from_api_repr(response.get('boundingPoly', {})) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| vertices.append(Vertex(vertex.get('x', None), | ||
| vertex.get('y', None))) | ||
| vertices = [Vertex(vertex.get('x', None), vertex.get('y', None)) for | ||
| vertex in response_vertices.get('vertices', [])] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
c71fa03 to
f75f96d
Compare
|
@tseaver anything else? |
|
LGTM pending Travis. |
f75f96d to
408f929
Compare
|
Squashed...going to wait for travis one more time. |
Based off of #2236.
I was able to DRY up the requests code for the
EntityAnnotationbased detection types.✅ Waiting for #2236 before rebasing.