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

Video GA text detection and object tracking #2024

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update sample data location
  • Loading branch information
dizcology committed Feb 26, 2019
commit 77f1621c752a915b21e959fa631284643d387dbc
7 changes: 4 additions & 3 deletions video/cloud-client/analyze/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@

Usage Examples:

python analyze.py labels gs://cloud-ml-sandbox/video/chicago.mp4
python analyze.py labels gs://cloud-samples-data/video/chicago.mp4
python analyze.py labels_file resources/cat.mp4
python analyze.py shots gs://demomaker/gbikes_dinosaur.mp4
python analyze.py explicit_content gs://demomaker/gbikes_dinosaur.mp4
python analyze.py shots gs://cloud-samples-data/video/gbikes_dinosaur.mp4
python analyze.py explicit_content \
gs://cloud-samples-data/video/gbikes_dinosaur.mp4
python analyze.py text_gcs \
gs://cloud-samples-data/video/googlework_short.mp4
python analyze.py text_file resources/googlework_short.mp4
Expand Down
8 changes: 4 additions & 4 deletions video/cloud-client/analyze/analyze_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@

@pytest.mark.slow
def test_analyze_shots(capsys):
analyze.analyze_shots('gs://demomaker/gbikes_dinosaur.mp4')
analyze.analyze_shots('gs://cloud-samples-data/video/gbikes_dinosaur.mp4')
out, _ = capsys.readouterr()
assert 'Shot 1:' in out


@pytest.mark.slow
def test_analyze_labels(capsys):
analyze.analyze_labels('gs://demomaker/cat.mp4')
analyze.analyze_labels('gs://cloud-samples-data/video/cat.mp4')
out, _ = capsys.readouterr()
assert 'label description: cat' in out


@pytest.mark.slow
def test_analyze_explicit_content(capsys):
analyze.analyze_explicit_content('gs://demomaker/cat.mp4')
analyze.analyze_explicit_content('gs://cloud-samples-data/video/cat.mp4')
out, _ = capsys.readouterr()
assert 'pornography' in out


@pytest.mark.slow
def test_speech_transcription(capsys):
analyze.speech_transcription(
'gs://python-docs-samples-tests/video/googlework_short.mp4')
'gs://cloud-samples-data/video/googlework_short.mp4')
out, _ = capsys.readouterr()
assert 'cultural' in out