Skip to content
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

Initial vision API addition. #1803

Closed
wants to merge 2 commits into from
Closed

Conversation

daspecster
Copy link
Contributor

Fairly rough and a lot of conversation to be had.

  • Face
  • Landmark
  • Logo
  • Label
  • Text
  • Safe Search

Examples to play with

>>> from gcloud.vision import Client
>>> vc = Client('ferrous-arena')
>>> f = open('/tmp/car.jpg', 'r')
>>> vc.annotate(f.read(), 'LABEL_DETECTION', 3)
>>> vc.annotate('gs://ferrous-arena-my-test-bucket/car.jpg', 'LABEL_DETECTION', 3)

@daspecster daspecster added do not merge Indicates a pull request not ready for merge, due to either quality or timing. api: vision Issues related to the Cloud Vision API. labels May 17, 2016
@daspecster daspecster added this to the Vision Alpha milestone May 17, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 17, 2016
_topicality = None
_bounding_poly = None
_locations = []
_properties = []

This comment was marked as spam.

@theacodes
Copy link
Contributor

vc.annotate(f.read(), 'LABEL_DETECTION', 3)

I'd prefer constants over strings, even if they semantically mean the same thing:

vc.annotate(f.read(), vision.LABEL_DETECTION, 3)

def as_dict(self):
return {
"image": self.image,
"features": self.features

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented May 17, 2016

Rather than writing and dumping all this code, please draft a vision-usage.rst doc and we can discuss features before there is code.

Once we agree on something, try to land them feature by feature so review doesn't become unmanageable. (e.g. you couldn't just sent a tiny PR with the Connection, then a tiny PR with the Client and then build up the client for each feature).

(PS I know I "broke the rules" in #1772 however the entire API is contained in three methods so I did it "on purpose" / was aware it was a bit of a brain dump.)

@tseaver
Copy link
Contributor

tseaver commented May 17, 2016

(PS I know I "broke the rules" in #1772 however the entire API is contained in three methods so I did it "on purpose" / was aware it was a bit of a brain dump.)

#1772 has have 70+ comments on it, which is a sign that we should've argued out the API surface first. :)

@dhermes
Copy link
Contributor

dhermes commented May 17, 2016

@tseaver I totally agree and wish I had done that.

@daspecster
Copy link
Contributor Author

Ok, I'll make a PR with just a vision-usage.rst and then we can talk about it there.

@tseaver
Copy link
Contributor

tseaver commented May 23, 2016

In favor of #1809 ans subsequent.

@tseaver tseaver closed this May 23, 2016
daspecster added a commit to daspecster/google-cloud-python that referenced this pull request Jul 6, 2016
daspecster added a commit to daspecster/google-cloud-python that referenced this pull request Aug 1, 2016
daspecster added a commit to daspecster/google-cloud-python that referenced this pull request Aug 18, 2016
daspecster added a commit to daspecster/google-cloud-python that referenced this pull request Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vision Issues related to the Cloud Vision API. cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants