Enumerations

AnnotationSentiment

constant   static

number

Value

ANNOTATION_SENTIMENT_UNSPECIFIED

NEGATIVE

This annotation describes negatively about the data.

POSITIVE

This label describes positively about the data.

AnnotationSource

constant   static

number

Specifies where is the answer from.

Value

ANNOTATION_SOURCE_UNSPECIFIED

OPERATOR

Answer is provided by a human contributor.

AnnotationType

constant   static

number

Value

ANNOTATION_TYPE_UNSPECIFIED

IMAGE_CLASSIFICATION_ANNOTATION

Classification annotations in an image.

IMAGE_BOUNDING_BOX_ANNOTATION

Bounding box annotations in an image.

IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION

Oriented bounding box. The box does not have to be parallel to horizontal line.

IMAGE_BOUNDING_POLY_ANNOTATION

Bounding poly annotations in an image.

IMAGE_POLYLINE_ANNOTATION

Polyline annotations in an image.

IMAGE_SEGMENTATION_ANNOTATION

Segmentation annotations in an image.

VIDEO_SHOTS_CLASSIFICATION_ANNOTATION

Classification annotations in video shots.

VIDEO_OBJECT_TRACKING_ANNOTATION

Video object tracking annotation.

VIDEO_OBJECT_DETECTION_ANNOTATION

Video object detection annotation.

VIDEO_EVENT_ANNOTATION

Video event annotation.

AUDIO_TRANSCRIPTION_ANNOTATION

Speech to text annotation.

TEXT_CLASSIFICATION_ANNOTATION

Classification for text.

TEXT_ENTITY_EXTRACTION_ANNOTATION

Entity extraction for text.

DataType

constant   static

number

Value

DATA_TYPE_UNSPECIFIED

IMAGE

VIDEO

TEXT

AUDIO

Feature

static

number

Image labeling task feature.

Value

FEATURE_UNSPECIFIED

CLASSIFICATION

Label whole image with one or more of labels.

BOUNDING_BOX

Label image with bounding boxes for labels.

ORIENTED_BOUNDING_BOX

Label oriented bounding box. The box does not have to be parallel to horizontal line.

BOUNDING_POLY

Label images with bounding poly. A bounding poly is a plane figure that is bounded by a finite chain of straight line segments closing in a loop.

POLYLINE

Label images with polyline. Polyline is formed by connected line segments which are not in closed form.

SEGMENTATION

Label images with segmentation. Segmentation is different from bounding poly since it is more fine-grained, pixel level annotation.

Feature

static

number

Video labeling task feature.

Value

FEATURE_UNSPECIFIED

CLASSIFICATION

Label whole video or video segment with one or more labels.

OBJECT_DETECTION

Label objects with bounding box on image frames extracted from the video.

OBJECT_TRACKING

Label and track objects in video.

EVENT

Label the range of video for the specified events.

Feature

static

number

Text labeling task feature.

Value

FEATURE_UNSPECIFIED

TEXT_CLASSIFICATION

Label text content to one of more labels.

TEXT_ENTITY_EXTRACTION

Label entities and their span in text.

Feature

static

number

Audio labeling task feature.

Value

FEATURE_UNSPECIFIED

AUDIO_TRANSCRIPTION

Transcribe the audios into text.

StringAggregationType

constant   static

number

Value

STRING_AGGREGATION_TYPE_UNSPECIFIED

MAJORITY_VOTE

Majority vote to aggregate answers.

UNANIMOUS_VOTE

Unanimous answers will be adopted.

NO_AGGREGATION

Preserve all answers by crowd compute.

Properties

AnnotationSentiment

constant   static

number

Value

ANNOTATION_SENTIMENT_UNSPECIFIED

NEGATIVE

This annotation describes negatively about the data.

POSITIVE

This label describes positively about the data.

AnnotationSource

constant   static

number

Specifies where is the answer from.

Value

ANNOTATION_SOURCE_UNSPECIFIED

OPERATOR

Answer is provided by a human contributor.

AnnotationType

constant   static

number

Value

ANNOTATION_TYPE_UNSPECIFIED

IMAGE_CLASSIFICATION_ANNOTATION

Classification annotations in an image.

IMAGE_BOUNDING_BOX_ANNOTATION

Bounding box annotations in an image.

IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION

Oriented bounding box. The box does not have to be parallel to horizontal line.

IMAGE_BOUNDING_POLY_ANNOTATION

Bounding poly annotations in an image.

IMAGE_POLYLINE_ANNOTATION

Polyline annotations in an image.

IMAGE_SEGMENTATION_ANNOTATION

Segmentation annotations in an image.

VIDEO_SHOTS_CLASSIFICATION_ANNOTATION

Classification annotations in video shots.

VIDEO_OBJECT_TRACKING_ANNOTATION

Video object tracking annotation.

VIDEO_OBJECT_DETECTION_ANNOTATION

Video object detection annotation.

VIDEO_EVENT_ANNOTATION

Video event annotation.

AUDIO_TRANSCRIPTION_ANNOTATION

Speech to text annotation.

TEXT_CLASSIFICATION_ANNOTATION

Classification for text.

TEXT_ENTITY_EXTRACTION_ANNOTATION

Entity extraction for text.

DataType

constant   static

number

Value

DATA_TYPE_UNSPECIFIED

IMAGE

VIDEO

TEXT

AUDIO

Feature

static

number

Image labeling task feature.

Value

FEATURE_UNSPECIFIED

CLASSIFICATION

Label whole image with one or more of labels.

BOUNDING_BOX

Label image with bounding boxes for labels.

ORIENTED_BOUNDING_BOX

Label oriented bounding box. The box does not have to be parallel to horizontal line.

BOUNDING_POLY

Label images with bounding poly. A bounding poly is a plane figure that is bounded by a finite chain of straight line segments closing in a loop.

POLYLINE

Label images with polyline. Polyline is formed by connected line segments which are not in closed form.

SEGMENTATION

Label images with segmentation. Segmentation is different from bounding poly since it is more fine-grained, pixel level annotation.

Feature

static

number

Video labeling task feature.

Value

FEATURE_UNSPECIFIED

CLASSIFICATION

Label whole video or video segment with one or more labels.

OBJECT_DETECTION

Label objects with bounding box on image frames extracted from the video.

OBJECT_TRACKING

Label and track objects in video.

EVENT

Label the range of video for the specified events.

Feature

static

number

Text labeling task feature.

Value

FEATURE_UNSPECIFIED

TEXT_CLASSIFICATION

Label text content to one of more labels.

TEXT_ENTITY_EXTRACTION

Label entities and their span in text.

Feature

static

number

Audio labeling task feature.

Value

FEATURE_UNSPECIFIED

AUDIO_TRANSCRIPTION

Transcribe the audios into text.

StringAggregationType

constant   static

number

Value

STRING_AGGREGATION_TYPE_UNSPECIFIED

MAJORITY_VOTE

Majority vote to aggregate answers.

UNANIMOUS_VOTE

Unanimous answers will be adopted.

NO_AGGREGATION

Preserve all answers by crowd compute.

Abstract types

AnnotatedDataset

static

AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.

Properties

Parameter

name

string

Output only. AnnotatedDataset resource name in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}

displayName

string

Output only. The display name of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 64 characters.

description

string

Output only. The description of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 characters.

annotationSource

number

Output only. Source of the annotation.

The number should be among the values of AnnotationSource

annotationType

number

Output only. Type of the annotation. It is specified when starting labeling task.

The number should be among the values of AnnotationType

exampleCount

number

Output only. Number of examples in the annotated dataset.

completedExampleCount

number

Output only. Number of examples that have annotation in the annotated dataset.

labelStats

Object

Output only. Per label statistics.

This object should have the same structure as LabelStats

createTime

Object

Output only. Time the AnnotatedDataset was created.

This object should have the same structure as Timestamp

metadata

Object

Output only. Additional information about AnnotatedDataset.

This object should have the same structure as AnnotatedDatasetMetadata

See also

google.cloud.datalabeling.v1beta1.AnnotatedDataset definition in proto format

AnnotatedDatasetMetadata

static

Metadata on AnnotatedDataset.

Properties

Parameter

humanAnnotationConfig

Object

HumanAnnotationConfig used when requesting the human labeling task for this AnnotatedDataset.

This object should have the same structure as HumanAnnotationConfig

imageClassificationConfig

Object

Configuration for image classification task.

This object should have the same structure as ImageClassificationConfig

boundingPolyConfig

Object

Configuration for image bounding box and bounding poly task.

This object should have the same structure as BoundingPolyConfig

polylineConfig

Object

Configuration for image polyline task.

This object should have the same structure as PolylineConfig

segmentationConfig

Object

Configuration for image segmentation task.

This object should have the same structure as SegmentationConfig

videoClassificationConfig

Object

Configuration for video classification task.

This object should have the same structure as VideoClassificationConfig

objectDetectionConfig

Object

Configuration for video object detection task.

This object should have the same structure as ObjectDetectionConfig

objectTrackingConfig

Object

Configuration for video object tracking task.

This object should have the same structure as ObjectTrackingConfig

eventConfig

Object

Configuration for video event labeling task.

This object should have the same structure as EventConfig

textClassificationConfig

Object

Configuration for text classification task.

This object should have the same structure as TextClassificationConfig

textEntityExtractionConfig

Object

Configuration for text entity extraction task.

This object should have the same structure as TextEntityExtractionConfig

See also

google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata definition in proto format

Annotation

static

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.

Properties

Parameter

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}

annotationSource

number

Output only. The source of the annotation.

The number should be among the values of AnnotationSource

annotationValue

Object

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

This object should have the same structure as AnnotationValue

annotationMetadata

Object

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

This object should have the same structure as AnnotationMetadata

annotationSentiment

number

Output only. Sentiment for this annotation.

The number should be among the values of AnnotationSentiment

See also

google.cloud.datalabeling.v1beta1.Annotation definition in proto format

AnnotationMetadata

static

Additional information associated with the annotation.

Property

Parameter

operatorMetadata

Object

Metadata related to human labeling.

This object should have the same structure as OperatorMetadata

See also

google.cloud.datalabeling.v1beta1.AnnotationMetadata definition in proto format

AnnotationSpec

static

Container of information related to one annotation spec.

Properties

Parameter

displayName

string

Required. The display name of the AnnotationSpec. Maximum of 64 characters.

description

string

Optional. User-provided description of the annotation specification. The description can be up to 10000 characters long.

See also

google.cloud.datalabeling.v1beta1.AnnotationSpec definition in proto format

AnnotationSpecSet

static

AnnotationSpecSet is a collection of label definitions. For example, in image classification tasks, we define a set of labels, this set is called AnnotationSpecSet. AnnotationSpecSet is immutable upon creation.

Properties

Parameter

name

string

Output only. AnnotationSpecSet resource name, format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}

displayName

string

Required. The display name for AnnotationSpecSet defined by user. Maximum of 64 characters.

description

string

Optional. User-provided description of the annotation specification set. The description can be up to 10000 characters long.

annotationSpecs

Array of Object

Required. The actual spec set defined by the users.

This object should have the same structure as AnnotationSpec

See also

google.cloud.datalabeling.v1beta1.AnnotationSpecSet definition in proto format

AnnotationSpecSetConfig

static

Annotation spec set with the setting of allowing multi labels or not.

Properties

Parameter

annotationSpecSet

string

Required. Annotation spec set resource name.

allowMultiLabel

boolean

Optional. If allow_multi_label is true, contributors are able to choose multiple labels from one annotation spec set.

See also

google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig definition in proto format

AnnotationValue

static

Annotation value for an example.

Properties

Parameter

imageClassificationAnnotation

Object

Annotation value for image classification case.

This object should have the same structure as ImageClassificationAnnotation

imageBoundingPolyAnnotation

Object

Annotation value for image bounding box, oriented bounding box and polygon cases.

This object should have the same structure as ImageBoundingPolyAnnotation

imagePolylineAnnotation

Object

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.

This object should have the same structure as ImagePolylineAnnotation

imageSegmentationAnnotation

Object

Annotation value for image segmentation.

This object should have the same structure as ImageSegmentationAnnotation

textClassificationAnnotation

Object

Annotation value for text classification case.

This object should have the same structure as TextClassificationAnnotation

videoClassificationAnnotation

Object

Annotation value for video classification case.

This object should have the same structure as VideoClassificationAnnotation

videoObjectTrackingAnnotation

Object

Annotation value for video object detection and tracking case.

This object should have the same structure as VideoObjectTrackingAnnotation

videoEventAnnotation

Object

Annotation value for video event case.

This object should have the same structure as VideoEventAnnotation

audioRecognitionAnnotation

Object

Annotation value for speech audio recognition case.

This object should have the same structure as AudioRecognitionAnnotation

See also

google.cloud.datalabeling.v1beta1.AnnotationValue definition in proto format

AudioPayload

static

Container of information of an audio.

Properties

Parameter

audioUri

string

Audio uri in user bucket.

sampleRateHertz

number

Sample rate in Hertz of the audio data sent in all RecognitionAudio messages. This field is optional for FLAC and WAV audio files and required for all other audio formats. For details, see AudioEncoding.

See also

google.cloud.datalabeling.v1beta1.AudioPayload definition in proto format

AudioRecognitionAnnotation

static

Speech audio recognition.

Properties

Parameter

transcript

string

Transcript text representing the words spoken.

startOffset

Object

Start position in audio file that the transcription corresponds to.

This object should have the same structure as Duration

endOffset

Object

End position in audio file that the transcription corresponds to.

This object should have the same structure as Duration

See also

google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation definition in proto format

BoundingPoly

static

A bounding polygon in the image.

Property

Parameter

vertices

Array of Object

The bounding polygon vertices.

This object should have the same structure as Vertex

See also

google.cloud.datalabeling.v1beta1.BoundingPoly definition in proto format

BoundingPolyConfig

static

Config for image bounding poly (and bounding box) human labeling task.

Properties

Parameter

annotationSpecSet

string

Required. Annotation spec set resource name.

instructionMessage

string

Optional. Instruction message showed on contributors UI.

See also

google.cloud.datalabeling.v1beta1.BoundingPolyConfig definition in proto format

CreateAnnotationSpecSetRequest

static

Request message for CreateAnnotationSpecSet.

Properties

Parameter

parent

string

Required. AnnotationSpecSet resource parent, format: projects/{project_id}

annotationSpecSet

Object

Required. Annotation spec set to create. Annotation specs must be included. Only one annotation spec will be accepted for annotation specs with same display_name.

This object should have the same structure as AnnotationSpecSet

See also

google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest definition in proto format

CreateDatasetRequest

static

Request message for CreateDataset.

Properties

Parameter

parent

string

Required. Dataset resource parent, format: projects/{project_id}

dataset

Object

Required. The dataset to be created.

This object should have the same structure as Dataset

See also

google.cloud.datalabeling.v1beta1.CreateDatasetRequest definition in proto format

CreateInstructionRequest

static

Request message for CreateInstruction.

Properties

Parameter

parent

string

Required. Instruction resource parent, format: projects/{project_id}

instruction

Object

Required. Instruction of how to perform the labeling task.

This object should have the same structure as Instruction

See also

google.cloud.datalabeling.v1beta1.CreateInstructionRequest definition in proto format

CsvInstruction

static

Instruction from a CSV file.

Property

Parameter

gcsFileUri

string

CSV file for the instruction. Only gcs path is allowed.

See also

google.cloud.datalabeling.v1beta1.CsvInstruction definition in proto format

DataItem

static

DataItem is a piece of data, without annotation. For example, an image.

Properties

Parameter

imagePayload

Object

The image payload, a container of the image bytes/uri.

This object should have the same structure as ImagePayload

textPayload

Object

The text payload, a container of text content.

This object should have the same structure as TextPayload

videoPayload

Object

The video payload, a container of the video uri.

This object should have the same structure as VideoPayload

audioPayload

Object

The audio payload, a container of the audio uri.

This object should have the same structure as AudioPayload

name

string

Output only. Name of the data item, in format of: projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}

See also

google.cloud.datalabeling.v1beta1.DataItem definition in proto format

Dataset

static

Dataset is the resource to hold your data. You can request multiple labeling tasks for a dataset while each one will generate an AnnotatedDataset.

Properties

Parameter

name

string

Output only. Dataset resource name, format is: projects/{project_id}/datasets/{dataset_id}

displayName

string

Required. The display name of the dataset. Maximum of 64 characters.

description

string

Optional. User-provided description of the annotation specification set. The description can be up to 10000 characters long.

createTime

Object

Output only. Time the dataset is created.

This object should have the same structure as Timestamp

inputConfigs

Array of Object

Output only. This is populated with the original input configs where ImportData is called. It is available only after the clients import data to this dataset.

This object should have the same structure as InputConfig

See also

google.cloud.datalabeling.v1beta1.Dataset definition in proto format

DeleteAnnotatedDatasetRequest

static

Request message for DeleteAnnotatedDataset.

Property

Parameter

name

string

Required. Name of the annotated dataset to delete, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}

See also

google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest definition in proto format

DeleteAnnotationSpecSetRequest

static

Request message for DeleteAnnotationSpecSet.

Property

Parameter

name

string

Required. AnnotationSpec resource name, format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}.

See also

google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest definition in proto format

DeleteDatasetRequest

static

Request message for DeleteDataset.

Property

Parameter

name

string

Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}

See also

google.cloud.datalabeling.v1beta1.DeleteDatasetRequest definition in proto format

DeleteInstructionRequest

static

Request message for DeleteInstruction.

Property

Parameter

name

string

Required. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}

See also

google.cloud.datalabeling.v1beta1.DeleteInstructionRequest definition in proto format

EventConfig

static

Config for video event human labeling task.

Property

Parameter

annotationSpecSets

Array of string

Required. The list of annotation spec set resource name. Similar to video classification, we support selecting event from multiple AnnotationSpecSet at the same time.

See also

google.cloud.datalabeling.v1beta1.EventConfig definition in proto format

Example

static

An Example is a piece of data and its annotation. For example, an image with label "house".

Properties

Parameter

imagePayload

Object

The image payload, a container of the image bytes/uri.

This object should have the same structure as ImagePayload

textPayload

Object

The text payload, a container of the text content.

This object should have the same structure as TextPayload

videoPayload

Object

The video payload, a container of the video uri.

This object should have the same structure as VideoPayload

audioPayload

Object

The audio payload, a container of the audio uri.

This object should have the same structure as AudioPayload

name

string

Output only. Name of the example, in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}

annotations

Array of Object

Output only. Annotations for the piece of data in Example. One piece of data can have multiple annotations.

This object should have the same structure as Annotation

See also

google.cloud.datalabeling.v1beta1.Example definition in proto format

ExportDataRequest

static

Request message for ExportData API.

Properties

Parameter

name

string

Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}

annotatedDataset

string

Required. Annotated dataset resource name. DataItem in Dataset and their annotations in specified annotated dataset will be exported. It's in format of projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}

filter

string

Optional. Filter is not supported at this moment.

outputConfig

Object

Required. Specify the output destination.

This object should have the same structure as OutputConfig

See also

google.cloud.datalabeling.v1beta1.ExportDataRequest definition in proto format

GcsDestination

static

Export destination of the data.Only gcs path is allowed in output_uri.

Properties

Parameter

outputUri

string

Required. The output uri of destination file.

mimeType

string

Required. The format of the gcs destination. Only "text/csv" and "application/json" are supported.

See also

google.cloud.datalabeling.v1beta1.GcsDestination definition in proto format

GcsFolderDestination

static

Export folder destination of the data.

Property

Parameter

outputFolderUri

string

Required. GCS folder to export data to.

See also

google.cloud.datalabeling.v1beta1.GcsFolderDestination definition in proto format

GcsSource

static

Source of the GCS file to be imported. Only gcs path is allowed in input_uri.

Properties

Parameter

inputUri

string

Required. The input uri of source file.

mimeType

string

Required. The format of the gcs source. Only "text/csv" is supported.

See also

google.cloud.datalabeling.v1beta1.GcsSource definition in proto format

GetAnnotatedDatasetRequest

static

Request message for GetAnnotatedDataset.

Property

Parameter

name

string

Required. Name of the annotated dataset to get, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}

See also

google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest definition in proto format

GetAnnotationSpecSetRequest

static

Request message for GetAnnotationSpecSet.

Property

Parameter

name

string

Required. AnnotationSpecSet resource name, format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}

See also

google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest definition in proto format

GetDataItemRequest

static

Request message for GetDataItem.

Property

Parameter

name

string

Required. The name of the data item to get, format: projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}

See also

google.cloud.datalabeling.v1beta1.GetDataItemRequest definition in proto format

GetDatasetRequest

static

Request message for GetDataSet.

Property

Parameter

name

string

Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}

See also

google.cloud.datalabeling.v1beta1.GetDatasetRequest definition in proto format

GetExampleRequest

static

Request message for GetExample

Properties

Parameter

name

string

Required. Name of example, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}

filter

string

Optional. An expression for filtering Examples. Filter by annotation_spec.display_name is supported. Format "annotation_spec.display_name = {display_name}"

See also

google.cloud.datalabeling.v1beta1.GetExampleRequest definition in proto format

GetInstructionRequest

static

Request message for GetInstruction.

Property

Parameter

name

string

Required. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}

See also

google.cloud.datalabeling.v1beta1.GetInstructionRequest definition in proto format

HumanAnnotationConfig

static

Configuration for how human labeling task should be done.

Properties

Parameter

instruction

string

Required except for LabelAudio case. Instruction resource name.

annotatedDatasetDisplayName

string

Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .

annotatedDatasetDescription

string

Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.

labelGroup

string

Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression [a-zA-Z\d_-]{0,128}.

languageCode

string

Optional. The Language of this question, as a BCP-47. Default value is en-US. Only need to set this when task is language related. For example, French text classification or Chinese audio transcription.

replicaCount

number

Optional. Replication of questions. Each question will be sent to up to this number of contributors to label. Aggregated answers will be returned. Default is set to 1. For image related labeling, valid values are 1, 3, 5.

questionDuration

Object

Optional. Maximum duration for contributors to answer a question. Default is 1800 seconds.

This object should have the same structure as Duration

contributorEmails

Array of string

Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/

See also

google.cloud.datalabeling.v1beta1.HumanAnnotationConfig definition in proto format

ImageBoundingPolyAnnotation

static

Image bounding poly annotation. It represents a polygon including bounding box in the image.

Properties

Parameter

boundingPoly

Object

This object should have the same structure as BoundingPoly

normalizedBoundingPoly

Object

This object should have the same structure as NormalizedBoundingPoly

annotationSpec

Object

Label of object in this bounding polygon.

This object should have the same structure as AnnotationSpec

See also

google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation definition in proto format

ImageClassificationAnnotation

static

Image classification annotation definition.

Property

Parameter

annotationSpec

Object

Label of image.

This object should have the same structure as AnnotationSpec

See also

google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation definition in proto format

ImageClassificationConfig

static

Config for image classification human labeling task.

Properties

Parameter

annotationSpecSet

string

Required. Annotation spec set resource name.

allowMultiLabel

boolean

Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one image.

answerAggregationType

number

Optional. The type of how to aggregate answers.

The number should be among the values of StringAggregationType

See also

google.cloud.datalabeling.v1beta1.ImageClassificationConfig definition in proto format

ImagePayload

static

Container of information about an image.

Properties

Parameter

mimeType

string

Image format.

imageThumbnail

string

A byte string of a full image.

imageUri

string

Image uri from the user bucket.

See also

google.cloud.datalabeling.v1beta1.ImagePayload definition in proto format

ImagePolylineAnnotation

static

A polyline for the image annotation.

Properties

Parameter

polyline

Object

This object should have the same structure as Polyline

normalizedPolyline

Object

This object should have the same structure as NormalizedPolyline

annotationSpec

Object

Label of this polyline.

This object should have the same structure as AnnotationSpec

See also

google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation definition in proto format

ImageSegmentationAnnotation

static

Image segmentation annotation.

Properties

Parameter

annotationColors

Object with Object properties

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.

mimeType

string

Image format.

imageBytes

string

A byte string of a full image's color map.

See also

google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation definition in proto format

ImportDataRequest

static

Request message for ImportData API.

Properties

Parameter

name

string

Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}

inputConfig

Object

Required. Specify the input source of the data.

This object should have the same structure as InputConfig

See also

google.cloud.datalabeling.v1beta1.ImportDataRequest definition in proto format

InputConfig

static

The configuration of input data, including data type, location, etc.

Properties

Parameter

gcsSource

Object

This object should have the same structure as GcsSource

dataType

number

Required. Data type must be specifed when user tries to import data.

The number should be among the values of DataType

See also

google.cloud.datalabeling.v1beta1.InputConfig definition in proto format

Instruction

static

Instruction of how to perform the labeling task for human operators. Currently two types of instruction are supported - CSV file and PDF. One of the two types instruction must be provided. CSV file is only supported for image classification task. Instructions for other task should be provided as PDF. For image classification, CSV and PDF can be provided at the same time.

Properties

Parameter

name

string

Output only. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}

displayName

string

Required. The display name of the instruction. Maximum of 64 characters.

description

string

Optional. User-provided description of the instruction. The description can be up to 10000 characters long.

createTime

Object

Output only. Creation time of instruction.

This object should have the same structure as Timestamp

updateTime

Object

Output only. Last update time of instruction.

This object should have the same structure as Timestamp

dataType

number

Required. The data type of this instruction.

The number should be among the values of DataType

csvInstruction

Object

One of CSV and PDF instruction is required. Instruction from a csv file, such as for classification task. Csv file should have exact two columns, in the format of: The first column is labeled data, such as image reference, text. The second column is comma separated labels associated with data.

This object should have the same structure as CsvInstruction

pdfInstruction

Object

One of CSV and PDF instruction is required. Instruction from a PDF doc. The PDF doc should be in GCS bucket.

This object should have the same structure as PdfInstruction

See also

google.cloud.datalabeling.v1beta1.Instruction definition in proto format

LabelAudioRequest

static

Request message for LabelAudio.

Properties

Parameter

parent

string

Required. Name of the dataset to request labeling task, format: projects/{project_id}/datasets/{dataset_id}

basicConfig

Object

Required. Basic human annotation config.

This object should have the same structure as HumanAnnotationConfig

feature

number

Required. The type of audio labeling task.

The number should be among the values of Feature

See also

google.cloud.datalabeling.v1beta1.LabelAudioRequest definition in proto format

LabelImageRequest

static

Request message for starting an image labeling task.

Properties

Parameter

imageClassificationConfig

Object

Configuration for image classification task. One of image_classification_config, bounding_poly_config, polyline_config and segmentation_config is required.

This object should have the same structure as ImageClassificationConfig

boundingPolyConfig

Object

Configuration for bounding box and bounding poly task. One of image_classification_config, bounding_poly_config, polyline_config and segmentation_config is required.

This object should have the same structure as BoundingPolyConfig

polylineConfig

Object

Configuration for polyline task. One of image_classification_config, bounding_poly_config, polyline_config and segmentation_config is required.

This object should have the same structure as PolylineConfig

segmentationConfig

Object

Configuration for segmentation task. One of image_classification_config, bounding_poly_config, polyline_config and segmentation_config is required.

This object should have the same structure as SegmentationConfig

parent

string

Required. Name of the dataset to request labeling task, format: projects/{project_id}/datasets/{dataset_id}

basicConfig

Object

Required. Basic human annotation config.

This object should have the same structure as HumanAnnotationConfig

feature

number

Required. The type of image labeling task.

The number should be among the values of Feature

See also

google.cloud.datalabeling.v1beta1.LabelImageRequest definition in proto format

LabelStats

static

Statistics about annotation specs.

Property

Parameter

exampleCount

Object with number properties

Map of each annotation spec's example count. Key is the annotation spec name and value is the number of examples for that annotation spec.

See also

google.cloud.datalabeling.v1beta1.LabelStats definition in proto format

LabelTextRequest

static

Request message for LabelText.

Properties

Parameter

textClassificationConfig

Object

Configuration for text classification task. One of text_classification_config and text_entity_extraction_config is required.

This object should have the same structure as TextClassificationConfig

textEntityExtractionConfig

Object

Configuration for entity extraction task. One of text_classification_config and text_entity_extraction_config is required.

This object should have the same structure as TextEntityExtractionConfig

parent

string

Required. Name of the data set to request labeling task, format: projects/{project_id}/datasets/{dataset_id}

basicConfig

Object

Required. Basic human annotation config.

This object should have the same structure as HumanAnnotationConfig

feature

number

Required. The type of text labeling task.

The number should be among the values of Feature

See also

google.cloud.datalabeling.v1beta1.LabelTextRequest definition in proto format

LabelVideoRequest

static

Request message for LabelVideo.

Properties

Parameter

videoClassificationConfig

Object

Configuration for video classification task. One of video_classification_config, object_detection_config, object_tracking_config and event_config is required.

This object should have the same structure as VideoClassificationConfig

objectDetectionConfig

Object

Configuration for video object detection task. One of video_classification_config, object_detection_config, object_tracking_config and event_config is required.

This object should have the same structure as ObjectDetectionConfig

objectTrackingConfig

Object

Configuration for video object tracking task. One of video_classification_config, object_detection_config, object_tracking_config and event_config is required.

This object should have the same structure as ObjectTrackingConfig

eventConfig

Object

Configuration for video event task. One of video_classification_config, object_detection_config, object_tracking_config and event_config is required.

This object should have the same structure as EventConfig

parent

string

Required. Name of the dataset to request labeling task, format: projects/{project_id}/datasets/{dataset_id}

basicConfig

Object

Required. Basic human annotation config.

This object should have the same structure as HumanAnnotationConfig

feature

number

Required. The type of video labeling task.

The number should be among the values of Feature

See also

google.cloud.datalabeling.v1beta1.LabelVideoRequest definition in proto format

ListAnnotatedDatasetsRequest

static

Request message for ListAnnotatedDatasets.

Properties

Parameter

parent

string

Required. Name of the dataset to list annotated datasets, format: projects/{project_id}/datasets/{dataset_id}

filter

string

Optional. Filter is not supported at this moment.

pageSize

number

Optional. Requested page size. Server may return fewer results than requested. Default value is 100.

pageToken

string

Optional. A token identifying a page of results for the server to return. Typically obtained by ListAnnotatedDatasetsResponse.next_page_token of the previous [DataLabelingService.ListAnnotatedDatasets] call. Return first page if empty.

See also

google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest definition in proto format

ListAnnotatedDatasetsResponse

static

Results of listing annotated datasets for a dataset.

Properties

Parameter

annotatedDatasets

Array of Object

The list of annotated datasets to return.

This object should have the same structure as AnnotatedDataset

nextPageToken

string

A token to retrieve next page of results.

See also

google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse definition in proto format

ListAnnotationSpecSetsRequest

static

Request message for ListAnnotationSpecSets.

Properties

Parameter

parent

string

Required. Parent of AnnotationSpecSet resource, format: projects/{project_id}

filter

string

Optional. Filter is not supported at this moment.

pageSize

number

Optional. Requested page size. Server may return fewer results than requested. Default value is 100.

pageToken

string

Optional. A token identifying a page of results for the server to return. Typically obtained by ListAnnotationSpecSetsResponse.next_page_token of the previous [DataLabelingService.ListAnnotationSpecSets] call. Return first page if empty.

See also

google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest definition in proto format

ListAnnotationSpecSetsResponse

static

Results of listing annotation spec set under a project.

Properties

Parameter

annotationSpecSets

Array of Object

The list of annotation spec sets.

This object should have the same structure as AnnotationSpecSet

nextPageToken

string

A token to retrieve next page of results.

See also

google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse definition in proto format

ListDataItemsRequest

static

Request message for ListDataItems.

Properties

Parameter

parent

string

Required. Name of the dataset to list data items, format: projects/{project_id}/datasets/{dataset_id}

filter

string

Optional. Filter is not supported at this moment.

pageSize

number

Optional. Requested page size. Server may return fewer results than requested. Default value is 100.

pageToken

string

Optional. A token identifying a page of results for the server to return. Typically obtained by ListDataItemsResponse.next_page_token of the previous [DataLabelingService.ListDataItems] call. Return first page if empty.

See also

google.cloud.datalabeling.v1beta1.ListDataItemsRequest definition in proto format

ListDataItemsResponse

static

Results of listing data items in a dataset.

Properties

Parameter

dataItems

Array of Object

The list of data items to return.

This object should have the same structure as DataItem

nextPageToken

string

A token to retrieve next page of results.

See also

google.cloud.datalabeling.v1beta1.ListDataItemsResponse definition in proto format

ListDatasetsRequest

static

Request message for ListDataset.

Properties

Parameter

parent

string

Required. Dataset resource parent, format: projects/{project_id}

filter

string

Optional. Filter on dataset is not supported at this moment.

pageSize

number

Optional. Requested page size. Server may return fewer results than requested. Default value is 100.

pageToken

string

Optional. A token identifying a page of results for the server to return. Typically obtained by ListDatasetsResponse.next_page_token of the previous [DataLabelingService.ListDatasets] call. Returns the first page if empty.

See also

google.cloud.datalabeling.v1beta1.ListDatasetsRequest definition in proto format

ListDatasetsResponse

static

Results of listing datasets within a project.

Properties

Parameter

datasets

Array of Object

The list of datasets to return.

This object should have the same structure as Dataset

nextPageToken

string

A token to retrieve next page of results.

See also

google.cloud.datalabeling.v1beta1.ListDatasetsResponse definition in proto format

ListExamplesRequest

static

Request message for ListExamples.

Properties

Parameter

parent

string

Required. Example resource parent.

filter

string

Optional. An expression for filtering Examples. For annotated datasets that have annotation spec set, filter by annotation_spec.display_name is supported. Format "annotation_spec.display_name = {display_name}"

pageSize

number

Optional. Requested page size. Server may return fewer results than requested. Default value is 100.

pageToken

string

Optional. A token identifying a page of results for the server to return. Typically obtained by ListExamplesResponse.next_page_token of the previous [DataLabelingService.ListExamples] call. Return first page if empty.

See also

google.cloud.datalabeling.v1beta1.ListExamplesRequest definition in proto format

ListExamplesResponse

static

Results of listing Examples in and annotated dataset.

Properties

Parameter

examples

Array of Object

The list of examples to return.

This object should have the same structure as Example

nextPageToken

string

A token to retrieve next page of results.

See also

google.cloud.datalabeling.v1beta1.ListExamplesResponse definition in proto format

ListInstructionsRequest

static

Request message for ListInstructions.

Properties

Parameter

parent

string

Required. Instruction resource parent, format: projects/{project_id}

filter

string

Optional. Filter is not supported at this moment.

pageSize

number

Optional. Requested page size. Server may return fewer results than requested. Default value is 100.

pageToken

string

Optional. A token identifying a page of results for the server to return. Typically obtained by ListInstructionsResponse.next_page_token of the previous [DataLabelingService.ListInstructions] call. Return first page if empty.

See also

google.cloud.datalabeling.v1beta1.ListInstructionsRequest definition in proto format

ListInstructionsResponse

static

Results of listing instructions under a project.

Properties

Parameter

instructions

Array of Object

The list of Instructions to return.

This object should have the same structure as Instruction

nextPageToken

string

A token to retrieve next page of results.

See also

google.cloud.datalabeling.v1beta1.ListInstructionsResponse definition in proto format

NormalizedBoundingPoly

static

Normalized bounding polygon.

Property

Parameter

normalizedVertices

Array of Object

The bounding polygon normalized vertices.

This object should have the same structure as NormalizedVertex

See also

google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly definition in proto format

NormalizedPolyline

static

Normalized polyline.

Property

Parameter

normalizedVertices

Array of Object

The normalized polyline vertices.

This object should have the same structure as NormalizedVertex

See also

google.cloud.datalabeling.v1beta1.NormalizedPolyline definition in proto format

NormalizedVertex

static

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.

Properties

Parameter

x

number

X coordinate.

y

number

Y coordinate.

See also

google.cloud.datalabeling.v1beta1.NormalizedVertex definition in proto format

ObjectDetectionConfig

static

Config for video object detection human labeling task. Object detection will be conducted on the images extracted from the video, and those objects will be labeled with bounding boxes. User need to specify the number of images to be extracted per second as the extraction frame rate.

Properties

Parameter

annotationSpecSet

string

Required. Annotation spec set resource name.

instructionMessage

string

Optional. Instruction message showed on labelers UI.

extractionFrameRate

number

Required. Number of frames per second to be extracted from the video.

See also

google.cloud.datalabeling.v1beta1.ObjectDetectionConfig definition in proto format

ObjectTrackingConfig

static

Config for video object tracking human labeling task.

Property

Parameter

annotationSpecSet

string

Required. Annotation spec set resource name.

See also

google.cloud.datalabeling.v1beta1.ObjectTrackingConfig definition in proto format

ObjectTrackingFrame

static

Video frame level annotation for object detection and tracking.

Properties

Parameter

boundingPoly

Object

This object should have the same structure as BoundingPoly

normalizedBoundingPoly

Object

This object should have the same structure as NormalizedBoundingPoly

timeOffset

Object

The time offset of this frame relative to the beginning of the video.

This object should have the same structure as Duration

See also

google.cloud.datalabeling.v1beta1.ObjectTrackingFrame definition in proto format

OperatorMetadata

static

General information useful for labels coming from contributors.

Properties

Parameter

score

number

Confidence 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).

totalVotes

number

The total number of contributors that answer this question.

labelVotes

number

The total number of contributors that choose this label.

comments

Array of string

See also

google.cloud.datalabeling.v1beta1.OperatorMetadata definition in proto format

OutputConfig

static

The configuration of output data.

Properties

Parameter

gcsDestination

Object

Output to a GCS file. Should be used for labeling output other than Audio transcription.

This object should have the same structure as GcsDestination

gcsFolderDestination

Object

Output to a GCS folder. Should be used for Audio transcription labeling output.

This object should have the same structure as GcsFolderDestination

See also

google.cloud.datalabeling.v1beta1.OutputConfig definition in proto format

PdfInstruction

static

Instruction from a PDF file.

Property

Parameter

gcsFileUri

string

PDF file for the instruction. Only gcs path is allowed.

See also

google.cloud.datalabeling.v1beta1.PdfInstruction definition in proto format

Polyline

static

A line with multiple line segments.

Property

Parameter

vertices

Array of Object

The polyline vertices.

This object should have the same structure as Vertex

See also

google.cloud.datalabeling.v1beta1.Polyline definition in proto format

PolylineConfig

static

Config for image polyline human labeling task.

Properties

Parameter

annotationSpecSet

string

Required. Annotation spec set resource name.

instructionMessage

string

Optional. Instruction message showed on contributors UI.

See also

google.cloud.datalabeling.v1beta1.PolylineConfig definition in proto format

SegmentationConfig

static

Config for image segmentation

Properties

Parameter

annotationSpecSet

string

Required. Annotation spec set resource name. format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}

instructionMessage

string

Instruction message showed on labelers UI.

See also

google.cloud.datalabeling.v1beta1.SegmentationConfig definition in proto format

SentimentConfig

static

Config for setting up sentiments.

Property

Parameter

enableLabelSentimentSelection

boolean

If set to true, contributors will have the option to select sentiment of the label they selected, to mark it as negative or positive label. Default is false.

See also

google.cloud.datalabeling.v1beta1.SentimentConfig definition in proto format

TextClassificationAnnotation

static

Text classification annotation.

Property

Parameter

annotationSpec

Object

Label of the text.

This object should have the same structure as AnnotationSpec

See also

google.cloud.datalabeling.v1beta1.TextClassificationAnnotation definition in proto format

TextClassificationConfig

static

Config for text classification human labeling task.

Properties

Parameter

allowMultiLabel

boolean

Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one text segment.

annotationSpecSet

string

Required. Annotation spec set resource name.

sentimentConfig

Object

Optional. Configs for sentiment selection.

This object should have the same structure as SentimentConfig

See also

google.cloud.datalabeling.v1beta1.TextClassificationConfig definition in proto format

TextEntityExtractionConfig

static

Config for text entity extraction human labeling task.

Property

Parameter

annotationSpecSet

string

Required. Annotation spec set resource name.

See also

google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig definition in proto format

TextPayload

static

Container of information about a piece of text.

Property

Parameter

textContent

string

Text content.

See also

google.cloud.datalabeling.v1beta1.TextPayload definition in proto format

TimeSegment

static

A time period inside of an example that has a time dimension (e.g. video).

Properties

Parameter

startTimeOffset

Object

Start of the time segment (inclusive), represented as the duration since the example start.

This object should have the same structure as Duration

endTimeOffset

Object

End of the time segment (exclusive), represented as the duration since the example start.

This object should have the same structure as Duration

See also

google.cloud.datalabeling.v1beta1.TimeSegment definition in proto format

Vertex

static

A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.

Properties

Parameter

x

number

X coordinate.

y

number

Y coordinate.

See also

google.cloud.datalabeling.v1beta1.Vertex definition in proto format

VideoClassificationAnnotation

static

Video classification annotation.

Properties

Parameter

timeSegment

Object

The time segment of the video to which the annotation applies.

This object should have the same structure as TimeSegment

annotationSpec

Object

Label of the segment specified by time_segment.

This object should have the same structure as AnnotationSpec

See also

google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation definition in proto format

VideoClassificationConfig

static

Config for video classification human labeling task. Currently two types of video classification are supported:

  1. Assign labels on the entire video.
  2. Split the video into multiple video clips based on camera shot, and assign labels on each video clip.

Properties

Parameter

annotationSpecSetConfigs

Array of Object

Required. The list of annotation spec set configs. Since watching a video clip takes much longer time than an image, we support label with multiple AnnotationSpecSet at the same time. Labels in each AnnotationSpecSet will be shown in a group to contributors. Contributors can select one or more (depending on whether to allow multi label) from each group.

This object should have the same structure as AnnotationSpecSetConfig

applyShotDetection

boolean

Optional. Option to apply shot detection on the video.

See also

google.cloud.datalabeling.v1beta1.VideoClassificationConfig definition in proto format

VideoEventAnnotation

static

Video event annotation.

Properties

Parameter

annotationSpec

Object

Label of the event in this annotation.

This object should have the same structure as AnnotationSpec

timeSegment

Object

The time segment of the video to which the annotation applies.

This object should have the same structure as TimeSegment

See also

google.cloud.datalabeling.v1beta1.VideoEventAnnotation definition in proto format

VideoObjectTrackingAnnotation

static

Video object tracking annotation.

Properties

Parameter

annotationSpec

Object

Label of the object tracked in this annotation.

This object should have the same structure as AnnotationSpec

timeSegment

Object

The time segment of the video to which object tracking applies.

This object should have the same structure as TimeSegment

objectTrackingFrames

Array of Object

The list of frames where this object track appears.

This object should have the same structure as ObjectTrackingFrame

See also

google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation definition in proto format

VideoPayload

static

Container of information of a video.

Properties

Parameter

mimeType

string

Video format.

videoUri

string

Video uri from the user bucket.

videoThumbnails

Array of Object

The list of video thumbnails.

This object should have the same structure as VideoThumbnail

frameRate

number

FPS of the video.

See also

google.cloud.datalabeling.v1beta1.VideoPayload definition in proto format

VideoThumbnail

static

Container of information of a video thumbnail.

Properties

Parameter

thumbnail

string

A byte string of the video frame.

timeOffset

Object

Time offset relative to the beginning of the video, corresponding to the video frame where the thumbnail has been extracted from.

This object should have the same structure as Duration

See also

google.cloud.datalabeling.v1beta1.VideoThumbnail definition in proto format