Properties

constant static

Feature  number

Video annotation feature.

Properties

Name Type Optional Description

FEATURE_UNSPECIFIED

 

 

Unspecified.

LABEL_DETECTION

 

 

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

SHOT_CHANGE_DETECTION

 

 

Shot change detection.

EXPLICIT_CONTENT_DETECTION

 

 

Explicit content detection.

TEXT_DETECTION

 

 

OCR text detection and tracking.

OBJECT_TRACKING

 

 

Object detection and tracking.

constant static

LabelDetectionMode  number

Label detection mode.

Properties

Name Type Optional Description

LABEL_DETECTION_MODE_UNSPECIFIED

 

 

Unspecified.

SHOT_MODE

 

 

Detect shot-level labels.

FRAME_MODE

 

 

Detect frame-level labels.

SHOT_AND_FRAME_MODE

 

 

Detect both shot-level and frame-level labels.

constant static

Likelihood  number

Bucketized representation of likelihood.

Properties

Name Type Optional Description

LIKELIHOOD_UNSPECIFIED

 

 

Unspecified likelihood.

VERY_UNLIKELY

 

 

Very unlikely.

UNLIKELY

 

 

Unlikely.

POSSIBLE

 

 

Possible.

LIKELY

 

 

Likely.

VERY_LIKELY

 

 

Very likely.

Abstract types

static

AnnotateVideoProgress

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

Property

Name Type Optional Description

annotationProgress

Array of Object

 

Progress metadata for all videos specified in AnnotateVideoRequest.

This object should have the same structure as VideoAnnotationProgress

See also

google.cloud.videointelligence.v1p2beta1.AnnotateVideoProgress definition in proto format

static

AnnotateVideoRequest

Video annotation request.

Properties

Name Type Optional Description

inputUri

string

 

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

inputContent

string

 

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

features

Array of number

 

Requested video annotation features.

The number should be among the values of Feature

videoContext

Object

 

Additional video context and/or feature-specific parameters.

This object should have the same structure as VideoContext

outputUri

string

 

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). For more information, see Request URIs.

locationId

string

 

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.

See also

google.cloud.videointelligence.v1p2beta1.AnnotateVideoRequest definition in proto format

static

AnnotateVideoResponse

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

Property

Name Type Optional Description

annotationResults

Array of Object

 

Annotation results for all videos specified in AnnotateVideoRequest.

This object should have the same structure as VideoAnnotationResults

See also

google.cloud.videointelligence.v1p2beta1.AnnotateVideoResponse definition in proto format

static

Entity

Detected entity from video analysis.

Properties

Name Type Optional Description

entityId

string

 

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

description

string

 

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

languageCode

string

 

Language code for description in BCP-47 format.

See also

google.cloud.videointelligence.v1p2beta1.Entity definition in proto format

static

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.

Property

Name Type Optional Description

frames

Array of Object

 

All video frames where explicit content was detected.

This object should have the same structure as ExplicitContentFrame

See also

google.cloud.videointelligence.v1p2beta1.ExplicitContentAnnotation definition in proto format

static

ExplicitContentDetectionConfig

Config for EXPLICIT_CONTENT_DETECTION.

Property

Name Type Optional Description

model

string

 

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

See also

google.cloud.videointelligence.v1p2beta1.ExplicitContentDetectionConfig definition in proto format

static

ExplicitContentFrame

Video frame level annotation results for explicit content.

Properties

Name Type Optional Description

timeOffset

Object

 

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

This object should have the same structure as Duration

pornographyLikelihood

number

 

Likelihood of the pornography content..

The number should be among the values of Likelihood

See also

google.cloud.videointelligence.v1p2beta1.ExplicitContentFrame definition in proto format

static

LabelAnnotation

Label annotation.

Properties

Name Type Optional Description

entity

Object

 

Detected entity.

This object should have the same structure as Entity

categoryEntities

Array of Object

 

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.

This object should have the same structure as Entity

segments

Array of Object

 

All video segments where a label was detected.

This object should have the same structure as LabelSegment

frames

Array of Object

 

All video frames where a label was detected.

This object should have the same structure as LabelFrame

See also

google.cloud.videointelligence.v1p2beta1.LabelAnnotation definition in proto format

static

LabelDetectionConfig

Config for LABEL_DETECTION.

Properties

Name Type Optional Description

labelDetectionMode

number

 

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

The number should be among the values of LabelDetectionMode

stationaryCamera

boolean

 

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

string

 

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

See also

google.cloud.videointelligence.v1p2beta1.LabelDetectionConfig definition in proto format

static

LabelFrame

Video frame level annotation results for label detection.

Properties

Name Type Optional Description

timeOffset

Object

 

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

This object should have the same structure as Duration

confidence

number

 

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

See also

google.cloud.videointelligence.v1p2beta1.LabelFrame definition in proto format

static

LabelSegment

Video segment level annotation results for label detection.

Properties

Name Type Optional Description

segment

Object

 

Video segment where a label was detected.

This object should have the same structure as VideoSegment

confidence

number

 

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

See also

google.cloud.videointelligence.v1p2beta1.LabelSegment definition in proto format

static

NormalizedBoundingBox

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

Properties

Name Type Optional Description

left

number

 

Left X coordinate.

top

number

 

Top Y coordinate.

right

number

 

Right X coordinate.

bottom

number

 

Bottom Y coordinate.

See also

google.cloud.videointelligence.v1p2beta1.NormalizedBoundingBox definition in proto format

static

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.

Property

Name Type Optional Description

vertices

Array of Object

 

Normalized vertices of the bounding polygon.

This object should have the same structure as NormalizedVertex

See also

google.cloud.videointelligence.v1p2beta1.NormalizedBoundingPoly definition in proto format

static

NormalizedVertex

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.

Properties

Name Type Optional Description

x

number

 

X coordinate.

y

number

 

Y coordinate.

See also

google.cloud.videointelligence.v1p2beta1.NormalizedVertex definition in proto format

static

ObjectTrackingAnnotation

Annotations corresponding to one tracked object.

Properties

Name Type Optional Description

entity

Object

 

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

This object should have the same structure as Entity

confidence

number

 

Object category's labeling confidence of this track.

frames

Array of Object

 

Information corresponding to all frames where this object track appears.

This object should have the same structure as ObjectTrackingFrame

segment

Object

 

Each object track corresponds to one video segment where it appears.

This object should have the same structure as VideoSegment

See also

google.cloud.videointelligence.v1p2beta1.ObjectTrackingAnnotation definition in proto format

static

ObjectTrackingFrame

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

Properties

Name Type Optional Description

normalizedBoundingBox

Object

 

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

This object should have the same structure as NormalizedBoundingBox

timeOffset

Object

 

The timestamp of the frame in microseconds.

This object should have the same structure as Duration

See also

google.cloud.videointelligence.v1p2beta1.ObjectTrackingFrame definition in proto format

static

ShotChangeDetectionConfig

Config for SHOT_CHANGE_DETECTION.

Property

Name Type Optional Description

model

string

 

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

See also

google.cloud.videointelligence.v1p2beta1.ShotChangeDetectionConfig definition in proto format

static

TextAnnotation

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

Properties

Name Type Optional Description

text

string

 

The detected text.

segments

Array of Object

 

All video segments where OCR detected text appears.

This object should have the same structure as TextSegment

See also

google.cloud.videointelligence.v1p2beta1.TextAnnotation definition in proto format

static

TextDetectionConfig

Config for TEXT_DETECTION.

Property

Name Type Optional Description

languageHints

Array of string

 

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.

See also

google.cloud.videointelligence.v1p2beta1.TextDetectionConfig definition in proto format

static

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.

Properties

Name Type Optional Description

rotatedBoundingBox

Object

 

Bounding polygon of the detected text for this frame.

This object should have the same structure as NormalizedBoundingPoly

timeOffset

Object

 

Timestamp of this frame.

This object should have the same structure as Duration

See also

google.cloud.videointelligence.v1p2beta1.TextFrame definition in proto format

static

TextSegment

Video segment level annotation results for text detection.

Properties

Name Type Optional Description

segment

Object

 

Video segment where a text snippet was detected.

This object should have the same structure as VideoSegment

confidence

number

 

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

frames

Array of Object

 

Information related to the frames where OCR detected text appears.

This object should have the same structure as TextFrame

See also

google.cloud.videointelligence.v1p2beta1.TextSegment definition in proto format

static

VideoAnnotationProgress

Annotation progress for a single video.

Properties

Name Type Optional Description

inputUri

string

 

Video file location in Google Cloud Storage.

progressPercent

number

 

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

startTime

Object

 

Time when the request was received.

This object should have the same structure as Timestamp

updateTime

Object

 

Time of the most recent update.

This object should have the same structure as Timestamp

See also

google.cloud.videointelligence.v1p2beta1.VideoAnnotationProgress definition in proto format

static

VideoAnnotationResults

Annotation results for a single video.

Properties

Name Type Optional Description

inputUri

string

 

Video file location in Google Cloud Storage.

segmentLabelAnnotations

Array of Object

 

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

This object should have the same structure as LabelAnnotation

shotLabelAnnotations

Array of Object

 

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

This object should have the same structure as LabelAnnotation

frameLabelAnnotations

Array of Object

 

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

This object should have the same structure as LabelAnnotation

shotAnnotations

Array of Object

 

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

This object should have the same structure as VideoSegment

explicitAnnotation

Object

 

Explicit content annotation.

This object should have the same structure as ExplicitContentAnnotation

textAnnotations

Array of Object

 

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

This object should have the same structure as TextAnnotation

objectAnnotations

Array of Object

 

Annotations for list of objects detected and tracked in video.

This object should have the same structure as ObjectTrackingAnnotation

error

Object

 

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

This object should have the same structure as Status

See also

google.cloud.videointelligence.v1p2beta1.VideoAnnotationResults definition in proto format

static

VideoContext

Video context and/or feature-specific parameters.

Properties

Name Type Optional Description

segments

Array of Object

 

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.

This object should have the same structure as VideoSegment

labelDetectionConfig

Object

 

Config for LABEL_DETECTION.

This object should have the same structure as LabelDetectionConfig

shotChangeDetectionConfig

Object

 

Config for SHOT_CHANGE_DETECTION.

This object should have the same structure as ShotChangeDetectionConfig

explicitContentDetectionConfig

Object

 

Config for EXPLICIT_CONTENT_DETECTION.

This object should have the same structure as ExplicitContentDetectionConfig

textDetectionConfig

Object

 

Config for TEXT_DETECTION.

This object should have the same structure as TextDetectionConfig

See also

google.cloud.videointelligence.v1p2beta1.VideoContext definition in proto format

static

VideoSegment

Video segment.

Properties

Name Type Optional Description

startTimeOffset

Object

 

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

This object should have the same structure as Duration

endTimeOffset

Object

 

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

This object should have the same structure as Duration

See also

google.cloud.videointelligence.v1p2beta1.VideoSegment definition in proto format