-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add Vision API Face detection. #2224
Add Vision API Face detection. #2224
Conversation
@daspecster pylint is unhappy. |
Hmm I ran lint locally and it passed before I pushed...that's annoying. |
@tseaver how should I rename those attributes? The regex that pycodestyle uses is |
@daspecster Did you run # pylint: disable=invalid-name
# code that violates goes here
# pylint: enable=invalid-name |
744e3d3
to
9b77fc0
Compare
@dhermes I can still do that if we want. I looked around and renaming to |
448abc9
to
9b77fc0
Compare
@daspecster Needs a rebase after #2227, |
edf1b06
to
b50fb61
Compare
@tseaver sorry about that, I can't keep track of my spinning plates. There was a PR before that made a conflict that I had merged in so I thought that was the one you were talking about. |
b50fb61
to
e9b97f4
Compare
1. x,y,z coordinates were too short for attribute names. 2. Too many args for Face.__init__ so moved image property values to FaceImageProperties.
c8e1dd0
to
be05894
Compare
>>> from google.cloud import vision | ||
>>> client = vision.Client() | ||
>>> image = client.image('./image.png') | ||
>>> with io.open('./image.png', 'rb') as image_file: | ||
>>> image = client.image(image_file.read()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I'm not sure what's going on but for some reason unit_tests/vision/test_client.py .......
unit_tests/vision/test_connection.py .
unit_tests/vision/test_face.py ......
unit_tests/vision/test_feature.py ...
unit_tests/vision/test_image.py ...Coverage.py warning: Module google.cloud has no Python source. |
@daspecster The line
has two different messages, separate from one another (essentially there is a missing newline, or more likely one went to stdout and one to stderr). The statement |
Ah I found it! Thank you! |
Yeah the 99% comes from another module under 100% |
|
This should be covering line 46 of image.py. |
It's a branch miss. |
ee65755
to
7520c5c
Compare
A single test shouldn't have to test all branches in a method though? In this case one test covered one branch and another test covered the other AFAICT. |
The |
You can use as many test cases as you need to test all lines and all branches introduced. |
Initial add for face detection.
I'm not sure about the way I have
Likelihood
andFaceLandmarkTypes
setup.If you have some ideas on how that could be improved I would love to hear them.
This looks large, but it's mostly DTOs for the API response.
LMKWYT!