AnnotateVideoResponse

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

JSON representation
{
  "annotationResults": [
    {
      object (VideoAnnotationResults)
    }
  ]
}
Fields
annotationResults[]

object (VideoAnnotationResults)

Annotation results for all videos specified in AnnotateVideoRequest.

VideoAnnotationResults

Annotation results for a single video.

JSON representation
{
  "inputUri": string,
  "segment": {
    object (VideoSegment)
  },
  "segmentLabelAnnotations": [
    {
      object (LabelAnnotation)
    }
  ],
  "segmentPresenceLabelAnnotations": [
    {
      object (LabelAnnotation)
    }
  ],
  "shotLabelAnnotations": [
    {
      object (LabelAnnotation)
    }
  ],
  "shotPresenceLabelAnnotations": [
    {
      object (LabelAnnotation)
    }
  ],
  "frameLabelAnnotations": [
    {
      object (LabelAnnotation)
    }
  ],
  "faceAnnotations": [
    {
      object (FaceAnnotation)
    }
  ],
  "faceDetectionAnnotations": [
    {
      object (FaceDetectionAnnotation)
    }
  ],
  "shotAnnotations": [
    {
      object (VideoSegment)
    }
  ],
  "explicitAnnotation": {
    object (ExplicitContentAnnotation)
  },
  "speechTranscriptions": [
    {
      object (SpeechTranscription)
    }
  ],
  "textAnnotations": [
    {
      object (TextAnnotation)
    }
  ],
  "objectAnnotations": [
    {
      object (ObjectTrackingAnnotation)
    }
  ],
  "logoRecognitionAnnotations": [
    {
      object (LogoRecognitionAnnotation)
    }
  ],
  "personDetectionAnnotations": [
    {
      object (PersonDetectionAnnotation)
    }
  ],
  "error": {
    object (Status)
  }
}
Fields
inputUri

string

Video file location in Cloud Storage.

segment

object (VideoSegment)

Video segment on which the annotation is run.

segmentLabelAnnotations[]

object (LabelAnnotation)

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

segmentPresenceLabelAnnotations[]

object (LabelAnnotation)

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 segmentLabelAnnotations, 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.

shotLabelAnnotations[]

object (LabelAnnotation)

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

shotPresenceLabelAnnotations[]

object (LabelAnnotation)

Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical shotLabelAnnotations, 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.

frameLabelAnnotations[]

object (LabelAnnotation)

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

faceAnnotations[]
(deprecated)

object (FaceAnnotation)

Deprecated. Please use faceDetectionAnnotations instead.

faceDetectionAnnotations[]

object (FaceDetectionAnnotation)

Face detection annotations.

shotAnnotations[]

object (VideoSegment)

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

explicitAnnotation

object (ExplicitContentAnnotation)

Explicit content annotation.

speechTranscriptions[]

object (SpeechTranscription)

Speech transcription.

textAnnotations[]

object (TextAnnotation)

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

objectAnnotations[]

object (ObjectTrackingAnnotation)

Annotations for list of objects detected and tracked in video.

logoRecognitionAnnotations[]

object (LogoRecognitionAnnotation)

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

personDetectionAnnotations[]

object (PersonDetectionAnnotation)

Person detection annotations.

error

object (Status)

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

LabelAnnotation

Label annotation.

JSON representation
{
  "entity": {
    object (Entity)
  },
  "categoryEntities": [
    {
      object (Entity)
    }
  ],
  "segments": [
    {
      object (LabelSegment)
    }
  ],
  "frames": [
    {
      object (LabelFrame)
    }
  ],
  "version": string
}
Fields
entity

object (Entity)

Detected entity.

categoryEntities[]

object (Entity)

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.

segments[]

object (LabelSegment)

All video segments where a label was detected.

frames[]

object (LabelFrame)

All video frames where a label was detected.

version

string

Feature version.

Entity

Detected entity from video analysis.

JSON representation
{
  "entityId": string,
  "description": string,
  "languageCode": string
}
Fields
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.

LabelSegment

Video segment level annotation results for label detection.

JSON representation
{
  "segment": {
    object (VideoSegment)
  },
  "confidence": number
}
Fields
segment

object (VideoSegment)

Video segment where a label was detected.

confidence

number

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

LabelFrame

Video frame level annotation results for label detection.

JSON representation
{
  "timeOffset": string,
  "confidence": number
}
Fields
timeOffset

string (Duration format)

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

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

confidence

number

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

FaceAnnotation

Deprecated. No effect.

JSON representation
{
  "thumbnail": string,
  "segments": [
    {
      object (FaceSegment)
    }
  ],
  "frames": [
    {
      object (FaceFrame)
    }
  ]
}
Fields
thumbnail

string (bytes format)

Thumbnail of a representative face view (in JPEG format).

A base64-encoded string.

segments[]

object (FaceSegment)

All video segments where a face was detected.

frames[]

object (FaceFrame)

All video frames where a face was detected.

FaceSegment

Video segment level annotation results for face detection.

JSON representation
{
  "segment": {
    object (VideoSegment)
  }
}
Fields
segment

object (VideoSegment)

Video segment where a face was detected.

FaceFrame

Deprecated. No effect.

JSON representation
{
  "normalizedBoundingBoxes": [
    {
      object (NormalizedBoundingBox)
    }
  ],
  "timeOffset": string
}
Fields
normalizedBoundingBoxes[]

object (NormalizedBoundingBox)

Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.

timeOffset

string (Duration format)

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

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

NormalizedBoundingBox

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

JSON representation
{
  "left": number,
  "top": number,
  "right": number,
  "bottom": number
}
Fields
left

number

Left X coordinate.

top

number

Top Y coordinate.

right

number

Right X coordinate.

bottom

number

Bottom Y coordinate.

FaceDetectionAnnotation

Face detection annotation.

JSON representation
{
  "tracks": [
    {
      object (Track)
    }
  ],
  "thumbnail": string,
  "version": string
}
Fields
tracks[]

object (Track)

The face tracks with attributes.

thumbnail

string (bytes format)

The thumbnail of a person's face.

A base64-encoded string.

version

string

Feature version.

Track

A track of an object instance.

JSON representation
{
  "segment": {
    object (VideoSegment)
  },
  "timestampedObjects": [
    {
      object (TimestampedObject)
    }
  ],
  "attributes": [
    {
      object (DetectedAttribute)
    }
  ],
  "confidence": number
}
Fields
segment

object (VideoSegment)

Video segment of a track.

timestampedObjects[]

object (TimestampedObject)

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

attributes[]

object (DetectedAttribute)

Optional. Attributes in the track level.

confidence

number

Optional. The confidence score of the tracked object.

TimestampedObject

For tracking related features. An object at timeOffset with attributes, and located with normalizedBoundingBox.

JSON representation
{
  "normalizedBoundingBox": {
    object (NormalizedBoundingBox)
  },
  "timeOffset": string,
  "attributes": [
    {
      object (DetectedAttribute)
    }
  ],
  "landmarks": [
    {
      object (DetectedLandmark)
    }
  ]
}
Fields
normalizedBoundingBox

object (NormalizedBoundingBox)

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

timeOffset

string (Duration format)

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

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

attributes[]

object (DetectedAttribute)

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

landmarks[]

object (DetectedLandmark)

Optional. The detected landmarks.

DetectedAttribute

A generic detected attribute represented by name in string format.

JSON representation
{
  "name": string,
  "confidence": number,
  "value": string
}
Fields
name

string

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.

confidence

number

Detected attribute confidence. Range [0, 1].

value

string

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

DetectedLandmark

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

JSON representation
{
  "name": string,
  "point": {
    object (NormalizedVertex)
  },
  "confidence": number
}
Fields
name

string

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

point

object (NormalizedVertex)

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

confidence

number

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

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.

JSON representation
{
  "x": number,
  "y": number
}
Fields
x

number

X coordinate.

y

number

Y coordinate.

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.

JSON representation
{
  "frames": [
    {
      object (ExplicitContentFrame)
    }
  ],
  "version": string
}
Fields
frames[]

object (ExplicitContentFrame)

All video frames where explicit content was detected.

version

string

Feature version.

ExplicitContentFrame

Video frame level annotation results for explicit content.

JSON representation
{
  "timeOffset": string,
  "pornographyLikelihood": enum (Likelihood)
}