NAME
Google::Cloud::Datalabeling::V1beta1::Annotation - Compiled Protocol Buffers messages for google/cloud/datalabeling/v1beta1/annotation.proto
SYNOPSIS
use Google::Cloud::Datalabeling::V1beta1::Annotation;
my $msg = Google::Cloud::Datalabeling::V1beta1::Annotation::Annotation->new({
name => $name,
annotation_source => $annotation_source,
annotation_value => $annotation_value,
annotation_metadata => $annotation_metadata,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Datalabeling::V1beta1::Annotation::Annotation->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/datalabeling/v1beta1/annotation.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Datalabeling::V1beta1::Annotation::Annotation
Annotation for Example. Each example may have one or more annotations. For example in image classification problem, each image might have one or more labels. We call labels binded with this image an Annotation.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringOutput only. Unique name of this annotation, format is:
projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
$msg->annotation_source()/$msg->annotation_source($value)Type:
Enum(Google::Cloud::Datalabeling::V1beta1::AnnotationSource)Output only. The source of the annotation.
$msg->annotation_value()/$msg->annotation_value($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::AnnotationValue)Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
$msg->annotation_metadata()/$msg->annotation_metadata($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::AnnotationMetadata)Output only. Annotation metadata, including information like votes for labels.
$msg->annotation_sentiment()/$msg->annotation_sentiment($value)Type:
Enum(Google::Cloud::Datalabeling::V1beta1::AnnotationSentiment)Output only. Sentiment for this annotation.
Google::Cloud::Datalabeling::V1beta1::Annotation::AnnotationValue
Annotation value for an example.
Inherits from Protobuf::Message.
Accessors
$msg->image_classification_annotation()/$msg->image_classification_annotation($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::ImageClassificationAnnotation)Annotation value for image classification case.
$msg->image_bounding_poly_annotation()/$msg->image_bounding_poly_annotation($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::ImageBoundingPolyAnnotation)Annotation value for image bounding box, oriented bounding box and polygon cases.
$msg->image_polyline_annotation()/$msg->image_polyline_annotation($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::ImagePolylineAnnotation)Annotation value for image polyline cases. Polyline here is different from BoundingPoly. It is formed by line segments connected to each other but not closed form(Bounding Poly). The line segments can cross each other.
$msg->image_segmentation_annotation()/$msg->image_segmentation_annotation($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::ImageSegmentationAnnotation)Annotation value for image segmentation.
$msg->text_classification_annotation()/$msg->text_classification_annotation($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::TextClassificationAnnotation)Annotation value for text classification case.
$msg->text_entity_extraction_annotation()/$msg->text_entity_extraction_annotation($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::TextEntityExtractionAnnotation)Annotation value for text entity extraction case.
$msg->video_classification_annotation()/$msg->video_classification_annotation($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::VideoClassificationAnnotation)Annotation value for video classification case.
$msg->video_object_tracking_annotation()/$msg->video_object_tracking_annotation($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::VideoObjectTrackingAnnotation)Annotation value for video object detection and tracking case.
$msg->video_event_annotation()/$msg->video_event_annotation($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::VideoEventAnnotation)Annotation value for video event case.
Google::Cloud::Datalabeling::V1beta1::Annotation::ImageClassificationAnnotation
Image classification annotation definition.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_spec()/$msg->annotation_spec($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::AnnotationSpecSet::AnnotationSpec)Label of image.
Google::Cloud::Datalabeling::V1beta1::Annotation::Vertex
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
Inherits from Protobuf::Message.
Accessors
$msg->x()/$msg->x($value)Type:
Int32X coordinate.
$msg->y()/$msg->y($value)Type:
Int32Y coordinate.
Google::Cloud::Datalabeling::V1beta1::Annotation::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.
Inherits from Protobuf::Message.
Accessors
$msg->x()/$msg->x($value)Type:
FloatX coordinate.
$msg->y()/$msg->y($value)Type:
FloatY coordinate.
Google::Cloud::Datalabeling::V1beta1::Annotation::BoundingPoly
A bounding polygon in the image.
Inherits from Protobuf::Message.
Accessors
$msg->vertices()/$msg->vertices($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::Vertex)The bounding polygon vertices.
Google::Cloud::Datalabeling::V1beta1::Annotation::NormalizedBoundingPoly
Normalized bounding polygon.
Inherits from Protobuf::Message.
Accessors
$msg->normalized_vertices()/$msg->normalized_vertices($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::NormalizedVertex)The bounding polygon normalized vertices.
Google::Cloud::Datalabeling::V1beta1::Annotation::ImageBoundingPolyAnnotation
Image bounding poly annotation. It represents a polygon including bounding box in the image.
Inherits from Protobuf::Message.
Accessors
$msg->bounding_poly()/$msg->bounding_poly($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::BoundingPoly)$msg->normalized_bounding_poly()/$msg->normalized_bounding_poly($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::NormalizedBoundingPoly)$msg->annotation_spec()/$msg->annotation_spec($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::AnnotationSpecSet::AnnotationSpec)Label of object in this bounding polygon.
Google::Cloud::Datalabeling::V1beta1::Annotation::Polyline
A line with multiple line segments.
Inherits from Protobuf::Message.
Accessors
$msg->vertices()/$msg->vertices($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::Vertex)The polyline vertices.
Google::Cloud::Datalabeling::V1beta1::Annotation::NormalizedPolyline
Normalized polyline.
Inherits from Protobuf::Message.
Accessors
$msg->normalized_vertices()/$msg->normalized_vertices($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::NormalizedVertex)The normalized polyline vertices.
Google::Cloud::Datalabeling::V1beta1::Annotation::ImagePolylineAnnotation
A polyline for the image annotation.
Inherits from Protobuf::Message.
Accessors
$msg->polyline()/$msg->polyline($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::Polyline)$msg->normalized_polyline()/$msg->normalized_polyline($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::NormalizedPolyline)$msg->annotation_spec()/$msg->annotation_spec($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::AnnotationSpecSet::AnnotationSpec)Label of this polyline.
Google::Cloud::Datalabeling::V1beta1::Annotation::ImageSegmentationAnnotation
Image segmentation annotation.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_colors()/$msg->annotation_colors($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::ImageSegmentationAnnotation::AnnotationColorsEntry)The mapping between rgb color and annotation spec. The key is the rgb color represented in format of rgb(0, 0, 0). The value is the AnnotationSpec.
$msg->mime_type()/$msg->mime_type($value)Type:
StringImage format.
$msg->image_bytes()/$msg->image_bytes($value)Type:
BytesA byte string of a full image's color map.
Google::Cloud::Datalabeling::V1beta1::Annotation::TextClassificationAnnotation
Text classification annotation.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_spec()/$msg->annotation_spec($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::AnnotationSpecSet::AnnotationSpec)Label of the text.
Google::Cloud::Datalabeling::V1beta1::Annotation::TextEntityExtractionAnnotation
Text entity extraction annotation.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_spec()/$msg->annotation_spec($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::AnnotationSpecSet::AnnotationSpec)Label of the text entities.
$msg->sequential_segment()/$msg->sequential_segment($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::SequentialSegment)Position of the entity.
Google::Cloud::Datalabeling::V1beta1::Annotation::SequentialSegment
Start and end position in a sequence (e.g. text segment).
Inherits from Protobuf::Message.
Accessors
$msg->start()/$msg->start($value)Type:
Int32Start position (inclusive).
$msg->end()/$msg->end($value)Type:
Int32End position (exclusive).
Google::Cloud::Datalabeling::V1beta1::Annotation::TimeSegment
A time period inside of an example that has a time dimension (e.g. video).
Inherits from Protobuf::Message.
Accessors
$msg->start_time_offset()/$msg->start_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Start of the time segment (inclusive), represented as the duration since the example start.
$msg->end_time_offset()/$msg->end_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)End of the time segment (exclusive), represented as the duration since the example start.
Google::Cloud::Datalabeling::V1beta1::Annotation::VideoClassificationAnnotation
Video classification annotation.
Inherits from Protobuf::Message.
Accessors
$msg->time_segment()/$msg->time_segment($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::TimeSegment)The time segment of the video to which the annotation applies.
$msg->annotation_spec()/$msg->annotation_spec($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::AnnotationSpecSet::AnnotationSpec)Label of the segment specified by time_segment.
Google::Cloud::Datalabeling::V1beta1::Annotation::ObjectTrackingFrame
Video frame level annotation for object detection and tracking.
Inherits from Protobuf::Message.
Accessors
$msg->bounding_poly()/$msg->bounding_poly($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::BoundingPoly)$msg->normalized_bounding_poly()/$msg->normalized_bounding_poly($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::NormalizedBoundingPoly)$msg->time_offset()/$msg->time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)The time offset of this frame relative to the beginning of the video.
Google::Cloud::Datalabeling::V1beta1::Annotation::VideoObjectTrackingAnnotation
Video object tracking annotation.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_spec()/$msg->annotation_spec($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::AnnotationSpecSet::AnnotationSpec)Label of the object tracked in this annotation.
$msg->time_segment()/$msg->time_segment($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::TimeSegment)The time segment of the video to which object tracking applies.
$msg->object_tracking_frames()/$msg->object_tracking_frames($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::ObjectTrackingFrame)The list of frames where this object track appears.
Google::Cloud::Datalabeling::V1beta1::Annotation::VideoEventAnnotation
Video event annotation.
Inherits from Protobuf::Message.
Accessors
$msg->annotation_spec()/$msg->annotation_spec($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::AnnotationSpecSet::AnnotationSpec)Label of the event in this annotation.
$msg->time_segment()/$msg->time_segment($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::TimeSegment)The time segment of the video to which the annotation applies.
Google::Cloud::Datalabeling::V1beta1::Annotation::AnnotationMetadata
Additional information associated with the annotation.
Inherits from Protobuf::Message.
Accessors
$msg->operator_metadata()/$msg->operator_metadata($value)Type:
Message(Google::Cloud::Datalabeling::V1beta1::Annotation::OperatorMetadata)Metadata related to human labeling.
Google::Cloud::Datalabeling::V1beta1::Annotation::OperatorMetadata
General information useful for labels coming from contributors.
Inherits from Protobuf::Message.
Accessors
$msg->score()/$msg->score($value)Type:
FloatConfidence score corresponding to a label. For examle, if 3 contributors have answered the question and 2 of them agree on the final label, the confidence score will be 0.67 (2/3).
$msg->total_votes()/$msg->total_votes($value)Type:
Int32The total number of contributors that answer this question.
$msg->label_votes()/$msg->label_votes($value)Type:
Int32The total number of contributors that choose this label.
$msg->comments()/$msg->comments($value)Type:
StringComments from contributors.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Datalabeling::V1beta1::Annotation::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.