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 \ V1beta1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
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 |
AnnotationValue
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here. |
↳ annotation_metadata |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getAnnotationSource
Output only. The source of the annotation.
Returns | |
---|---|
Type | Description |
int |
setAnnotationSource
Output only. The source of the annotation.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getAnnotationValue
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
Returns | |
---|---|
Type | Description |
AnnotationValue|null |
hasAnnotationValue
clearAnnotationValue
setAnnotationValue
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
Parameter | |
---|---|
Name | Description |
var |
AnnotationValue
|
Returns | |
---|---|
Type | Description |
$this |
getAnnotationMetadata
Output only. Annotation metadata, including information like votes for labels.
Returns | |
---|---|
Type | Description |
AnnotationMetadata|null |
hasAnnotationMetadata
clearAnnotationMetadata
setAnnotationMetadata
Output only. Annotation metadata, including information like votes for labels.
Parameter | |
---|---|
Name | Description |
var |
AnnotationMetadata
|
Returns | |
---|---|
Type | Description |
$this |
getAnnotationSentiment
Output only. Sentiment for this annotation.
Returns | |
---|---|
Type | Description |
int |
setAnnotationSentiment
Output only. Sentiment for this annotation.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |