Skip to content

Commit

Permalink
feat(v1): add PersonDetection and FaceDetection (#53)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yoshi-automation authored Oct 2, 2020
1 parent 8a8e52b commit 1670a1e
Show file tree
Hide file tree
Showing 21 changed files with 1,424 additions and 329 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ class Feature(enum.IntEnum):
LABEL_DETECTION (int): Label detection. Detect objects, such as dog or flower.
SHOT_CHANGE_DETECTION (int): Shot change detection.
EXPLICIT_CONTENT_DETECTION (int): Explicit content detection.
FACE_DETECTION (int): Human face detection and tracking.
FACE_DETECTION (int): Human face detection.
SPEECH_TRANSCRIPTION (int): Speech transcription.
TEXT_DETECTION (int): OCR text detection and tracking.
OBJECT_TRACKING (int): Object detection and tracking.
LOGO_RECOGNITION (int): Logo detection, tracking, and recognition.
PERSON_DETECTION (int): Person detection.
"""

FEATURE_UNSPECIFIED = 0
Expand All @@ -44,6 +45,7 @@ class Feature(enum.IntEnum):
TEXT_DETECTION = 7
OBJECT_TRACKING = 9
LOGO_RECOGNITION = 12
PERSON_DETECTION = 14


class LabelDetectionMode(enum.IntEnum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@


class VideoIntelligenceServiceClient(object):
"""Service that implements Google Cloud Video Intelligence API."""
"""Service that implements the Video Intelligence API."""

SERVICE_ADDRESS = "videointelligence.googleapis.com:443"
"""The default address of the service."""
Expand Down Expand Up @@ -233,33 +233,33 @@ def annotate_video(
Args:
features (list[~google.cloud.videointelligence_v1.types.Feature]): Required. Requested video annotation features.
input_uri (str): Input video location. Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
input_uri (str): Input video location. Currently, only `Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported. URIs
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/request-endpoints>`__. A
video URI may include wildcards in ``object-id``, and thus identify
multiple videos. Supported wildcards: '*' to match 0 or more characters;
URIs <https://cloud.google.com/storage/docs/request-endpoints>`__. To
identify multiple videos, a video URI may include wildcards in the
``object-id``. Supported wildcards: '*' to match 0 or more characters;
'?' to match 1 character. If unset, the input video should be embedded
in the request as ``input_content``. If set, ``input_content`` should be
in the request as ``input_content``. If set, ``input_content`` must be
unset.
input_content (bytes): The video data bytes. If unset, the input video(s) should be
specified via ``input_uri``. If set, ``input_uri`` should be unset.
specified via the ``input_uri``. If set, ``input_uri`` must be unset.
video_context (Union[dict, ~google.cloud.videointelligence_v1.types.VideoContext]): Additional video context and/or feature-specific parameters.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.videointelligence_v1.types.VideoContext`
output_uri (str): Optional. Location where the output (in JSON format) should be
stored. Currently, only `Google Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported, which
stored. Currently, only `Cloud
Storage <https://cloud.google.com/storage/>`__ URIs are supported. These
must be specified in the following format: ``gs://bucket-id/object-id``
(other URI formats return ``google.rpc.Code.INVALID_ARGUMENT``). For
more information, see `Request
URIs <https://cloud.google.com/storage/docs/request-endpoints>`__.
location_id (str): Optional. Cloud region where annotation should take place. Supported
cloud regions: ``us-east1``, ``us-west1``, ``europe-west1``,
``asia-east1``. If no region is specified, a region will be determined
cloud regions are: ``us-east1``, ``us-west1``, ``europe-west1``,
``asia-east1``. If no region is specified, the region will be determined
based on video file location.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,34 @@
"interfaces": {
"google.cloud.videointelligence.v1.VideoIntelligenceService": {
"retry_codes": {
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
"non_idempotent": [],
"retry_policy_1_codes": ["UNAVAILABLE", "DEADLINE_EXCEEDED"],
"no_retry_codes": [],
},
"retry_params": {
"default": {
"retry_policy_1_params": {
"initial_retry_delay_millis": 1000,
"retry_delay_multiplier": 2.5,
"max_retry_delay_millis": 120000,
"initial_rpc_timeout_millis": 120000,
"initial_rpc_timeout_millis": 600000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 120000,
"max_rpc_timeout_millis": 600000,
"total_timeout_millis": 600000,
}
},
"no_retry_params": {
"initial_retry_delay_millis": 0,
"retry_delay_multiplier": 0.0,
"max_retry_delay_millis": 0,
"initial_rpc_timeout_millis": 0,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 0,
"total_timeout_millis": 0,
},
},
"methods": {
"AnnotateVideo": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"timeout_millis": 600000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
}
},
}
Expand Down
Loading

0 comments on commit 1670a1e

Please sign in to comment.