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

vision: update samples to address changes in model annotations. #1991

Merged
merged 2 commits into from
Feb 1, 2019
Merged
Show file tree
Hide file tree
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
9 changes: 3 additions & 6 deletions vision/cloud-client/detect/detect_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,21 @@ def test_logos(capsys):
'resources/logos.png')
detect.detect_logos(file_name)
out, _ = capsys.readouterr()
assert 'Google' in out
assert 'google' in out


def test_logos_uri(capsys):
file_name = 'gs://{}/vision/logos.png'.format(BUCKET)
detect.detect_logos_uri(file_name)
out, _ = capsys.readouterr()
assert 'Google' in out
assert 'google' in out


def test_logos_http(capsys):
uri = 'https://storage-download.googleapis.com/{}/vision/logos.png'
detect.detect_logos_uri(uri.format(BUCKET))
out, _ = capsys.readouterr()
assert 'Google' in out
assert 'google' in out


def test_safe_search(capsys):
Expand Down Expand Up @@ -196,23 +196,20 @@ def test_detect_web(capsys):
'resources/landmark.jpg')
detect.detect_web(file_name)
out, _ = capsys.readouterr()
assert 'Description: Palace of Fine Arts Theatre' in out
assert 'Best guess label: palace of fine arts' in out


def test_detect_web_uri(capsys):
file_name = 'gs://{}/vision/landmark.jpg'.format(BUCKET)
detect.detect_web_uri(file_name)
out, _ = capsys.readouterr()
assert 'Description: Palace of Fine Arts Theatre' in out
assert 'Best guess label: palace of fine arts' in out


def test_detect_web_http(capsys):
uri = 'https://storage-download.googleapis.com/{}/vision/landmark.jpg'
detect.detect_web_uri(uri.format(BUCKET))
out, _ = capsys.readouterr()
assert 'Description: Palace of Fine Arts Theatre' in out
assert 'Best guess label: palace of fine arts' in out


Expand Down
Binary file modified vision/cloud-client/detect/resources/logos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.