Types for Cloud Video Intelligence API Client#

class google.cloud.videointelligence_v1p3beta1.types.AnnotateVideoProgress#

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.

annotation_progress

Field google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress.annotation_progress

class google.cloud.videointelligence_v1p3beta1.types.AnnotateVideoRequest#

Video annotation request.

input_uri#

Input video location. Currently, only Google Cloud Storage URIs are supported, which 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. A video URI may include wildcards in object-id, and thus identify multiple videos. 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 unset.

input_content#

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

features#

Requested video annotation features.

video_context#

Additional video context and/or feature-specific parameters.

output_uri#

Optional location where the output (in JSON format) should be stored. Currently, only Google Cloud Storage URIs are supported, which 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.

location_id#

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 based on video file location.

features

Field google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.features

input_content

Field google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.input_content

input_uri

Field google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.input_uri

location_id

Field google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.location_id

output_uri

Field google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.output_uri

video_context

Field google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest.video_context

class google.cloud.videointelligence_v1p3beta1.types.AnnotateVideoResponse#

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.

annotation_results

Field google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse.annotation_results

class google.cloud.videointelligence_v1p3beta1.types.Any#
type_url#

Field google.protobuf.Any.type_url

value#

Field google.protobuf.Any.value

class google.cloud.videointelligence_v1p3beta1.types.CancelOperationRequest#
name#

Field google.longrunning.CancelOperationRequest.name

class google.cloud.videointelligence_v1p3beta1.types.DeleteOperationRequest#
name#

Field google.longrunning.DeleteOperationRequest.name

class google.cloud.videointelligence_v1p3beta1.types.DetectedAttribute#

A generic detected attribute represented by name in string format.

name#

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

confidence#

Detected attribute confidence. Range [0, 1].

value#

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

confidence

Field google.cloud.videointelligence.v1p3beta1.DetectedAttribute.confidence

name

Field google.cloud.videointelligence.v1p3beta1.DetectedAttribute.name

value

Field google.cloud.videointelligence.v1p3beta1.DetectedAttribute.value

class google.cloud.videointelligence_v1p3beta1.types.Duration#
nanos#

Field google.protobuf.Duration.nanos

seconds#

Field google.protobuf.Duration.seconds

class google.cloud.videointelligence_v1p3beta1.types.Entity#

Detected entity from video analysis.

entity_id#

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

description#

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

language_code#

Language code for description in BCP-47 format.

description

Field google.cloud.videointelligence.v1p3beta1.Entity.description

entity_id

Field google.cloud.videointelligence.v1p3beta1.Entity.entity_id

language_code

Field google.cloud.videointelligence.v1p3beta1.Entity.language_code

class google.cloud.videointelligence_v1p3beta1.types.ExplicitContentAnnotation#

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.

frames

Field google.cloud.videointelligence.v1p3beta1.ExplicitContentAnnotation.frames

class google.cloud.videointelligence_v1p3beta1.types.ExplicitContentDetectionConfig#

Config for EXPLICIT_CONTENT_DETECTION.

model#

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

model

Field google.cloud.videointelligence.v1p3beta1.ExplicitContentDetectionConfig.model

class google.cloud.videointelligence_v1p3beta1.types.ExplicitContentFrame#

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.

pornography_likelihood#

Likelihood of the pornography content..

pornography_likelihood

Field google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.pornography_likelihood

time_offset

Field google.cloud.videointelligence.v1p3beta1.ExplicitContentFrame.time_offset

class google.cloud.videointelligence_v1p3beta1.types.GetOperationRequest#
name#

Field google.longrunning.GetOperationRequest.name

class google.cloud.videointelligence_v1p3beta1.types.LabelAnnotation#

Label annotation.

entity#

Detected entity.

category_entities#

Common categories for the detected entity. E.g. 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.

segments#

All video segments where a label was detected.

frames#

All video frames where a label was detected.

category_entities

Field google.cloud.videointelligence.v1p3beta1.LabelAnnotation.category_entities

entity

Field google.cloud.videointelligence.v1p3beta1.LabelAnnotation.entity

frames

Field google.cloud.videointelligence.v1p3beta1.LabelAnnotation.frames

segments

Field google.cloud.videointelligence.v1p3beta1.LabelAnnotation.segments

class google.cloud.videointelligence_v1p3beta1.types.LabelDetectionConfig#

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.

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.

model#

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

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 please follow the default threshold. We will update the default threshold everytime when we release a new model.

video_confidence_threshold#

The confidence threshold we perform filtering on the labels from video-level and shot-level detections. If not set, it is 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 please follow the default threshold. We will update the default threshold everytime when we release a new model.

frame_confidence_threshold

Field google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.frame_confidence_threshold

label_detection_mode

Field google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.label_detection_mode

model

Field google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.model

stationary_camera

Field google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.stationary_camera

video_confidence_threshold

Field google.cloud.videointelligence.v1p3beta1.LabelDetectionConfig.video_confidence_threshold

class google.cloud.videointelligence_v1p3beta1.types.LabelFrame#

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.

confidence#

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

confidence

Field google.cloud.videointelligence.v1p3beta1.LabelFrame.confidence

time_offset

Field google.cloud.videointelligence.v1p3beta1.LabelFrame.time_offset

class google.cloud.videointelligence_v1p3beta1.types.LabelSegment#

Video segment level annotation results for label detection.

segment#

Video segment where a label was detected.

confidence#

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

confidence

Field google.cloud.videointelligence.v1p3beta1.LabelSegment.confidence

segment

Field google.cloud.videointelligence.v1p3beta1.LabelSegment.segment

class google.cloud.videointelligence_v1p3beta1.types.ListOperationsRequest#
filter#

Field google.longrunning.ListOperationsRequest.filter

name#

Field google.longrunning.ListOperationsRequest.name

page_size#

Field google.longrunning.ListOperationsRequest.page_size

page_token#

Field google.longrunning.ListOperationsRequest.page_token

class google.cloud.videointelligence_v1p3beta1.types.ListOperationsResponse#
next_page_token#

Field google.longrunning.ListOperationsResponse.next_page_token

operations#

Field google.longrunning.ListOperationsResponse.operations

class google.cloud.videointelligence_v1p3beta1.types.LogoRecognitionAnnotation#

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.

tracks#

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

segments#

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

entity

Field google.cloud.videointelligence.v1p3beta1.LogoRecognitionAnnotation.entity

segments

Field google.cloud.videointelligence.v1p3beta1.LogoRecognitionAnnotation.segments

tracks

Field google.cloud.videointelligence.v1p3beta1.LogoRecognitionAnnotation.tracks

class google.cloud.videointelligence_v1p3beta1.types.NormalizedBoundingBox#

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

left#

Left X coordinate.

top#

Top Y coordinate.

right#

Right X coordinate.

bottom#

Bottom Y coordinate.

bottom

Field google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.bottom

left

Field google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.left

right

Field google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.right

top

Field google.cloud.videointelligence.v1p3beta1.NormalizedBoundingBox.top

class google.cloud.videointelligence_v1p3beta1.types.NormalizedBoundingPoly#

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.

vertices

Field google.cloud.videointelligence.v1p3beta1.NormalizedBoundingPoly.vertices

class google.cloud.videointelligence_v1p3beta1.types.NormalizedVertex#

X coordinate.

y#

Y coordinate.

x#

Field google.cloud.videointelligence.v1p3beta1.NormalizedVertex.x

y

Field google.cloud.videointelligence.v1p3beta1.NormalizedVertex.y

class google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingAnnotation#

Annotations corresponding to one tracked object.

entity#

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

confidence#

Object category’s labeling confidence of this track.

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.

track_info#

Different representation of tracking info in non-streaming batch and streaming modes.

segment#

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

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.

confidence

Field google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.confidence

entity

Field google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.entity

frames

Field google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.frames

segment

Field google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.segment

track_id

Field google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation.track_id

class google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingConfig#

Config for OBJECT_TRACKING.

model#

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

model

Field google.cloud.videointelligence.v1p3beta1.ObjectTrackingConfig.model

class google.cloud.videointelligence_v1p3beta1.types.ObjectTrackingFrame#

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.

time_offset#

The timestamp of the frame in microseconds.

normalized_bounding_box

Field google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.normalized_bounding_box

time_offset

Field google.cloud.videointelligence.v1p3beta1.ObjectTrackingFrame.time_offset

class google.cloud.videointelligence_v1p3beta1.types.Operation#
deserialize()#

Creates new method instance from given serialized data.

done#

Field google.longrunning.Operation.done

error#

Field google.longrunning.Operation.error

metadata#

Field google.longrunning.Operation.metadata

name#

Field google.longrunning.Operation.name

response#

Field google.longrunning.Operation.response

class google.cloud.videointelligence_v1p3beta1.types.OperationInfo#
metadata_type#

Field google.longrunning.OperationInfo.metadata_type

response_type#

Field google.longrunning.OperationInfo.response_type

class google.cloud.videointelligence_v1p3beta1.types.ShotChangeDetectionConfig#

Config for SHOT_CHANGE_DETECTION.

model#

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

model

Field google.cloud.videointelligence.v1p3beta1.ShotChangeDetectionConfig.model

class google.cloud.videointelligence_v1p3beta1.types.SpeechContext#

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.

phrases

Field google.cloud.videointelligence.v1p3beta1.SpeechContext.phrases

class google.cloud.videointelligence_v1p3beta1.types.SpeechRecognitionAlternative#

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

transcript#

Transcript text representing the words that the user spoke.

confidence#

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 typically provided only for the top hypothesis, and only for is_final=true results. Clients should not rely on the confidence field as it is not guaranteed to be accurate or consistent. The default of 0.0 is a sentinel value indicating confidence was not set.

words#

A list of word-specific information for each recognized word.

confidence

Field google.cloud.videointelligence.v1p3beta1.SpeechRecognitionAlternative.confidence

transcript

Field google.cloud.videointelligence.v1p3beta1.SpeechRecognitionAlternative.transcript

words

Field google.cloud.videointelligence.v1p3beta1.SpeechRecognitionAlternative.words

class google.cloud.videointelligence_v1p3beta1.types.SpeechTranscription#

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.

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.

alternatives

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscription.alternatives

language_code

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscription.language_code

class google.cloud.videointelligence_v1p3beta1.types.SpeechTranscriptionConfig#

Config for SPEECH_TRANSCRIPTION.

language_code#

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.

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.

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.

speech_contexts#

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

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.”

audio_tracks#

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

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 responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time.

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.

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.

audio_tracks

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig.audio_tracks

diarization_speaker_count

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig.diarization_speaker_count

enable_automatic_punctuation

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig.enable_automatic_punctuation

enable_speaker_diarization

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig.enable_speaker_diarization

enable_word_confidence

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig.enable_word_confidence

filter_profanity

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig.filter_profanity

language_code

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig.language_code

max_alternatives

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig.max_alternatives

speech_contexts

Field google.cloud.videointelligence.v1p3beta1.SpeechTranscriptionConfig.speech_contexts

class google.cloud.videointelligence_v1p3beta1.types.Status#
code#

Field google.rpc.Status.code

details#

Field google.rpc.Status.details

message#

Field google.rpc.Status.message

class google.cloud.videointelligence_v1p3beta1.types.StreamingAnnotateVideoRequest#

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.

streaming_request#

Required The streaming request, which is either a streaming config or video content.

video_config#

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

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).

input_content

Field google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest.input_content

video_config

Field google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest.video_config

class google.cloud.videointelligence_v1p3beta1.types.StreamingAnnotateVideoResponse#

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.

annotation_results#

Streaming annotation results.

annotation_results_uri#

GCS URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id

annotation_results

Field google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse.annotation_results

annotation_results_uri

Field google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse.annotation_results_uri

error

Field google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoResponse.error

class google.cloud.videointelligence_v1p3beta1.types.StreamingAutomlClassificationConfig#

Config for AUTOML_CLASSIFICATION in streaming mode.

model_name#

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

model_name

Field google.cloud.videointelligence.v1p3beta1.StreamingAutomlClassificationConfig.model_name

class google.cloud.videointelligence_v1p3beta1.types.StreamingAutomlObjectTrackingConfig#

Config for AUTOML_OBJECT_TRACKING in streaming mode.

model_name#

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

model_name

Field google.cloud.videointelligence.v1p3beta1.StreamingAutomlObjectTrackingConfig.model_name

class google.cloud.videointelligence_v1p3beta1.types.StreamingExplicitContentDetectionConfig#

Config for EXPLICIT_CONTENT_DETECTION in streaming mode.

No customized config support.

class google.cloud.videointelligence_v1p3beta1.types.StreamingLabelDetectionConfig#

Config for LABEL_DETECTION in streaming mode.

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.

stationary_camera

Field google.cloud.videointelligence.v1p3beta1.StreamingLabelDetectionConfig.stationary_camera

class google.cloud.videointelligence_v1p3beta1.types.StreamingObjectTrackingConfig#

Config for STREAMING_OBJECT_TRACKING.

No customized config support.

class google.cloud.videointelligence_v1p3beta1.types.StreamingShotChangeDetectionConfig#

Config for SHOT_CHANGE_DETECTION in streaming mode.

No customized config support.

class google.cloud.videointelligence_v1p3beta1.types.StreamingStorageConfig#

Config for streaming storage option.

enable_storage_annotation_result#

Enable streaming storage. Default: false.

annotation_result_storage_directory#

GCS 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 GCS 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 GCS write failure.

annotation_result_storage_directory

Field google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.annotation_result_storage_directory

enable_storage_annotation_result

Field google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig.enable_storage_annotation_result

class google.cloud.videointelligence_v1p3beta1.types.StreamingVideoAnnotationResults#

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.

label_annotations#

Label annotation results.

explicit_annotation#

Explicit content annotation results.

object_annotations#

Object tracking results.

explicit_annotation

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.explicit_annotation

label_annotations

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.label_annotations

object_annotations

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.object_annotations

shot_annotations

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoAnnotationResults.shot_annotations

class google.cloud.videointelligence_v1p3beta1.types.StreamingVideoConfig#

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

feature#

Requested annotation feature.

streaming_config#

Config for requested annotation feature.

shot_change_detection_config#

Config for STREAMING_SHOT_CHANGE_DETECTION.

label_detection_config#

Config for STREAMING_LABEL_DETECTION.

explicit_content_detection_config#

Config for STREAMING_EXPLICIT_CONTENT_DETECTION.

object_tracking_config#

Config for STREAMING_OBJECT_TRACKING.

automl_classification_config#

Config for STREAMING_AUTOML_CLASSIFICATION.

automl_object_tracking_config#

Config for STREAMING_AUTOML_OBJECT_TRACKING.

storage_config#

Streaming storage option. By default: storage is disabled.

automl_classification_config

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.automl_classification_config

automl_object_tracking_config

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.automl_object_tracking_config

explicit_content_detection_config

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.explicit_content_detection_config

feature

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.feature

label_detection_config

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.label_detection_config

object_tracking_config

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.object_tracking_config

shot_change_detection_config

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.shot_change_detection_config

storage_config

Field google.cloud.videointelligence.v1p3beta1.StreamingVideoConfig.storage_config

class google.cloud.videointelligence_v1p3beta1.types.TextAnnotation#

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.

segments#

All video segments where OCR detected text appears.

segments

Field google.cloud.videointelligence.v1p3beta1.TextAnnotation.segments

text

Field google.cloud.videointelligence.v1p3beta1.TextAnnotation.text

class google.cloud.videointelligence_v1p3beta1.types.TextDetectionConfig#

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.

model#

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

language_hints

Field google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.language_hints

model

Field google.cloud.videointelligence.v1p3beta1.TextDetectionConfig.model

class google.cloud.videointelligence_v1p3beta1.types.TextFrame#

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.

time_offset#

Timestamp of this frame.

rotated_bounding_box

Field google.cloud.videointelligence.v1p3beta1.TextFrame.rotated_bounding_box

time_offset

Field google.cloud.videointelligence.v1p3beta1.TextFrame.time_offset

class google.cloud.videointelligence_v1p3beta1.types.TextSegment#

Video segment level annotation results for text detection.

segment#

Video segment where a text snippet was detected.

confidence#

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

frames#

Information related to the frames where OCR detected text appears.

confidence

Field google.cloud.videointelligence.v1p3beta1.TextSegment.confidence

frames

Field google.cloud.videointelligence.v1p3beta1.TextSegment.frames

segment

Field google.cloud.videointelligence.v1p3beta1.TextSegment.segment

class google.cloud.videointelligence_v1p3beta1.types.Timestamp#
nanos#

Field google.protobuf.Timestamp.nanos

seconds#

Field google.protobuf.Timestamp.seconds

class google.cloud.videointelligence_v1p3beta1.types.TimestampedObject#

For tracking related features, such as LOGO_RECOGNITION, FACE_DETECTION, CELEBRITY_RECOGNITION, PERSON_DETECTION. 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.

time_offset#

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

attributes#

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

attributes

Field google.cloud.videointelligence.v1p3beta1.TimestampedObject.attributes

normalized_bounding_box

Field google.cloud.videointelligence.v1p3beta1.TimestampedObject.normalized_bounding_box

time_offset

Field google.cloud.videointelligence.v1p3beta1.TimestampedObject.time_offset

class google.cloud.videointelligence_v1p3beta1.types.Track#

A track of an object instance.

segment#

Video segment of a track.

timestamped_objects#

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

attributes#

Optional. Attributes in the track level.

confidence#

Optional. The confidence score of the tracked object.

attributes

Field google.cloud.videointelligence.v1p3beta1.Track.attributes

confidence

Field google.cloud.videointelligence.v1p3beta1.Track.confidence

segment

Field google.cloud.videointelligence.v1p3beta1.Track.segment

timestamped_objects

Field google.cloud.videointelligence.v1p3beta1.Track.timestamped_objects

class google.cloud.videointelligence_v1p3beta1.types.VideoAnnotationProgress#

Annotation progress for a single video.

input_uri#

Video file location in Google Cloud Storage.

progress_percent#

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

start_time#

Time when the request was received.

update_time#

Time of the most recent update.

input_uri

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.input_uri

progress_percent

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.progress_percent

start_time

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.start_time

update_time

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationProgress.update_time

class google.cloud.videointelligence_v1p3beta1.types.VideoAnnotationResults#

Annotation results for a single video.

input_uri#

Video file location in Google Cloud Storage.

segment_label_annotations#

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

shot_label_annotations#

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

frame_label_annotations#

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

shot_annotations#

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

explicit_annotation#

Explicit content annotation.

speech_transcriptions#

Speech transcription.

text_annotations#

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

object_annotations#

Annotations for list of objects detected and tracked in video.

logo_recognition_annotations#

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

error#

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

error

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.error

explicit_annotation

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.explicit_annotation

frame_label_annotations

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.frame_label_annotations

input_uri

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.input_uri

logo_recognition_annotations

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.logo_recognition_annotations

object_annotations

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.object_annotations

segment_label_annotations

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.segment_label_annotations

shot_annotations

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.shot_annotations

shot_label_annotations

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.shot_label_annotations

speech_transcriptions

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.speech_transcriptions

text_annotations

Field google.cloud.videointelligence.v1p3beta1.VideoAnnotationResults.text_annotations

class google.cloud.videointelligence_v1p3beta1.types.VideoContext#

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.

label_detection_config#

Config for LABEL_DETECTION.

shot_change_detection_config#

Config for SHOT_CHANGE_DETECTION.

explicit_content_detection_config#

Config for EXPLICIT_CONTENT_DETECTION.

speech_transcription_config#

Config for SPEECH_TRANSCRIPTION.

text_detection_config#

Config for TEXT_DETECTION.

object_tracking_config#

Config for OBJECT_TRACKING.

explicit_content_detection_config

Field google.cloud.videointelligence.v1p3beta1.VideoContext.explicit_content_detection_config

label_detection_config

Field google.cloud.videointelligence.v1p3beta1.VideoContext.label_detection_config

object_tracking_config

Field google.cloud.videointelligence.v1p3beta1.VideoContext.object_tracking_config

segments

Field google.cloud.videointelligence.v1p3beta1.VideoContext.segments

shot_change_detection_config

Field google.cloud.videointelligence.v1p3beta1.VideoContext.shot_change_detection_config

speech_transcription_config

Field google.cloud.videointelligence.v1p3beta1.VideoContext.speech_transcription_config

text_detection_config

Field google.cloud.videointelligence.v1p3beta1.VideoContext.text_detection_config

class google.cloud.videointelligence_v1p3beta1.types.VideoSegment#

Video segment.

start_time_offset#

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

end_time_offset#

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

end_time_offset

Field google.cloud.videointelligence.v1p3beta1.VideoSegment.end_time_offset

start_time_offset

Field google.cloud.videointelligence.v1p3beta1.VideoSegment.start_time_offset

class google.cloud.videointelligence_v1p3beta1.types.WordInfo#

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.

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.

word#

The word corresponding to this set of information.

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.

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.

confidence

Field google.cloud.videointelligence.v1p3beta1.WordInfo.confidence

end_time

Field google.cloud.videointelligence.v1p3beta1.WordInfo.end_time

speaker_tag

Field google.cloud.videointelligence.v1p3beta1.WordInfo.speaker_tag

start_time

Field google.cloud.videointelligence.v1p3beta1.WordInfo.start_time

word

Field google.cloud.videointelligence.v1p3beta1.WordInfo.word