Skip to content

Commit 1670a1e

Browse files
feat(v1): add PersonDetection and FaceDetection (#53)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/754b31d4-619a-44bd-8949-623b99df0621/targets - [ ] To automatically regenerate this PR, check this box.
1 parent 8a8e52b commit 1670a1e

21 files changed

+1424
-329
lines changed

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/gapic/enums.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ class Feature(enum.IntEnum):
2828
LABEL_DETECTION (int): Label detection. Detect objects, such as dog or flower.
2929
SHOT_CHANGE_DETECTION (int): Shot change detection.
3030
EXPLICIT_CONTENT_DETECTION (int): Explicit content detection.
31-
FACE_DETECTION (int): Human face detection and tracking.
31+
FACE_DETECTION (int): Human face detection.
3232
SPEECH_TRANSCRIPTION (int): Speech transcription.
3333
TEXT_DETECTION (int): OCR text detection and tracking.
3434
OBJECT_TRACKING (int): Object detection and tracking.
3535
LOGO_RECOGNITION (int): Logo detection, tracking, and recognition.
36+
PERSON_DETECTION (int): Person detection.
3637
"""
3738

3839
FEATURE_UNSPECIFIED = 0
@@ -44,6 +45,7 @@ class Feature(enum.IntEnum):
4445
TEXT_DETECTION = 7
4546
OBJECT_TRACKING = 9
4647
LOGO_RECOGNITION = 12
48+
PERSON_DETECTION = 14
4749

4850

4951
class LabelDetectionMode(enum.IntEnum):

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/gapic/video_intelligence_service_client.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848

4949
class VideoIntelligenceServiceClient(object):
50-
"""Service that implements Google Cloud Video Intelligence API."""
50+
"""Service that implements the Video Intelligence API."""
5151

5252
SERVICE_ADDRESS = "videointelligence.googleapis.com:443"
5353
"""The default address of the service."""
@@ -233,33 +233,33 @@ def annotate_video(
233233
234234
Args:
235235
features (list[~google.cloud.videointelligence_v1.types.Feature]): Required. Requested video annotation features.
236-
input_uri (str): Input video location. Currently, only `Google Cloud
237-
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
236+
input_uri (str): Input video location. Currently, only `Cloud
237+
Storage <https://cloud.google.com/storage/>`__ URIs are supported. URIs
238238
must be specified in the following format: ``gs://bucket-id/object-id``
239239
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
240240
more information, see `Request
241-
URIs <https://cloud.google.com/storage/docs/request-endpoints>`__. A
242-
video URI may include wildcards in ``object-id``, and thus identify
243-
multiple videos. Supported wildcards: '*' to match 0 or more characters;
241+
URIs <https://cloud.google.com/storage/docs/request-endpoints>`__. To
242+
identify multiple videos, a video URI may include wildcards in the
243+
``object-id``. Supported wildcards: '*' to match 0 or more characters;
244244
'?' to match 1 character. If unset, the input video should be embedded
245-
in the request as ``input_content``. If set, ``input_content`` should be
245+
in the request as ``input_content``. If set, ``input_content`` must be
246246
unset.
247247
input_content (bytes): The video data bytes. If unset, the input video(s) should be
248-
specified via ``input_uri``. If set, ``input_uri`` should be unset.
248+
specified via the ``input_uri``. If set, ``input_uri`` must be unset.
249249
video_context (Union[dict, ~google.cloud.videointelligence_v1.types.VideoContext]): Additional video context and/or feature-specific parameters.
250250
251251
If a dict is provided, it must be of the same form as the protobuf
252252
message :class:`~google.cloud.videointelligence_v1.types.VideoContext`
253253
output_uri (str): Optional. Location where the output (in JSON format) should be
254-
stored. Currently, only `Google Cloud
255-
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
254+
stored. Currently, only `Cloud
255+
Storage <https://cloud.google.com/storage/>`__ URIs are supported. These
256256
must be specified in the following format: ``gs://bucket-id/object-id``
257257
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
258258
more information, see `Request
259259
URIs <https://cloud.google.com/storage/docs/request-endpoints>`__.
260260
location_id (str): Optional. Cloud region where annotation should take place. Supported
261-
cloud regions: ``us-east1``, ``us-west1``, ``europe-west1``,
262-
``asia-east1``. If no region is specified, a region will be determined
261+
cloud regions are: ``us-east1``, ``us-west1``, ``europe-west1``,
262+
``asia-east1``. If no region is specified, the region will be determined
263263
based on video file location.
264264
retry (Optional[google.api_core.retry.Retry]): A retry object used
265265
to retry requests. If ``None`` is specified, requests will

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/gapic/video_intelligence_service_client_config.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,34 @@
22
"interfaces": {
33
"google.cloud.videointelligence.v1.VideoIntelligenceService": {
44
"retry_codes": {
5-
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
6-
"non_idempotent": [],
5+
"retry_policy_1_codes": ["UNAVAILABLE", "DEADLINE_EXCEEDED"],
6+
"no_retry_codes": [],
77
},
88
"retry_params": {
9-
"default": {
9+
"retry_policy_1_params": {
1010
"initial_retry_delay_millis": 1000,
1111
"retry_delay_multiplier": 2.5,
1212
"max_retry_delay_millis": 120000,
13-
"initial_rpc_timeout_millis": 120000,
13+
"initial_rpc_timeout_millis": 600000,
1414
"rpc_timeout_multiplier": 1.0,
15-
"max_rpc_timeout_millis": 120000,
15+
"max_rpc_timeout_millis": 600000,
1616
"total_timeout_millis": 600000,
17-
}
17+
},
18+
"no_retry_params": {
19+
"initial_retry_delay_millis": 0,
20+
"retry_delay_multiplier": 0.0,
21+
"max_retry_delay_millis": 0,
22+
"initial_rpc_timeout_millis": 0,
23+
"rpc_timeout_multiplier": 1.0,
24+
"max_rpc_timeout_millis": 0,
25+
"total_timeout_millis": 0,
26+
},
1827
},
1928
"methods": {
2029
"AnnotateVideo": {
21-
"timeout_millis": 60000,
22-
"retry_codes_name": "idempotent",
23-
"retry_params_name": "default",
30+
"timeout_millis": 600000,
31+
"retry_codes_name": "retry_policy_1_codes",
32+
"retry_params_name": "retry_policy_1_params",
2433
}
2534
},
2635
}

0 commit comments

Comments
 (0)