Skip to content

Commit

Permalink
chore: update templates
Browse files Browse the repository at this point in the history
  • Loading branch information
danoscarmike committed Sep 30, 2020
1 parent 67c9b82 commit 88a62b3
Show file tree
Hide file tree
Showing 4 changed files with 288 additions and 10 deletions.
1 change: 1 addition & 0 deletions videointelligence/samples/AUTHORING_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md
1 change: 1 addition & 0 deletions videointelligence/samples/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/CONTRIBUTING.md
72 changes: 62 additions & 10 deletions videointelligence/samples/analyze/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.. This file is automatically generated. Do not edit this file directly.
Google Cloud Video Intelligence API Python Samples
Expand All @@ -14,10 +15,12 @@ This directory contains samples for Google Cloud Video Intelligence API. `Google

.. _Google Cloud Video Intelligence API: https://cloud.google.com/video-intelligence/docs


Setup
-------------------------------------------------------------------------------



Authentication
++++++++++++++

Expand All @@ -28,6 +31,9 @@ credentials for applications.
.. _Authentication Getting Started Guide:
https://cloud.google.com/docs/authentication/getting-started




Install Dependencies
++++++++++++++++++++

Expand All @@ -42,7 +48,7 @@ Install Dependencies
.. _Python Development Environment Setup Guide:
https://cloud.google.com/python/setup

#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
#. Create a virtualenv. Samples are compatible with Python 3.6+.

.. code-block:: bash
Expand All @@ -58,9 +64,15 @@ Install Dependencies
.. _pip: https://pip.pypa.io/
.. _virtualenv: https://virtualenv.pypa.io/






Samples
-------------------------------------------------------------------------------


analyze
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -76,30 +88,44 @@ To run this sample:
$ python analyze.py
usage: analyze.py [-h] {labels,labels_file,explicit_content,shots} ...
usage: analyze.py [-h]
{labels,labels_file,explicit_content,shots,transcribe,text_gcs,text_file,objects_gcs,objects_file}
...
This application demonstrates label detection,
explicit content, and shot change detection using the Google Cloud API.
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://cloud-samples-data/video/gbikes_dinosaur.mp4
python analyze.py explicit_content 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_tiny.mp4
python analyze.py text_file resources/googlework_tiny.mp4
python analyze.py objects_gcs gs://cloud-samples-data/video/cat.mp4
python analyze.py objects_file resources/cat.mp4
positional arguments:
{labels,labels_file,explicit_content,shots}
{labels,labels_file,explicit_content,shots,transcribe,text_gcs,text_file,objects_gcs,objects_file}
labels Detects labels given a GCS path.
labels_file Detect labels given a file path.
explicit_content Detects explicit content from the GCS path to a video.
shots Detects camera shot changes.
transcribe Transcribe speech from a video stored on GCS.
text_gcs Detect text in a video stored on GCS.
text_file Detect text in a local video.
objects_gcs Object tracking in a video stored on GCS.
objects_file Object tracking in a local video.
optional arguments:
-h, --help show this help message and exit
beta samples
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -115,25 +141,46 @@ To run this sample:
$ python beta_snippets.py
usage: beta_snippets.py [-h]
{transcription,video-text-gcs,video-text,track-objects-gcs,track-objects}
{transcription,video-text-gcs,video-text,track-objects-gcs,track-objects,streaming-labels,streaming-shot-change,streaming-objects,streaming-explicit-content,streaming-annotation-storage,streaming-automl-classification}
...
This application demonstrates speech transcription using the
Google Cloud API.
Usage Examples:
python beta_snippets.py transcription gs://python-docs-samples-tests/video/googlework_tiny.mp4
python beta_snippets.py video-text-gcs gs://python-docs-samples-tests/video/googlework_tiny.mp4
python beta_snippets.py track-objects /resources/cat.mp4
python beta_snippets.py transcription gs://python-docs-samples-tests/video/googlework_tiny.mp4
python beta_snippets.py video-text-gcs gs://python-docs-samples-tests/video/googlework_tiny.mp4
python beta_snippets.py track-objects resources/cat.mp4
python beta_snippets.py streaming-labels resources/cat.mp4
python beta_snippets.py streaming-shot-change resources/cat.mp4
python beta_snippets.py streaming-objects resources/cat.mp4
python beta_snippets.py streaming-explicit-content resources/cat.mp4
python beta_snippets.py streaming-annotation-storage resources/cat.mp4 gs://mybucket/myfolder
python beta_snippets.py streaming-automl-classification resources/cat.mp4 $PROJECT_ID $MODEL_ID
positional arguments:
{transcription,video-text-gcs,video-text,track-objects-gcs,track-objects}
{transcription,video-text-gcs,video-text,track-objects-gcs,track-objects,streaming-labels,streaming-shot-change,streaming-objects,streaming-explicit-content,streaming-annotation-storage,streaming-automl-classification}
transcription Transcribe speech from a video stored on GCS.
video-text-gcs Detect text in a video stored on GCS.
video-text Detect text in a local video.
track-objects-gcs Object Tracking.
track-objects Object Tracking.
streaming-labels
streaming-shot-change
streaming-objects
streaming-explicit-content
streaming-annotation-storage
streaming-automl-classification
optional arguments:
-h, --help show this help message and exit
Expand All @@ -142,6 +189,10 @@ To run this sample:
The client library
-------------------------------------------------------------------------------

Expand All @@ -157,4 +208,5 @@ to `browse the source`_ and `report issues`_.
https://github.com/GoogleCloudPlatform/google-cloud-python/issues



.. _Google Cloud SDK: https://cloud.google.com/sdk/
Loading

0 comments on commit 88a62b3

Please sign in to comment.