As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Videointelligence v1p3beta1 API

class google.cloud.videointelligence_v1p3beta1.types.AnnotateVideoProgress(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video annotation progress. Included in the metadata field of the Operation returned by the GetOperation call of the google::longrunning::Operations service.

annotation_progress

Progress metadata for all videos specified in AnnotateVideoRequest.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.VideoAnnotationProgress]

class google.cloud.videointelligence_v1p3beta1.types.AnnotateVideoRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video annotation request.

input_uri

Input video location. Currently, only Cloud 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][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs. 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 must be unset.

Type

str

input_content

The video data bytes. If unset, the input video(s) should be specified via the input_uri. If set, input_uri must be unset.

Type

bytes

features

Required. Requested video annotation features.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.Feature]

video_context

Additional video context and/or feature-specific parameters.

Type

google.cloud.videointelligence_v1p3beta1.types.VideoContext

output_uri

Optional. Location where the output (in JSON format) should be stored. Currently, only Cloud 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][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs.

Type

str

location_id

Optional. Cloud region where annotation should take place. Supported 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.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.AnnotateVideoResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video annotation response. Included in the response field of the Operation returned by the GetOperation call of the google::longrunning::Operations service.

annotation_results

Annotation results for all videos specified in AnnotateVideoRequest.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.VideoAnnotationResults]

class google.cloud.videointelligence_v1p3beta1.types.Celebrity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Celebrity definition.

name

The resource name of the celebrity. Have the format video-intelligence/kg-mid indicates a celebrity from preloaded gallery. kg-mid is the id in Google knowledge graph, which is unique for the celebrity.

Type

str

display_name

The celebrity name.

Type

str

description

Textual description of additional information about the celebrity, if applicable.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.CelebrityRecognitionAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Celebrity recognition annotation per video.

celebrity_tracks

The tracks detected from the input video, including recognized celebrities and other detected faces in the video.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.CelebrityTrack]

class google.cloud.videointelligence_v1p3beta1.types.CelebrityTrack(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The annotation result of a celebrity face track. RecognizedCelebrity field could be empty if the face track does not have any matched celebrities.

celebrities

Top N match of the celebrities for the face in this track.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.CelebrityTrack.RecognizedCelebrity]

face_track

A track of a person’s face.

Type

google.cloud.videointelligence_v1p3beta1.types.Track

class RecognizedCelebrity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The recognized celebrity with confidence score.

celebrity

The recognized celebrity.

Type

google.cloud.videointelligence_v1p3beta1.types.Celebrity

confidence

Recognition confidence. Range [0, 1].

Type

float

class google.cloud.videointelligence_v1p3beta1.types.DetectedAttribute(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A generic detected attribute represented by name in string format.

name

The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.

Type

str

confidence

Detected attribute confidence. Range [0, 1].

Type

float

value

Text value of the detection result. For example, the value for “HairColor” can be “black”, “blonde”, etc.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.DetectedLandmark(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A generic detected landmark represented by name in string format and a 2D location.

name

The name of this landmark, for example, left_hand, right_shoulder.

Type

str

point

The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1.

Type

google.cloud.videointelligence_v1p3beta1.types.NormalizedVertex

confidence

The confidence score of the detected landmark. Range [0, 1].

Type

float

class google.cloud.videointelligence_v1p3beta1.types.Entity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Detected entity from video analysis.

entity_id

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

Type

str

description

Textual description, e.g., Fixed-gear bicycle.

Type

str

language_code

Language code for description in BCP-47 format.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.ExplicitContentAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.

frames

All video frames where explicit content was detected.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.ExplicitContentFrame]

class google.cloud.videointelligence_v1p3beta1.types.ExplicitContentDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for EXPLICIT_CONTENT_DETECTION.

model

Model to use for explicit content detection. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.ExplicitContentFrame(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video frame level annotation results for explicit content.

time_offset

Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.

Type

google.protobuf.duration_pb2.Duration

pornography_likelihood

Likelihood of the pornography content..

Type

google.cloud.videointelligence_v1p3beta1.types.Likelihood

class google.cloud.videointelligence_v1p3beta1.types.FaceDetectionAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Face detection annotation.

tracks

The face tracks with attributes.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.Track]

thumbnail

The thumbnail of a person’s face.

Type

bytes

class google.cloud.videointelligence_v1p3beta1.types.FaceDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for FACE_DETECTION.

model

Model to use for face detection. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.

Type

str

include_bounding_boxes

Whether bounding boxes are included in the face annotation output.

Type

bool

include_attributes

Whether to enable face attributes detection, such as glasses, dark_glasses, mouth_open etc. Ignored if ‘include_bounding_boxes’ is set to false.

Type

bool

class google.cloud.videointelligence_v1p3beta1.types.Feature(value)[source]

Bases: proto.enums.Enum

Video annotation feature.

Values:
FEATURE_UNSPECIFIED (0):

Unspecified.

LABEL_DETECTION (1):

Label detection. Detect objects, such as dog or flower.

SHOT_CHANGE_DETECTION (2):

Shot change detection.

EXPLICIT_CONTENT_DETECTION (3):

Explicit content detection.

FACE_DETECTION (4):

Human face detection.

SPEECH_TRANSCRIPTION (6):

Speech transcription.

TEXT_DETECTION (7):

OCR text detection and tracking.

OBJECT_TRACKING (9):

Object detection and tracking.

LOGO_RECOGNITION (12):

Logo detection, tracking, and recognition.

CELEBRITY_RECOGNITION (13):

Celebrity recognition.

PERSON_DETECTION (14):

Person detection.

class google.cloud.videointelligence_v1p3beta1.types.LabelAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Label annotation.

entity

Detected entity.

Type

google.cloud.videointelligence_v1p3beta1.types.Entity

category_entities

Common categories for the detected entity. For example, when the label is Terrier, the category is likely dog. And in some cases there might be more than one categories e.g., Terrier could also be a pet.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.Entity]

segments

All video segments where a label was detected.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.LabelSegment]

frames

All video frames where a label was detected.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.LabelFrame]

class google.cloud.videointelligence_v1p3beta1.types.LabelDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for LABEL_DETECTION.

label_detection_mode

What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels. If unspecified, defaults to SHOT_MODE.

Type

google.cloud.videointelligence_v1p3beta1.types.LabelDetectionMode

stationary_camera

Whether the video has been shot from a stationary (i.e., non-moving) camera. When set to true, might improve detection accuracy for moving objects. Should be used with SHOT_AND_FRAME_MODE enabled.

Type

bool

model

Model to use for label detection. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.

Type

str

frame_confidence_threshold

The confidence threshold we perform filtering on the labels from frame-level detection. If not set, it is set to 0.4 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.

Type

float

video_confidence_threshold

The confidence threshold we perform filtering on the labels from video-level and shot-level detections. If not set, it’s set to 0.3 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.

Type

float

class google.cloud.videointelligence_v1p3beta1.types.LabelDetectionMode(value)[source]

Bases: proto.enums.Enum

Label detection mode.

Values:
LABEL_DETECTION_MODE_UNSPECIFIED (0):

Unspecified.

SHOT_MODE (1):

Detect shot-level labels.

FRAME_MODE (2):

Detect frame-level labels.

SHOT_AND_FRAME_MODE (3):

Detect both shot-level and frame-level labels.

class google.cloud.videointelligence_v1p3beta1.types.LabelFrame(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video frame level annotation results for label detection.

time_offset

Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.

Type

google.protobuf.duration_pb2.Duration

confidence

Confidence that the label is accurate. Range: [0, 1].

Type

float

class google.cloud.videointelligence_v1p3beta1.types.LabelSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video segment level annotation results for label detection.

segment

Video segment where a label was detected.

Type

google.cloud.videointelligence_v1p3beta1.types.VideoSegment

confidence

Confidence that the label is accurate. Range: [0, 1].

Type

float

class google.cloud.videointelligence_v1p3beta1.types.Likelihood(value)[source]

Bases: proto.enums.Enum

Bucketized representation of likelihood.

Values:
LIKELIHOOD_UNSPECIFIED (0):

Unspecified likelihood.

VERY_UNLIKELY (1):

Very unlikely.

UNLIKELY (2):

Unlikely.

POSSIBLE (3):

Possible.

LIKELY (4):

Likely.

VERY_LIKELY (5):

Very likely.

class google.cloud.videointelligence_v1p3beta1.types.LogoRecognitionAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Annotation corresponding to one detected, tracked and recognized logo class.

entity

Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as.

Type

google.cloud.videointelligence_v1p3beta1.types.Entity

tracks

All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.Track]

segments

All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.VideoSegment]

class google.cloud.videointelligence_v1p3beta1.types.NormalizedBoundingBox(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].

left

Left X coordinate.

Type

float

top

Top Y coordinate.

Type

float

right

Right X coordinate.

Type

float

bottom

Bottom Y coordinate.

Type

float

class google.cloud.videointelligence_v1p3beta1.types.NormalizedBoundingPoly(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0—-1 | | 3—-2

When it’s clockwise rotated 180 degrees around the top-left corner it becomes: 2—-3 | | 1—-0

and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.

vertices

Normalized vertices of the bounding polygon.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.NormalizedVertex]

class google.cloud.videointelligence_v1p3beta1.types.NormalizedVertex(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.

x

X coordinate.

Type

float

y

Y coordinate.

Type

float

class google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Annotations corresponding to one tracked object.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

segment

Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears.

This field is a member of oneof track_info.

Type

google.cloud.videointelligence_v1p3beta1.types.VideoSegment

track_id

Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.

This field is a member of oneof track_info.

Type

int

entity

Entity to specify the object category that this track is labeled as.

Type

google.cloud.videointelligence_v1p3beta1.types.Entity

confidence

Object category’s labeling confidence of this track.

Type

float

frames

Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingFrame]

class google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for OBJECT_TRACKING.

model

Model to use for object tracking. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingFrame(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.

normalized_bounding_box

The normalized bounding box location of this object track for the frame.

Type

google.cloud.videointelligence_v1p3beta1.types.NormalizedBoundingBox

time_offset

The timestamp of the frame in microseconds.

Type

google.protobuf.duration_pb2.Duration

class google.cloud.videointelligence_v1p3beta1.types.PersonDetectionAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Person detection annotation per video.

tracks

The detected tracks of a person.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.Track]

class google.cloud.videointelligence_v1p3beta1.types.PersonDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for PERSON_DETECTION.

include_bounding_boxes

Whether bounding boxes are included in the person detection annotation output.

Type

bool

include_pose_landmarks

Whether to enable pose landmarks detection. Ignored if ‘include_bounding_boxes’ is set to false.

Type

bool

include_attributes

Whether to enable person attributes detection, such as cloth color (black, blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, etc. Ignored if ‘include_bounding_boxes’ is set to false.

Type

bool

class google.cloud.videointelligence_v1p3beta1.types.ShotChangeDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for SHOT_CHANGE_DETECTION.

model

Model to use for shot change detection. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.SpeechContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Provides “hints” to the speech recognizer to favor specific words and phrases in the results.

phrases

Optional. A list of strings containing words and phrases “hints” so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See usage limits.

Type

MutableSequence[str]

class google.cloud.videointelligence_v1p3beta1.types.SpeechRecognitionAlternative(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Alternative hypotheses (a.k.a. n-best list).

transcript

Transcript text representing the words that the user spoke.

Type

str

confidence

Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating confidence was not set.

Type

float

words

Output only. A list of word-specific information for each recognized word. Note: When enable_speaker_diarization is set to true, you will see all the words from the beginning of the audio.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.WordInfo]

class google.cloud.videointelligence_v1p3beta1.types.SpeechTranscription(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A speech recognition result corresponding to a portion of the audio.

alternatives

May contain one or more recognition hypotheses (up to the maximum specified in max_alternatives). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.SpeechRecognitionAlternative]

language_code

Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.SpeechTranscriptionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for SPEECH_TRANSCRIPTION.

language_code

Required. Required The language of the supplied audio as a BCP-47 language tag. Example: “en-US”. See Language Support for a list of the currently supported language codes.

Type

str

max_alternatives

Optional. Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of SpeechRecognitionAlternative messages within each SpeechTranscription. The server may return fewer than max_alternatives. Valid values are 0-30. A value of 0 or 1 will return a maximum of one. If omitted, will return a maximum of one.

Type

int

filter_profanity

Optional. If set to true, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. “f***”. If set to false or omitted, profanities won’t be filtered out.

Type

bool

speech_contexts

Optional. A means to provide context to assist the speech recognition.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.SpeechContext]

enable_automatic_punctuation

Optional. If ‘true’, adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default ‘false’ value does not add punctuation to result hypotheses. NOTE: “This is currently offered as an experimental service, complimentary to all users. In the future this may be exclusively available as a premium feature.”.

Type

bool

audio_tracks

Optional. For file formats, such as MXF or MKV, supporting multiple audio tracks, specify up to two tracks. Default: track 0.

Type

MutableSequence[int]

enable_speaker_diarization

Optional. If ‘true’, enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_tag provided in the WordInfo. Note: When this is true, we send all the words from the beginning of the audio for the top alternative in every consecutive response. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time.

Type

bool

diarization_speaker_count

Optional. If set, specifies the estimated number of speakers in the conversation. If not set, defaults to ‘2’. Ignored unless enable_speaker_diarization is set to true.

Type

int

enable_word_confidence

Optional. If true, the top result includes a list of words and the confidence for those words. If false, no word-level confidence information is returned. The default is false.

Type

bool

class google.cloud.videointelligence_v1p3beta1.types.StreamingAnnotateVideoRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The top-level message sent by the client for the StreamingAnnotateVideo method. Multiple StreamingAnnotateVideoRequest messages are sent. The first message must only contain a StreamingVideoConfig message. All subsequent messages must only contain input_content data.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

video_config

Provides information to the annotator, specifing how to process the request. The first AnnotateStreamingVideoRequest message must only contain a video_config message.

This field is a member of oneof streaming_request.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingVideoConfig

input_content

The video data to be annotated. Chunks of video data are sequentially sent in StreamingAnnotateVideoRequest messages. Except the initial StreamingAnnotateVideoRequest message containing only video_config, all subsequent AnnotateStreamingVideoRequest messages must only contain input_content field. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64).

This field is a member of oneof streaming_request.

Type

bytes

class google.cloud.videointelligence_v1p3beta1.types.StreamingAnnotateVideoResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

StreamingAnnotateVideoResponse is the only message returned to the client by StreamingAnnotateVideo. A series of zero or more StreamingAnnotateVideoResponse messages are streamed back to the client.

error

If set, returns a [google.rpc.Status][google.rpc.Status] message that specifies the error for the operation.

Type

google.rpc.status_pb2.Status

annotation_results

Streaming annotation results.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingVideoAnnotationResults

annotation_results_uri

Google Cloud Storage(GCS) URI that stores annotation results of one streaming session in JSON format. It is the annotation_result_storage_directory from the request followed by ‘/cloud_project_number-session_id’.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.StreamingAutomlActionRecognitionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for STREAMING_AUTOML_ACTION_RECOGNITION.

model_name

Resource name of AutoML model. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

Type

str

class google.cloud.videointelligence_v1p3beta1.types.StreamingAutomlClassificationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for STREAMING_AUTOML_CLASSIFICATION.

model_name

Resource name of AutoML model. Format: projects/{project_number}/locations/{location_id}/models/{model_id}

Type

str

class google.cloud.videointelligence_v1p3beta1.types.StreamingAutomlObjectTrackingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for STREAMING_AUTOML_OBJECT_TRACKING.

model_name

Resource name of AutoML model. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

Type

str

class google.cloud.videointelligence_v1p3beta1.types.StreamingExplicitContentDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for STREAMING_EXPLICIT_CONTENT_DETECTION.

class google.cloud.videointelligence_v1p3beta1.types.StreamingFeature(value)[source]

Bases: proto.enums.Enum

Streaming video annotation feature.

Values:
STREAMING_FEATURE_UNSPECIFIED (0):

Unspecified.

STREAMING_LABEL_DETECTION (1):

Label detection. Detect objects, such as dog or flower.

STREAMING_SHOT_CHANGE_DETECTION (2):

Shot change detection.

STREAMING_EXPLICIT_CONTENT_DETECTION (3):

Explicit content detection.

STREAMING_OBJECT_TRACKING (4):

Object detection and tracking.

STREAMING_AUTOML_ACTION_RECOGNITION (23):

Action recognition based on AutoML model.

STREAMING_AUTOML_CLASSIFICATION (21):

Video classification based on AutoML model.

STREAMING_AUTOML_OBJECT_TRACKING (22):

Object detection and tracking based on AutoML model.

class google.cloud.videointelligence_v1p3beta1.types.StreamingLabelDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for STREAMING_LABEL_DETECTION.

stationary_camera

Whether the video has been captured from a stationary (i.e. non-moving) camera. When set to true, might improve detection accuracy for moving objects. Default: false.

Type

bool

class google.cloud.videointelligence_v1p3beta1.types.StreamingObjectTrackingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for STREAMING_OBJECT_TRACKING.

class google.cloud.videointelligence_v1p3beta1.types.StreamingShotChangeDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for STREAMING_SHOT_CHANGE_DETECTION.

class google.cloud.videointelligence_v1p3beta1.types.StreamingStorageConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for streaming storage option.

enable_storage_annotation_result

Enable streaming storage. Default: false.

Type

bool

annotation_result_storage_directory

Cloud Storage URI to store all annotation results for one client. Client should specify this field as the top-level storage directory. Annotation results of different sessions will be put into different sub-directories denoted by project_name and session_id. All sub-directories will be auto generated by program and will be made accessible to client in response proto. URIs must be specified in the following format: gs://bucket-id/object-id bucket-id should be a valid Cloud Storage bucket created by client and bucket permission shall also be configured properly. object-id can be arbitrary string that make sense to client. Other URI formats will return error and cause Cloud Storage write failure.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.StreamingVideoAnnotationResults(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Streaming annotation results corresponding to a portion of the video that is currently being processed.

shot_annotations

Shot annotation results. Each shot is represented as a video segment.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.VideoSegment]

label_annotations

Label annotation results.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.LabelAnnotation]

explicit_annotation

Explicit content annotation results.

Type

google.cloud.videointelligence_v1p3beta1.types.ExplicitContentAnnotation

object_annotations

Object tracking results.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingAnnotation]

class google.cloud.videointelligence_v1p3beta1.types.StreamingVideoConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Provides information to the annotator that specifies how to process the request.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

shot_change_detection_config

Config for STREAMING_SHOT_CHANGE_DETECTION.

This field is a member of oneof streaming_config.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingShotChangeDetectionConfig

label_detection_config

Config for STREAMING_LABEL_DETECTION.

This field is a member of oneof streaming_config.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingLabelDetectionConfig

explicit_content_detection_config

Config for STREAMING_EXPLICIT_CONTENT_DETECTION.

This field is a member of oneof streaming_config.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingExplicitContentDetectionConfig

object_tracking_config

Config for STREAMING_OBJECT_TRACKING.

This field is a member of oneof streaming_config.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingObjectTrackingConfig

automl_action_recognition_config

Config for STREAMING_AUTOML_ACTION_RECOGNITION.

This field is a member of oneof streaming_config.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingAutomlActionRecognitionConfig

automl_classification_config

Config for STREAMING_AUTOML_CLASSIFICATION.

This field is a member of oneof streaming_config.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingAutomlClassificationConfig

automl_object_tracking_config

Config for STREAMING_AUTOML_OBJECT_TRACKING.

This field is a member of oneof streaming_config.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingAutomlObjectTrackingConfig

feature

Requested annotation feature.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingFeature

storage_config

Streaming storage option. By default: storage is disabled.

Type

google.cloud.videointelligence_v1p3beta1.types.StreamingStorageConfig

class google.cloud.videointelligence_v1p3beta1.types.TextAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.

text

The detected text.

Type

str

segments

All video segments where OCR detected text appears.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.TextSegment]

class google.cloud.videointelligence_v1p3beta1.types.TextDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for TEXT_DETECTION.

language_hints

Language hint can be specified if the language to be detected is known a priori. It can increase the accuracy of the detection. Language hint must be language code in BCP-47 format.

Automatic language detection is performed if no hint is provided.

Type

MutableSequence[str]

model

Model to use for text detection. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.

Type

str

class google.cloud.videointelligence_v1p3beta1.types.TextFrame(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.

rotated_bounding_box

Bounding polygon of the detected text for this frame.

Type

google.cloud.videointelligence_v1p3beta1.types.NormalizedBoundingPoly

time_offset

Timestamp of this frame.

Type

google.protobuf.duration_pb2.Duration

class google.cloud.videointelligence_v1p3beta1.types.TextSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video segment level annotation results for text detection.

segment

Video segment where a text snippet was detected.

Type

google.cloud.videointelligence_v1p3beta1.types.VideoSegment

confidence

Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.

Type

float

frames

Information related to the frames where OCR detected text appears.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.TextFrame]

class google.cloud.videointelligence_v1p3beta1.types.TimestampedObject(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.

normalized_bounding_box

Normalized Bounding box in a frame, where the object is located.

Type

google.cloud.videointelligence_v1p3beta1.types.NormalizedBoundingBox

time_offset

Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.

Type

google.protobuf.duration_pb2.Duration

attributes

Optional. The attributes of the object in the bounding box.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.DetectedAttribute]

landmarks

Optional. The detected landmarks.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.DetectedLandmark]

class google.cloud.videointelligence_v1p3beta1.types.Track(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A track of an object instance.

segment

Video segment of a track.

Type

google.cloud.videointelligence_v1p3beta1.types.VideoSegment

timestamped_objects

The object with timestamp and attributes per frame in the track.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.TimestampedObject]

attributes

Optional. Attributes in the track level.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.DetectedAttribute]

confidence

Optional. The confidence score of the tracked object.

Type

float

class google.cloud.videointelligence_v1p3beta1.types.VideoAnnotationProgress(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Annotation progress for a single video.

input_uri

Video file location in Cloud Storage.

Type

str

progress_percent

Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.

Type

int

start_time

Time when the request was received.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Time of the most recent update.

Type

google.protobuf.timestamp_pb2.Timestamp

feature

Specifies which feature is being tracked if the request contains more than one feature.

Type

google.cloud.videointelligence_v1p3beta1.types.Feature

segment

Specifies which segment is being tracked if the request contains more than one segment.

Type

google.cloud.videointelligence_v1p3beta1.types.VideoSegment

class google.cloud.videointelligence_v1p3beta1.types.VideoAnnotationResults(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Annotation results for a single video.

input_uri

Video file location in Cloud Storage.

Type

str

segment

Video segment on which the annotation is run.

Type

google.cloud.videointelligence_v1p3beta1.types.VideoSegment

segment_label_annotations

Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.LabelAnnotation]

segment_presence_label_annotations

Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical segment_label_annotations, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets LabelDetectionConfig.model to “builtin/latest” in the request.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.LabelAnnotation]

shot_label_annotations

Topical label annotations on shot level. There is exactly one element for each unique label.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.LabelAnnotation]

shot_presence_label_annotations

Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical shot_label_annotations, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets LabelDetectionConfig.model to “builtin/latest” in the request.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.LabelAnnotation]

frame_label_annotations

Label annotations on frame level. There is exactly one element for each unique label.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.LabelAnnotation]

face_detection_annotations

Face detection annotations.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.FaceDetectionAnnotation]

shot_annotations

Shot annotations. Each shot is represented as a video segment.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.VideoSegment]

explicit_annotation

Explicit content annotation.

Type

google.cloud.videointelligence_v1p3beta1.types.ExplicitContentAnnotation

speech_transcriptions

Speech transcription.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.SpeechTranscription]

text_annotations

OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.TextAnnotation]

object_annotations

Annotations for list of objects detected and tracked in video.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingAnnotation]

logo_recognition_annotations

Annotations for list of logos detected, tracked and recognized in video.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.LogoRecognitionAnnotation]

person_detection_annotations

Person detection annotations.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.PersonDetectionAnnotation]

celebrity_recognition_annotations

Celebrity recognition annotations.

Type

google.cloud.videointelligence_v1p3beta1.types.CelebrityRecognitionAnnotation

error

If set, indicates an error. Note that for a single AnnotateVideoRequest some videos may succeed and some may fail.

Type

google.rpc.status_pb2.Status

class google.cloud.videointelligence_v1p3beta1.types.VideoContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video context and/or feature-specific parameters.

segments

Video segments to annotate. The segments may overlap and are not required to be contiguous or span the whole video. If unspecified, each video is treated as a single segment.

Type

MutableSequence[google.cloud.videointelligence_v1p3beta1.types.VideoSegment]

label_detection_config

Config for LABEL_DETECTION.

Type

google.cloud.videointelligence_v1p3beta1.types.LabelDetectionConfig

shot_change_detection_config

Config for SHOT_CHANGE_DETECTION.

Type

google.cloud.videointelligence_v1p3beta1.types.ShotChangeDetectionConfig

explicit_content_detection_config

Config for EXPLICIT_CONTENT_DETECTION.

Type

google.cloud.videointelligence_v1p3beta1.types.ExplicitContentDetectionConfig

face_detection_config

Config for FACE_DETECTION.

Type

google.cloud.videointelligence_v1p3beta1.types.FaceDetectionConfig

speech_transcription_config

Config for SPEECH_TRANSCRIPTION.

Type

google.cloud.videointelligence_v1p3beta1.types.SpeechTranscriptionConfig

text_detection_config

Config for TEXT_DETECTION.

Type

google.cloud.videointelligence_v1p3beta1.types.TextDetectionConfig

person_detection_config

Config for PERSON_DETECTION.

Type

google.cloud.videointelligence_v1p3beta1.types.PersonDetectionConfig

object_tracking_config

Config for OBJECT_TRACKING.

Type

google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingConfig

class google.cloud.videointelligence_v1p3beta1.types.VideoSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video segment.

start_time_offset

Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).

Type

google.protobuf.duration_pb2.Duration

end_time_offset

Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).

Type

google.protobuf.duration_pb2.Duration

class google.cloud.videointelligence_v1p3beta1.types.WordInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as enable_word_time_offsets.

start_time

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

Type

google.protobuf.duration_pb2.Duration

end_time

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

Type

google.protobuf.duration_pb2.Duration

word

The word corresponding to this set of information.

Type

str

confidence

Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating confidence was not set.

Type

float

speaker_tag

Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.

Type

int