Skip to content

Commit

Permalink
vision: update samples to address changes in model annotations. (#1991)
Browse files Browse the repository at this point in the history
changes to the vision model evaluation changed annotations for
some of the sample data used in these tests.  This corrects those
expectations to reflect current evaluation.

Background: internal issue 123358697
  • Loading branch information
shollyman authored Feb 1, 2019
1 parent 2bc5cef commit dc67b74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
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.

0 comments on commit dc67b74

Please sign in to comment.