Package google.cloud.videointelligence.v1beta1

Index

VideoIntelligenceService

Service that implements Google Cloud Video Intelligence API.

AnnotateVideo

rpc AnnotateVideo(AnnotateVideoRequest) returns (Operation)

Performs asynchronous video annotation. Progress and results can be retrieved through the google.longrunning.Operations interface. Operation.metadata contains AnnotateVideoProgress (progress). Operation.response contains AnnotateVideoResponse (results).

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

AnnotateVideoProgress

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

Fields
annotation_progress[]

VideoAnnotationProgress

Progress metadata for all videos specified in AnnotateVideoRequest.

AnnotateVideoRequest

Video annotation request.

Fields
input_uri

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.

input_content

string

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

features[]

Feature

Requested video annotation features.

video_context

VideoContext

Additional video context and/or feature-specific parameters.

output_uri

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.

location_id

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.

AnnotateVideoResponse

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

Fields
annotation_results[]

VideoAnnotationResults

Annotation results for all videos specified in AnnotateVideoRequest.

Feature

Video annotation feature.

Enums
FEATURE_UNSPECIFIED Unspecified.
LABEL_DETECTION Label detection. Detect objects, such as dog or flower.
SHOT_CHANGE_DETECTION Shot change detection.
SAFE_SEARCH_DETECTION Safe search detection.

LabelAnnotation

Label annotation.

Fields
description

string

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

language_code

string

Language code for description in BCP-47 format.

locations[]

LabelLocation

Where the label was detected and with what confidence.

LabelDetectionMode

Label detection mode.

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

LabelLevel

Label level (scope).

Enums
LABEL_LEVEL_UNSPECIFIED Unspecified.
VIDEO_LEVEL Video-level. Corresponds to the whole video.
SEGMENT_LEVEL Segment-level. Corresponds to one of AnnotateSpec.segments.
SHOT_LEVEL Shot-level. Corresponds to a single shot (i.e. a series of frames without a major camera position or background change).
FRAME_LEVEL Frame-level. Corresponds to a single video frame.

LabelLocation

Label location.

Fields
segment

VideoSegment

Video segment. Set to [-1, -1] for video-level labels. Set to [timestamp, timestamp] for frame-level labels. Otherwise, corresponds to one of AnnotateSpec.segments (if specified) or to shot boundaries (if requested).

confidence

float

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

level

LabelLevel

Label level.

Likelihood

Bucketized representation of likelihood.

Enums
UNKNOWN Unknown likelihood.
VERY_UNLIKELY Very unlikely.
UNLIKELY Unlikely.
POSSIBLE Possible.
LIKELY Likely.
VERY_LIKELY Very likely.

SafeSearchAnnotation

Safe search annotation (based on per-frame visual signals only). If no unsafe content has been detected in a frame, no annotations are present for that frame. If only some types of unsafe content have been detected in a frame, the likelihood is set to UNKNOWN for all other types of unsafe content.

Fields
adult

Likelihood

Likelihood of adult content.

spoof

Likelihood

Likelihood that an obvious modification was made to the original version to make it appear funny or offensive.

medical

Likelihood

Likelihood of medical content.

violent

Likelihood

Likelihood of violent content.

racy

Likelihood

Likelihood of racy content.

time_offset

int64

Video time offset in microseconds.

VideoAnnotationProgress

Annotation progress for a single video.

Fields
input_uri

string

Video file location in Google Cloud Storage.

progress_percent

int32

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

start_time

Timestamp

Time when the request was received.

update_time

Timestamp

Time of the most recent update.

VideoAnnotationResults

Annotation results for a single video.

Fields
input_uri

string

Video file location in Google Cloud Storage.

label_annotations[]

LabelAnnotation

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

shot_annotations[]

VideoSegment

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

safe_search_annotations[]

SafeSearchAnnotation

Safe search annotations.

error

Status

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

VideoContext

Video context and/or feature-specific parameters.

Fields
segments[]

VideoSegment

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_mode

LabelDetectionMode

If label detection has been requested, what labels should be detected in addition to video-level labels or segment-level labels. If unspecified, defaults to SHOT_MODE.

stationary_camera

bool

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.

label_detection_model

string

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

shot_change_detection_model

string

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

safe_search_detection_model

string

Model to use for safe search detection. Supported values: "latest" and "stable" (the default).

VideoSegment

Video segment.

Fields
start_time_offset

int64

Start offset in microseconds (inclusive). Unset means 0.

end_time_offset

int64

End offset in microseconds (inclusive). Unset means 0.

Var denne side nyttig? Giv os en anmeldelse af den:

Send feedback om...

Cloud Video Intelligence API