1
+
1
2
.. This file is automatically generated. Do not edit this file directly.
2
3
3
4
Google Cloud Video Intelligence API Python Samples
@@ -14,10 +15,12 @@ This directory contains samples for Google Cloud Video Intelligence API. `Google
14
15
15
16
.. _Google Cloud Video Intelligence API : https://cloud.google.com/video-intelligence/docs
16
17
18
+
17
19
Setup
18
20
-------------------------------------------------------------------------------
19
21
20
22
23
+
21
24
Authentication
22
25
++++++++++++++
23
26
@@ -28,6 +31,9 @@ credentials for applications.
28
31
.. _Authentication Getting Started Guide :
29
32
https://cloud.google.com/docs/authentication/getting-started
30
33
34
+
35
+
36
+
31
37
Install Dependencies
32
38
++++++++++++++++++++
33
39
@@ -42,7 +48,7 @@ Install Dependencies
42
48
.. _Python Development Environment Setup Guide :
43
49
https://cloud.google.com/python/setup
44
50
45
- #. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4 +.
51
+ #. Create a virtualenv. Samples are compatible with Python 3.6 +.
46
52
47
53
.. code-block :: bash
48
54
@@ -58,9 +64,15 @@ Install Dependencies
58
64
.. _pip : https://pip.pypa.io/
59
65
.. _virtualenv : https://virtualenv.pypa.io/
60
66
67
+
68
+
69
+
70
+
71
+
61
72
Samples
62
73
-------------------------------------------------------------------------------
63
74
75
+
64
76
analyze
65
77
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
66
78
@@ -76,30 +88,44 @@ To run this sample:
76
88
77
89
$ python analyze.py
78
90
79
- usage: analyze.py [-h] {labels,labels_file,explicit_content,shots} ...
91
+
92
+ usage: analyze.py [-h]
93
+ {labels,labels_file,explicit_content,shots,transcribe,text_gcs,text_file,objects_gcs,objects_file}
94
+ ...
80
95
81
96
This application demonstrates label detection,
82
97
explicit content, and shot change detection using the Google Cloud API.
83
98
84
99
Usage Examples:
85
100
86
- python analyze.py labels gs://cloud-ml-sandbox /video/chicago.mp4
101
+ python analyze.py labels gs://cloud-samples-data /video/chicago.mp4
87
102
python analyze.py labels_file resources/cat.mp4
88
103
python analyze.py shots gs://cloud-samples-data/video/gbikes_dinosaur.mp4
89
- python analyze.py explicit_content gs://cloud-samples-data/video/gbikes_dinosaur.mp4
104
+ python analyze.py explicit_content gs://cloud-samples-data/video/gbikes_dinosaur.mp4
105
+ python analyze.py text_gcs gs://cloud-samples-data/video/googlework_tiny.mp4
106
+ python analyze.py text_file resources/googlework_tiny.mp4
107
+ python analyze.py objects_gcs gs://cloud-samples-data/video/cat.mp4
108
+ python analyze.py objects_file resources/cat.mp4
90
109
91
110
positional arguments:
92
- {labels,labels_file,explicit_content,shots}
111
+ {labels,labels_file,explicit_content,shots,transcribe,text_gcs,text_file,objects_gcs,objects_file }
93
112
labels Detects labels given a GCS path.
94
113
labels_file Detect labels given a file path.
95
114
explicit_content Detects explicit content from the GCS path to a video.
96
115
shots Detects camera shot changes.
116
+ transcribe Transcribe speech from a video stored on GCS.
117
+ text_gcs Detect text in a video stored on GCS.
118
+ text_file Detect text in a local video.
119
+ objects_gcs Object tracking in a video stored on GCS.
120
+ objects_file Object tracking in a local video.
97
121
98
122
optional arguments:
99
123
-h, --help show this help message and exit
100
124
101
125
102
126
127
+
128
+
103
129
beta samples
104
130
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
105
131
@@ -115,25 +141,46 @@ To run this sample:
115
141
116
142
$ python beta_snippets.py
117
143
144
+
118
145
usage: beta_snippets.py [-h]
119
- {transcription,video-text-gcs,video-text,track-objects-gcs,track-objects}
146
+ {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 }
120
147
...
121
148
122
149
This application demonstrates speech transcription using the
123
150
Google Cloud API.
124
151
125
152
Usage Examples:
126
- python beta_snippets.py transcription gs://python-docs-samples-tests/video/googlework_tiny.mp4
127
- python beta_snippets.py video-text-gcs gs://python-docs-samples-tests/video/googlework_tiny.mp4
128
- python beta_snippets.py track-objects /resources/cat.mp4
153
+ python beta_snippets.py transcription gs://python-docs-samples-tests/video/googlework_tiny.mp4
154
+
155
+ python beta_snippets.py video-text-gcs gs://python-docs-samples-tests/video/googlework_tiny.mp4
156
+
157
+ python beta_snippets.py track-objects resources/cat.mp4
158
+
159
+ python beta_snippets.py streaming-labels resources/cat.mp4
160
+
161
+ python beta_snippets.py streaming-shot-change resources/cat.mp4
162
+
163
+ python beta_snippets.py streaming-objects resources/cat.mp4
164
+
165
+ python beta_snippets.py streaming-explicit-content resources/cat.mp4
166
+
167
+ python beta_snippets.py streaming-annotation-storage resources/cat.mp4 gs://mybucket/myfolder
168
+
169
+ python beta_snippets.py streaming-automl-classification resources/cat.mp4 $PROJECT_ID $MODEL_ID
129
170
130
171
positional arguments:
131
- {transcription,video-text-gcs,video-text,track-objects-gcs,track-objects}
172
+ {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 }
132
173
transcription Transcribe speech from a video stored on GCS.
133
174
video-text-gcs Detect text in a video stored on GCS.
134
175
video-text Detect text in a local video.
135
176
track-objects-gcs Object Tracking.
136
177
track-objects Object Tracking.
178
+ streaming-labels
179
+ streaming-shot-change
180
+ streaming-objects
181
+ streaming-explicit-content
182
+ streaming-annotation-storage
183
+ streaming-automl-classification
137
184
138
185
optional arguments:
139
186
-h, --help show this help message and exit
@@ -142,6 +189,10 @@ To run this sample:
142
189
143
190
144
191
192
+
193
+
194
+
195
+
145
196
The client library
146
197
-------------------------------------------------------------------------------
147
198
@@ -157,4 +208,5 @@ to `browse the source`_ and `report issues`_.
157
208
https://github.com/GoogleCloudPlatform/google-cloud-python/issues
158
209
159
210
211
+
160
212
.. _Google Cloud SDK : https://cloud.google.com/sdk/
0 commit comments