Google Cloud Datalabeling V1beta1 Client - Class Annotation (0.4.2)

Reference documentation and code samples for the Google Cloud Datalabeling V1beta1 Client class 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.

Generated from protobuf message google.cloud.datalabeling.v1beta1.Annotation

Namespace

Google \ Cloud \ DataLabeling \ V1beta1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. Unique name of this annotation, format is: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}

↳ annotation_source int

Output only. The source of the annotation.

↳ annotation_value Google\Cloud\DataLabeling\V1beta1\AnnotationValue

Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.

↳ annotation_metadata Google\Cloud\DataLabeling\V1beta1\AnnotationMetadata

Output only. Annotation metadata, including information like votes for labels.

↳ annotation_sentiment int

Output only. Sentiment for this annotation.

getName

Output only. Unique name of this annotation, format is: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}

Returns
TypeDescription
string

setName

Output only. Unique name of this annotation, format is: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAnnotationSource

Output only. The source of the annotation.

Returns
TypeDescription
int

setAnnotationSource

Output only. The source of the annotation.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getAnnotationValue

Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.

Returns
TypeDescription
Google\Cloud\DataLabeling\V1beta1\AnnotationValue|null

hasAnnotationValue

clearAnnotationValue

setAnnotationValue

Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.

Parameter
NameDescription
var Google\Cloud\DataLabeling\V1beta1\AnnotationValue
Returns
TypeDescription
$this

getAnnotationMetadata

Output only. Annotation metadata, including information like votes for labels.

Returns
TypeDescription
Google\Cloud\DataLabeling\V1beta1\AnnotationMetadata|null

hasAnnotationMetadata

clearAnnotationMetadata

setAnnotationMetadata

Output only. Annotation metadata, including information like votes for labels.

Parameter
NameDescription
var Google\Cloud\DataLabeling\V1beta1\AnnotationMetadata
Returns
TypeDescription
$this

getAnnotationSentiment

Output only. Sentiment for this annotation.

Returns
TypeDescription
int

setAnnotationSentiment

Output only. Sentiment for this annotation.

Parameter
NameDescription
var int
Returns
TypeDescription
$this