As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Datalabeling v1beta1 API

class google.cloud.datalabeling_v1beta1.types.AnnotatedDataset(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

name

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

Type

str

display_name

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

Type

str

description

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

Type

str

annotation_source

Output only. Source of the annotation.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSource

annotation_type

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

Type

google.cloud.datalabeling_v1beta1.types.AnnotationType

example_count

Output only. Number of examples in the annotated dataset.

Type

int

completed_example_count

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

Type

int

label_stats

Output only. Per label statistics.

Type

google.cloud.datalabeling_v1beta1.types.LabelStats

create_time

Output only. Time the AnnotatedDataset was created.

Type

google.protobuf.timestamp_pb2.Timestamp

metadata

Output only. Additional information about AnnotatedDataset.

Type

google.cloud.datalabeling_v1beta1.types.AnnotatedDatasetMetadata

blocking_resources

Output only. The names of any related resources that are blocking changes to the annotated dataset.

Type

MutableSequence[str]

class google.cloud.datalabeling_v1beta1.types.AnnotatedDatasetMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata on AnnotatedDataset.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

image_classification_config

Configuration for image classification task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.ImageClassificationConfig

bounding_poly_config

Configuration for image bounding box and bounding poly task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.BoundingPolyConfig

polyline_config

Configuration for image polyline task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.PolylineConfig

segmentation_config

Configuration for image segmentation task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.SegmentationConfig

video_classification_config

Configuration for video classification task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.VideoClassificationConfig

object_detection_config

Configuration for video object detection task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.ObjectDetectionConfig

object_tracking_config

Configuration for video object tracking task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.ObjectTrackingConfig

event_config

Configuration for video event labeling task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.EventConfig

text_classification_config

Configuration for text classification task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.TextClassificationConfig

text_entity_extraction_config

Configuration for text entity extraction task.

This field is a member of oneof annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.TextEntityExtractionConfig

human_annotation_config

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

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.Annotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

name

Output only. Unique name of this annotation, format is:

projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}

Type

str

annotation_source

Output only. The source of the annotation.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSource

annotation_value

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

Type

google.cloud.datalabeling_v1beta1.types.AnnotationValue

annotation_metadata

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

Type

google.cloud.datalabeling_v1beta1.types.AnnotationMetadata

annotation_sentiment

Output only. Sentiment for this annotation.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSentiment

class google.cloud.datalabeling_v1beta1.types.AnnotationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Additional information associated with the annotation.

operator_metadata

Metadata related to human labeling.

Type

google.cloud.datalabeling_v1beta1.types.OperatorMetadata

class google.cloud.datalabeling_v1beta1.types.AnnotationSentiment(value)[source]

Bases: proto.enums.Enum

Values:
ANNOTATION_SENTIMENT_UNSPECIFIED (0):

No description available.

NEGATIVE (1):

This annotation describes negatively about the data.

POSITIVE (2):

This label describes positively about the data.

class google.cloud.datalabeling_v1beta1.types.AnnotationSource(value)[source]

Bases: proto.enums.Enum

Specifies where the annotation comes from (whether it was provided by a human labeler or a different source).

Values:
ANNOTATION_SOURCE_UNSPECIFIED (0):

No description available.

OPERATOR (3):

Answer is provided by a human contributor.

class google.cloud.datalabeling_v1beta1.types.AnnotationSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Container of information related to one possible annotation that can be used in a labeling task. For example, an image classification task where images are labeled as dog or cat must reference an AnnotationSpec for dog and an AnnotationSpec for cat.

display_name

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

Type

str

description

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

Type

str

class google.cloud.datalabeling_v1beta1.types.AnnotationSpecSet(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An AnnotationSpecSet is a collection of label definitions. For example, in image classification tasks, you define a set of possible labels for images as an AnnotationSpecSet. An AnnotationSpecSet is immutable upon creation.

name

Output only. The AnnotationSpecSet resource name in the following format:

“projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}”.

Type

str

display_name

Required. The display name for AnnotationSpecSet that you define when you create it. Maximum of 64 characters.

Type

str

description

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

Type

str

annotation_specs

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.AnnotationSpec]

blocking_resources

Output only. The names of any related resources that are blocking changes to the annotation spec set.

Type

MutableSequence[str]

class google.cloud.datalabeling_v1beta1.types.AnnotationType(value)[source]

Bases: proto.enums.Enum

Values:
ANNOTATION_TYPE_UNSPECIFIED (0):

No description available.

IMAGE_CLASSIFICATION_ANNOTATION (1):

Classification annotations in an image. Allowed for continuous evaluation.

IMAGE_BOUNDING_BOX_ANNOTATION (2):

Bounding box annotations in an image. A form of image object detection. Allowed for continuous evaluation.

IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION (13):

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

IMAGE_BOUNDING_POLY_ANNOTATION (10):

Bounding poly annotations in an image.

IMAGE_POLYLINE_ANNOTATION (11):

Polyline annotations in an image.

IMAGE_SEGMENTATION_ANNOTATION (12):

Segmentation annotations in an image.

VIDEO_SHOTS_CLASSIFICATION_ANNOTATION (3):

Classification annotations in video shots.

VIDEO_OBJECT_TRACKING_ANNOTATION (4):

Video object tracking annotation.

VIDEO_OBJECT_DETECTION_ANNOTATION (5):

Video object detection annotation.

VIDEO_EVENT_ANNOTATION (6):

Video event annotation.

TEXT_CLASSIFICATION_ANNOTATION (8):

Classification for text. Allowed for continuous evaluation.

TEXT_ENTITY_EXTRACTION_ANNOTATION (9):

Entity extraction for text.

GENERAL_CLASSIFICATION_ANNOTATION (14):

General classification. Allowed for continuous evaluation.

class google.cloud.datalabeling_v1beta1.types.AnnotationValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Annotation value for an example.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

image_classification_annotation

Annotation value for image classification case.

This field is a member of oneof value_type.

Type

google.cloud.datalabeling_v1beta1.types.ImageClassificationAnnotation

image_bounding_poly_annotation

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

This field is a member of oneof value_type.

Type

google.cloud.datalabeling_v1beta1.types.ImageBoundingPolyAnnotation

image_polyline_annotation

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 field is a member of oneof value_type.

Type

google.cloud.datalabeling_v1beta1.types.ImagePolylineAnnotation

image_segmentation_annotation

Annotation value for image segmentation.

This field is a member of oneof value_type.

Type

google.cloud.datalabeling_v1beta1.types.ImageSegmentationAnnotation

text_classification_annotation

Annotation value for text classification case.

This field is a member of oneof value_type.

Type

google.cloud.datalabeling_v1beta1.types.TextClassificationAnnotation

text_entity_extraction_annotation

Annotation value for text entity extraction case.

This field is a member of oneof value_type.

Type

google.cloud.datalabeling_v1beta1.types.TextEntityExtractionAnnotation

video_classification_annotation

Annotation value for video classification case.

This field is a member of oneof value_type.

Type

google.cloud.datalabeling_v1beta1.types.VideoClassificationAnnotation

video_object_tracking_annotation

Annotation value for video object detection and tracking case.

This field is a member of oneof value_type.

Type

google.cloud.datalabeling_v1beta1.types.VideoObjectTrackingAnnotation

video_event_annotation

Annotation value for video event case.

This field is a member of oneof value_type.

Type

google.cloud.datalabeling_v1beta1.types.VideoEventAnnotation

class google.cloud.datalabeling_v1beta1.types.Attempt(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Records a failed evaluation job run.

attempt_time
Type

google.protobuf.timestamp_pb2.Timestamp

partial_failures

Details of errors that occurred.

Type

MutableSequence[google.rpc.status_pb2.Status]

class google.cloud.datalabeling_v1beta1.types.BigQuerySource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The BigQuery location for input data. If used in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob], this is where the service saves the prediction input and output sampled from the model version.

input_uri

Required. BigQuery URI to a table, up to 2,000 characters long. If you specify the URI of a table that does not exist, Data Labeling Service creates a table at the URI with the correct schema when you create your [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob]. If you specify the URI of a table that already exists, it must have the correct schema.

Provide the table URI in the following format:

“bq://{your_project_id}/{your_dataset_name}/{your_table_name}”

Learn more.

Type

str

class google.cloud.datalabeling_v1beta1.types.BoundingBoxEvaluationOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Options regarding evaluation between bounding boxes.

iou_threshold

Minimum [intersection-over-union

(IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union) required for 2 bounding boxes to be considered a match. This must be a number between 0 and 1.

Type

float

class google.cloud.datalabeling_v1beta1.types.BoundingPoly(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A bounding polygon in the image.

vertices

The bounding polygon vertices.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.Vertex]

class google.cloud.datalabeling_v1beta1.types.BoundingPolyConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

annotation_spec_set

Required. Annotation spec set resource name.

Type

str

instruction_message

Optional. Instruction message showed on contributors UI.

Type

str

class google.cloud.datalabeling_v1beta1.types.ClassificationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata for classification annotations.

is_multi_label

Whether the classification task is multi-label or not.

Type

bool

class google.cloud.datalabeling_v1beta1.types.ClassificationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metrics calculated for a classification model.

pr_curve

Precision-recall curve based on ground truth labels, predicted labels, and scores for the predicted labels.

Type

google.cloud.datalabeling_v1beta1.types.PrCurve

confusion_matrix

Confusion matrix of predicted labels vs. ground truth labels.

Type

google.cloud.datalabeling_v1beta1.types.ConfusionMatrix

class google.cloud.datalabeling_v1beta1.types.ConfusionMatrix(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Confusion matrix of the model running the classification. Only applicable when the metrics entry aggregates multiple labels. Not applicable when the entry is for a single label.

row
Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.ConfusionMatrix.Row]

class ConfusionMatrixEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

annotation_spec

The annotation spec of a predicted label.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

item_count

Number of items predicted to have this label. (The ground truth label for these items is the Row.annotationSpec of this entry’s parent.)

Type

int

class Row(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A row in the confusion matrix. Each entry in this row has the same ground truth label.

annotation_spec

The annotation spec of the ground truth label for this row.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

entries

A list of the confusion matrix entries. One entry for each possible predicted label.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.ConfusionMatrix.ConfusionMatrixEntry]

class google.cloud.datalabeling_v1beta1.types.CreateAnnotationSpecSetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateAnnotationSpecSet.

parent

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

Type

str

annotation_spec_set

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.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpecSet

class google.cloud.datalabeling_v1beta1.types.CreateDatasetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateDataset.

parent

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

Type

str

dataset

Required. The dataset to be created.

Type

google.cloud.datalabeling_v1beta1.types.Dataset

class google.cloud.datalabeling_v1beta1.types.CreateEvaluationJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateEvaluationJob.

parent

Required. Evaluation job resource parent. Format: “projects/{project_id}”.

Type

str

job

Required. The evaluation job to create.

Type

google.cloud.datalabeling_v1beta1.types.EvaluationJob

class google.cloud.datalabeling_v1beta1.types.CreateInstructionMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata of a CreateInstruction operation.

instruction

The name of the created Instruction. projects/{project_id}/instructions/{instruction_id}

Type

str

partial_failures

Partial failures encountered. E.g. single files that couldn’t be read. Status details field will contain standard GCP error details.

Type

MutableSequence[google.rpc.status_pb2.Status]

create_time

Timestamp when create instruction request was created.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.datalabeling_v1beta1.types.CreateInstructionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateInstruction.

parent

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

Type

str

instruction

Required. Instruction of how to perform the labeling task.

Type

google.cloud.datalabeling_v1beta1.types.Instruction

class google.cloud.datalabeling_v1beta1.types.CsvInstruction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Deprecated: this instruction format is not supported any more. Instruction from a CSV file.

gcs_file_uri

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

Type

str

class google.cloud.datalabeling_v1beta1.types.DataItem(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

image_payload

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

This field is a member of oneof payload.

Type

google.cloud.datalabeling_v1beta1.types.ImagePayload

text_payload

The text payload, a container of text content.

This field is a member of oneof payload.

Type

google.cloud.datalabeling_v1beta1.types.TextPayload

video_payload

The video payload, a container of the video uri.

This field is a member of oneof payload.

Type

google.cloud.datalabeling_v1beta1.types.VideoPayload

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.DataType(value)[source]

Bases: proto.enums.Enum

Values:
DATA_TYPE_UNSPECIFIED (0):

No description available.

IMAGE (1):

Allowed for continuous evaluation.

VIDEO (2):

No description available.

TEXT (4):

Allowed for continuous evaluation.

GENERAL_DATA (6):

Allowed for continuous evaluation.

class google.cloud.datalabeling_v1beta1.types.Dataset(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

name

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

Type

str

display_name

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

Type

str

description

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

Type

str

create_time

Output only. Time the dataset is created.

Type

google.protobuf.timestamp_pb2.Timestamp

input_configs

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.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.InputConfig]

blocking_resources

Output only. The names of any related resources that are blocking changes to the dataset.

Type

MutableSequence[str]

data_item_count

Output only. The number of data items in the dataset.

Type

int

class google.cloud.datalabeling_v1beta1.types.DeleteAnnotatedDatasetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteAnnotatedDataset.

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.DeleteAnnotationSpecSetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteAnnotationSpecSet.

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.DeleteDatasetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteDataset.

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.DeleteEvaluationJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message DeleteEvaluationJob.

name

Required. Name of the evaluation job that is going to be deleted. Format:

“projects/{project_id}/evaluationJobs/{evaluation_job_id}”.

Type

str

class google.cloud.datalabeling_v1beta1.types.DeleteInstructionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteInstruction.

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.Evaluation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describes an evaluation between a machine learning model’s predictions and ground truth labels. Created when an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] runs successfully.

name

Output only. Resource name of an evaluation. The name has the following format:

“projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}’

Type

str

config

Output only. Options used in the evaluation job that created this evaluation.

Type

google.cloud.datalabeling_v1beta1.types.EvaluationConfig

evaluation_job_run_time

Output only. Timestamp for when the evaluation job that created this evaluation ran.

Type

google.protobuf.timestamp_pb2.Timestamp

create_time

Output only. Timestamp for when this evaluation was created.

Type

google.protobuf.timestamp_pb2.Timestamp

evaluation_metrics

Output only. Metrics comparing predictions to ground truth labels.

Type

google.cloud.datalabeling_v1beta1.types.EvaluationMetrics

annotation_type

Output only. Type of task that the model version being evaluated performs, as defined in the

[evaluationJobConfig.inputConfig.annotationType][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config] field of the evaluation job that created this evaluation.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationType

evaluated_item_count

Output only. The number of items in the ground truth dataset that were used for this evaluation. Only populated when the evaulation is for certain AnnotationTypes.

Type

int

class google.cloud.datalabeling_v1beta1.types.EvaluationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configuration details used for calculating evaluation metrics and creating an [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation].

bounding_box_evaluation_options

Only specify this field if the related model performs image object detection (IMAGE_BOUNDING_BOX_ANNOTATION). Describes how to evaluate bounding boxes.

This field is a member of oneof vertical_option.

Type

google.cloud.datalabeling_v1beta1.types.BoundingBoxEvaluationOptions

class google.cloud.datalabeling_v1beta1.types.EvaluationJob(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Defines an evaluation job that runs periodically to generate [Evaluations][google.cloud.datalabeling.v1beta1.Evaluation]. Creating an evaluation job is the starting point for using continuous evaluation.

name

Output only. After you create a job, Data Labeling Service assigns a name to the job with the following format:

“projects/{project_id}/evaluationJobs/{evaluation_job_id}”.

Type

str

description

Required. Description of the job. The description can be up to 25,000 characters long.

Type

str

state

Output only. Describes the current state of the job.

Type

google.cloud.datalabeling_v1beta1.types.EvaluationJob.State

schedule

Required. Describes the interval at which the job runs. This interval must be at least 1 day, and it is rounded to the nearest day. For example, if you specify a 50-hour interval, the job runs every 2 days.

You can provide the schedule in crontab format or in an English-like format.

Regardless of what you specify, the job will run at 10:00 AM UTC. Only the interval from this schedule is used, not the specific time of day.

Type

str

model_version

Required. The AI Platform Prediction model version to be evaluated. Prediction input and output is sampled from this model version. When creating an evaluation job, specify the model version in the following format:

“projects/{project_id}/models/{model_name}/versions/{version_name}”

There can only be one evaluation job per model version.

Type

str

evaluation_job_config

Required. Configuration details for the evaluation job.

Type

google.cloud.datalabeling_v1beta1.types.EvaluationJobConfig

annotation_spec_set

Required. Name of the [AnnotationSpecSet][google.cloud.datalabeling.v1beta1.AnnotationSpecSet] describing all the labels that your machine learning model outputs. You must create this resource before you create an evaluation job and provide its name in the following format:

“projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}”.

Type

str

label_missing_ground_truth

Required. Whether you want Data Labeling Service to provide ground truth labels for prediction input. If you want the service to assign human labelers to annotate your data, set this to true. If you want to provide your own ground truth labels in the evaluation job’s BigQuery table, set this to false.

Type

bool

attempts

Output only. Every time the evaluation job runs and an error occurs, the failed attempt is appended to this array.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.Attempt]

create_time

Output only. Timestamp of when this evaluation job was created.

Type

google.protobuf.timestamp_pb2.Timestamp

class State(value)[source]

Bases: proto.enums.Enum

State of the job.

Values:
STATE_UNSPECIFIED (0):

No description available.

SCHEDULED (1):

The job is scheduled to run at the [configured interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. You can [pause][google.cloud.datalabeling.v1beta1.DataLabelingService.PauseEvaluationJob] or [delete][google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteEvaluationJob] the job.

When the job is in this state, it samples prediction input and output from your model version into your BigQuery table as predictions occur.

RUNNING (2):

The job is currently running. When the job runs, Data Labeling Service does several things:

  1. If you have configured your job to use Data Labeling Service for ground truth labeling, the service creates a [Dataset][google.cloud.datalabeling.v1beta1.Dataset] and a labeling task for all data sampled since the last time the job ran. Human labelers provide ground truth labels for your data. Human labeling may take hours, or even days, depending on how much data has been sampled. The job remains in the RUNNING state during this time, and it can even be running multiple times in parallel if it gets triggered again (for example 24 hours later) before the earlier run has completed. When human labelers have finished labeling the data, the next step occurs. If you have configured your job to provide your own ground truth labels, Data Labeling Service still creates a [Dataset][google.cloud.datalabeling.v1beta1.Dataset] for newly sampled data, but it expects that you have already added ground truth labels to the BigQuery table by this time. The next step occurs immediately.

  2. Data Labeling Service creates an [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation] by comparing your model version’s predictions with the ground truth labels.

If the job remains in this state for a long time, it continues to sample prediction data into your BigQuery table and will run again at the next interval, even if it causes the job to run multiple times in parallel.

PAUSED (3):

The job is not sampling prediction input and output into your BigQuery table and it will not run according to its schedule. You can [resume][google.cloud.datalabeling.v1beta1.DataLabelingService.ResumeEvaluationJob] the job.

STOPPED (4):

The job has this state right before it is deleted.

class google.cloud.datalabeling_v1beta1.types.EvaluationJobAlertConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Provides details for how an evaluation job sends email alerts based on the results of a run.

email

Required. An email address to send alerts to.

Type

str

min_acceptable_mean_average_precision

Required. A number between 0 and 1 that describes a minimum mean average precision threshold. When the evaluation job runs, if it calculates that your model version’s predictions from the recent interval have [meanAveragePrecision][google.cloud.datalabeling.v1beta1.PrCurve.mean_average_precision] below this threshold, then it sends an alert to your specified email.

Type

float

class google.cloud.datalabeling_v1beta1.types.EvaluationJobConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configures specific details of how a continuous evaluation job works. Provide this configuration when you create an EvaluationJob.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

image_classification_config

Specify this field if your model version performs image classification or general classification.

annotationSpecSet in this configuration must match [EvaluationJob.annotationSpecSet][google.cloud.datalabeling.v1beta1.EvaluationJob.annotation_spec_set]. allowMultiLabel in this configuration must match classificationMetadata.isMultiLabel in [input_config][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config].

This field is a member of oneof human_annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.ImageClassificationConfig

bounding_poly_config

Specify this field if your model version performs image object detection (bounding box detection).

annotationSpecSet in this configuration must match [EvaluationJob.annotationSpecSet][google.cloud.datalabeling.v1beta1.EvaluationJob.annotation_spec_set].

This field is a member of oneof human_annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.BoundingPolyConfig

text_classification_config

Specify this field if your model version performs text classification.

annotationSpecSet in this configuration must match [EvaluationJob.annotationSpecSet][google.cloud.datalabeling.v1beta1.EvaluationJob.annotation_spec_set]. allowMultiLabel in this configuration must match classificationMetadata.isMultiLabel in [input_config][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config].

This field is a member of oneof human_annotation_request_config.

Type

google.cloud.datalabeling_v1beta1.types.TextClassificationConfig

input_config

Rquired. Details for the sampled prediction input. Within this configuration, there are requirements for several fields:

  • dataType must be one of IMAGE, TEXT, or GENERAL_DATA.

  • annotationType must be one of IMAGE_CLASSIFICATION_ANNOTATION, TEXT_CLASSIFICATION_ANNOTATION, GENERAL_CLASSIFICATION_ANNOTATION, or IMAGE_BOUNDING_BOX_ANNOTATION (image object detection).

  • If your machine learning model performs classification, you must specify classificationMetadata.isMultiLabel.

  • You must specify bigquerySource (not gcsSource).

Type

google.cloud.datalabeling_v1beta1.types.InputConfig

evaluation_config

Required. Details for calculating evaluation metrics and creating [Evaulations][google.cloud.datalabeling.v1beta1.Evaluation]. If your model version performs image object detection, you must specify the boundingBoxEvaluationOptions field within this configuration. Otherwise, provide an empty object for this configuration.

Type

google.cloud.datalabeling_v1beta1.types.EvaluationConfig

human_annotation_config

Optional. Details for human annotation of your data. If you set [labelMissingGroundTruth][google.cloud.datalabeling.v1beta1.EvaluationJob.label_missing_ground_truth] to true for this evaluation job, then you must specify this field. If you plan to provide your own ground truth labels, then omit this field.

Note that you must create an [Instruction][google.cloud.datalabeling.v1beta1.Instruction] resource before you can specify this field. Provide the name of the instruction resource in the instruction field within this configuration.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

bigquery_import_keys

Required. Prediction keys that tell Data Labeling Service where to find the data for evaluation in your BigQuery table. When the service samples prediction input and output from your model version and saves it to BigQuery, the data gets stored as JSON strings in the BigQuery table. These keys tell Data Labeling Service how to parse the JSON.

You can provide the following entries in this field:

  • data_json_key: the data key for prediction input. You must provide either this key or reference_json_key.

  • reference_json_key: the data reference key for prediction input. You must provide either this key or data_json_key.

  • label_json_key: the label key for prediction output. Required.

  • label_score_json_key: the score key for prediction output. Required.

  • bounding_box_json_key: the bounding box key for prediction output. Required if your model version perform image object detection.

Learn how to configure prediction keys.

Type

MutableMapping[str, str]

example_count

Required. The maximum number of predictions to sample and save to BigQuery during each [evaluation interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. This limit overrides example_sample_percentage: even if the service has not sampled enough predictions to fulfill example_sample_perecentage during an interval, it stops sampling predictions when it meets this limit.

Type

int

example_sample_percentage

Required. Fraction of predictions to sample and save to BigQuery during each [evaluation interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. For example, 0.1 means 10% of predictions served by your model version get saved to BigQuery.

Type

float

evaluation_job_alert_config

Optional. Configuration details for evaluation job alerts. Specify this field if you want to receive email alerts if the evaluation job finds that your predictions have low mean average precision during a run.

Type

google.cloud.datalabeling_v1beta1.types.EvaluationJobAlertConfig

class BigqueryImportKeysEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.datalabeling_v1beta1.types.EvaluationMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

classification_metrics

This field is a member of oneof metrics.

Type

google.cloud.datalabeling_v1beta1.types.ClassificationMetrics

object_detection_metrics

This field is a member of oneof metrics.

Type

google.cloud.datalabeling_v1beta1.types.ObjectDetectionMetrics

class google.cloud.datalabeling_v1beta1.types.EventConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for video event human labeling task.

annotation_spec_sets

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

Type

MutableSequence[str]

class google.cloud.datalabeling_v1beta1.types.Example(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

image_payload

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

This field is a member of oneof payload.

Type

google.cloud.datalabeling_v1beta1.types.ImagePayload

text_payload

The text payload, a container of the text content.

This field is a member of oneof payload.

Type

google.cloud.datalabeling_v1beta1.types.TextPayload

video_payload

The video payload, a container of the video uri.

This field is a member of oneof payload.

Type

google.cloud.datalabeling_v1beta1.types.VideoPayload

name

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

Type

str

annotations

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

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.Annotation]

class google.cloud.datalabeling_v1beta1.types.ExportDataOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata of an ExportData operation.

dataset

Output only. The name of dataset to be exported. “projects//datasets/”.

Type

str

partial_failures

Output only. Partial failures encountered. E.g. single files that couldn’t be read. Status details field will contain standard GCP error details.

Type

MutableSequence[google.rpc.status_pb2.Status]

create_time

Output only. Timestamp when export dataset request was created.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.datalabeling_v1beta1.types.ExportDataOperationResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response used for ExportDataset longrunning operation.

dataset

Ouptut only. The name of dataset. “projects//datasets/”.

Type

str

total_count

Output only. Total number of examples requested to export

Type

int

export_count

Output only. Number of examples exported successfully.

Type

int

label_stats

Output only. Statistic infos of labels in the exported dataset.

Type

google.cloud.datalabeling_v1beta1.types.LabelStats

output_config

Output only. output_config in the ExportData request.

Type

google.cloud.datalabeling_v1beta1.types.OutputConfig

class google.cloud.datalabeling_v1beta1.types.ExportDataRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ExportData API.

name

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

Type

str

annotated_dataset

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}

Type

str

filter

Optional. Filter is not supported at this moment.

Type

str

output_config

Required. Specify the output destination.

Type

google.cloud.datalabeling_v1beta1.types.OutputConfig

user_email_address

Email of the user who started the export task and should be notified by email. If empty no notification will be sent.

Type

str

class google.cloud.datalabeling_v1beta1.types.GcsDestination(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

output_uri

Required. The output uri of destination file.

Type

str

mime_type

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

Type

str

class google.cloud.datalabeling_v1beta1.types.GcsFolderDestination(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Export folder destination of the data.

output_folder_uri

Required. Cloud Storage directory to export data to.

Type

str

class google.cloud.datalabeling_v1beta1.types.GcsSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Source of the Cloud Storage file to be imported.

input_uri

Required. The input URI of source file. This must be a Cloud Storage path (gs://...).

Type

str

mime_type

Required. The format of the source file. Only “text/csv” is supported.

Type

str

class google.cloud.datalabeling_v1beta1.types.GetAnnotatedDatasetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetAnnotatedDataset.

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.GetAnnotationSpecSetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetAnnotationSpecSet.

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.GetDataItemRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetDataItem.

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.GetDatasetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetDataSet.

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.GetEvaluationJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetEvaluationJob.

name

Required. Name of the evaluation job. Format:

“projects/{project_id}/evaluationJobs/{evaluation_job_id}”.

Type

str

class google.cloud.datalabeling_v1beta1.types.GetEvaluationRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetEvaluation.

name

Required. Name of the evaluation. Format:

“projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}’

Type

str

class google.cloud.datalabeling_v1beta1.types.GetExampleRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetExample

name

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

Type

str

filter

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

Type

str

class google.cloud.datalabeling_v1beta1.types.GetInstructionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetInstruction.

name

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

Type

str

class google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configuration for how human labeling task should be done.

instruction

Required. Instruction resource name.

Type

str

annotated_dataset_display_name

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

Type

str

annotated_dataset_description

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

Type

str

label_group

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

Type

str

language_code

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.

Type

str

replica_count

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.

Type

int

question_duration

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

Type

google.protobuf.duration_pb2.Duration

contributor_emails

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/

Type

MutableSequence[str]

user_email_address

Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.

Type

str

class google.cloud.datalabeling_v1beta1.types.ImageBoundingPolyAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

bounding_poly

This field is a member of oneof bounded_area.

Type

google.cloud.datalabeling_v1beta1.types.BoundingPoly

normalized_bounding_poly

This field is a member of oneof bounded_area.

Type

google.cloud.datalabeling_v1beta1.types.NormalizedBoundingPoly

annotation_spec

Label of object in this bounding polygon.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

class google.cloud.datalabeling_v1beta1.types.ImageClassificationAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Image classification annotation definition.

annotation_spec

Label of image.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

class google.cloud.datalabeling_v1beta1.types.ImageClassificationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for image classification human labeling task.

annotation_spec_set

Required. Annotation spec set resource name.

Type

str

allow_multi_label

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

Type

bool

answer_aggregation_type

Optional. The type of how to aggregate answers.

Type

google.cloud.datalabeling_v1beta1.types.StringAggregationType

class google.cloud.datalabeling_v1beta1.types.ImagePayload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Container of information about an image.

mime_type

Image format.

Type

str

image_thumbnail

A byte string of a thumbnail image.

Type

bytes

image_uri

Image uri from the user bucket.

Type

str

signed_uri

Signed uri of the image file in the service bucket.

Type

str

class google.cloud.datalabeling_v1beta1.types.ImagePolylineAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A polyline for the image annotation.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

polyline

This field is a member of oneof poly.

Type

google.cloud.datalabeling_v1beta1.types.Polyline

normalized_polyline

This field is a member of oneof poly.

Type

google.cloud.datalabeling_v1beta1.types.NormalizedPolyline

annotation_spec

Label of this polyline.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

class google.cloud.datalabeling_v1beta1.types.ImageSegmentationAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Image segmentation annotation.

annotation_colors

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.

Type

MutableMapping[str, google.cloud.datalabeling_v1beta1.types.AnnotationSpec]

mime_type

Image format.

Type

str

image_bytes

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

Type

bytes

class AnnotationColorsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.datalabeling_v1beta1.types.ImportDataOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata of an ImportData operation.

dataset

Output only. The name of imported dataset. “projects//datasets/”.

Type

str

partial_failures

Output only. Partial failures encountered. E.g. single files that couldn’t be read. Status details field will contain standard GCP error details.

Type

MutableSequence[google.rpc.status_pb2.Status]

create_time

Output only. Timestamp when import dataset request was created.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.datalabeling_v1beta1.types.ImportDataOperationResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response used for ImportData longrunning operation.

dataset

Ouptut only. The name of imported dataset.

Type

str

total_count

Output only. Total number of examples requested to import

Type

int

import_count

Output only. Number of examples imported successfully.

Type

int

class google.cloud.datalabeling_v1beta1.types.ImportDataRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ImportData API.

name

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

Type

str

input_config

Required. Specify the input source of the data.

Type

google.cloud.datalabeling_v1beta1.types.InputConfig

user_email_address

Email of the user who started the import task and should be notified by email. If empty no notification will be sent.

Type

str

class google.cloud.datalabeling_v1beta1.types.InputConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

text_metadata

Required for text import, as language code must be specified.

This field is a member of oneof data_type_metadata.

Type

google.cloud.datalabeling_v1beta1.types.TextMetadata

gcs_source

Source located in Cloud Storage.

This field is a member of oneof source.

Type

google.cloud.datalabeling_v1beta1.types.GcsSource

bigquery_source

Source located in BigQuery. You must specify this field if you are using this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob].

This field is a member of oneof source.

Type

google.cloud.datalabeling_v1beta1.types.BigQuerySource

data_type

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

Type

google.cloud.datalabeling_v1beta1.types.DataType

annotation_type

Optional. The type of annotation to be performed on this data. You must specify this field if you are using this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob].

Type

google.cloud.datalabeling_v1beta1.types.AnnotationType

classification_metadata

Optional. Metadata about annotations for the input. You must specify this field if you are using this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] for a model version that performs classification.

Type

google.cloud.datalabeling_v1beta1.types.ClassificationMetadata

class google.cloud.datalabeling_v1beta1.types.Instruction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Instruction of how to perform the labeling task for human operators. Currently only PDF instruction is supported.

name

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

Type

str

display_name

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

Type

str

description

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

Type

str

create_time

Output only. Creation time of instruction.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Last update time of instruction.

Type

google.protobuf.timestamp_pb2.Timestamp

data_type

Required. The data type of this instruction.

Type

google.cloud.datalabeling_v1beta1.types.DataType

csv_instruction

Deprecated: this instruction format is not supported any more. Instruction from a CSV file, such as for classification task. The CSV file should have exact two columns, in the following format:

  • The first column is labeled data, such as an image reference, text.

  • The second column is comma separated labels associated with data.

Type

google.cloud.datalabeling_v1beta1.types.CsvInstruction

pdf_instruction

Instruction from a PDF document. The PDF should be in a Cloud Storage bucket.

Type

google.cloud.datalabeling_v1beta1.types.PdfInstruction

blocking_resources

Output only. The names of any related resources that are blocking changes to the instruction.

Type

MutableSequence[str]

class google.cloud.datalabeling_v1beta1.types.LabelImageBoundingBoxOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of a LabelImageBoundingBox operation metadata.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelImageBoundingPolyOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of LabelImageBoundingPoly operation metadata.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelImageClassificationOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata of a LabelImageClassification operation.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelImageOrientedBoundingBoxOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of a LabelImageOrientedBoundingBox operation metadata.

basic_config

Basic human annotation config.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelImagePolylineOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of LabelImagePolyline operation metadata.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelImageRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for starting an image labeling task.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

image_classification_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.ImageClassificationConfig

bounding_poly_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.BoundingPolyConfig

polyline_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.PolylineConfig

segmentation_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.SegmentationConfig

parent

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

Type

str

basic_config

Required. Basic human annotation config.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

feature

Required. The type of image labeling task.

Type

google.cloud.datalabeling_v1beta1.types.LabelImageRequest.Feature

class Feature(value)[source]

Bases: proto.enums.Enum

Image labeling task feature.

Values:
FEATURE_UNSPECIFIED (0):

No description available.

CLASSIFICATION (1):

Label whole image with one or more of labels.

BOUNDING_BOX (2):

Label image with bounding boxes for labels.

ORIENTED_BOUNDING_BOX (6):

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

BOUNDING_POLY (3):

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 (4):

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

SEGMENTATION (5):

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

class google.cloud.datalabeling_v1beta1.types.LabelImageSegmentationOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of a LabelImageSegmentation operation metadata.

basic_config

Basic human annotation config.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata of a labeling operation, such as LabelImage or LabelVideo. Next tag: 20

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

image_classification_details

Details of label image classification operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelImageClassificationOperationMetadata

image_bounding_box_details

Details of label image bounding box operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelImageBoundingBoxOperationMetadata

image_bounding_poly_details

Details of label image bounding poly operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelImageBoundingPolyOperationMetadata

image_oriented_bounding_box_details

Details of label image oriented bounding box operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelImageOrientedBoundingBoxOperationMetadata

image_polyline_details

Details of label image polyline operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelImagePolylineOperationMetadata

image_segmentation_details

Details of label image segmentation operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelImageSegmentationOperationMetadata

video_classification_details

Details of label video classification operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelVideoClassificationOperationMetadata

video_object_detection_details

Details of label video object detection operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelVideoObjectDetectionOperationMetadata

video_object_tracking_details

Details of label video object tracking operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelVideoObjectTrackingOperationMetadata

video_event_details

Details of label video event operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelVideoEventOperationMetadata

text_classification_details

Details of label text classification operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelTextClassificationOperationMetadata

text_entity_extraction_details

Details of label text entity extraction operation.

This field is a member of oneof details.

Type

google.cloud.datalabeling_v1beta1.types.LabelTextEntityExtractionOperationMetadata

progress_percent

Output only. Progress of label operation. Range: [0, 100].

Type

int

partial_failures

Output only. Partial failures encountered. E.g. single files that couldn’t be read. Status details field will contain standard GCP error details.

Type

MutableSequence[google.rpc.status_pb2.Status]

create_time

Output only. Timestamp when labeling request was created.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.datalabeling_v1beta1.types.LabelStats(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Statistics about annotation specs.

example_count

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. If the annotated dataset does not have annotation spec, the map will return a pair where the key is empty string and value is the total number of annotations.

Type

MutableMapping[str, int]

class ExampleCountEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.datalabeling_v1beta1.types.LabelTextClassificationOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of a LabelTextClassification operation metadata.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelTextEntityExtractionOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of a LabelTextEntityExtraction operation metadata.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelTextRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for LabelText.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

text_classification_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.TextClassificationConfig

text_entity_extraction_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.TextEntityExtractionConfig

parent

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

Type

str

basic_config

Required. Basic human annotation config.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

feature

Required. The type of text labeling task.

Type

google.cloud.datalabeling_v1beta1.types.LabelTextRequest.Feature

class Feature(value)[source]

Bases: proto.enums.Enum

Text labeling task feature.

Values:
FEATURE_UNSPECIFIED (0):

No description available.

TEXT_CLASSIFICATION (1):

Label text content to one of more labels.

TEXT_ENTITY_EXTRACTION (2):

Label entities and their span in text.

class google.cloud.datalabeling_v1beta1.types.LabelVideoClassificationOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of a LabelVideoClassification operation metadata.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelVideoEventOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of a LabelVideoEvent operation metadata.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelVideoObjectDetectionOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of a LabelVideoObjectDetection operation metadata.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelVideoObjectTrackingOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of a LabelVideoObjectTracking operation metadata.

basic_config

Basic human annotation config used in labeling request.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

class google.cloud.datalabeling_v1beta1.types.LabelVideoRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for LabelVideo.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

video_classification_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.VideoClassificationConfig

object_detection_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.ObjectDetectionConfig

object_tracking_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.ObjectTrackingConfig

event_config

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

This field is a member of oneof request_config.

Type

google.cloud.datalabeling_v1beta1.types.EventConfig

parent

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

Type

str

basic_config

Required. Basic human annotation config.

Type

google.cloud.datalabeling_v1beta1.types.HumanAnnotationConfig

feature

Required. The type of video labeling task.

Type

google.cloud.datalabeling_v1beta1.types.LabelVideoRequest.Feature

class Feature(value)[source]

Bases: proto.enums.Enum

Video labeling task feature.

Values:
FEATURE_UNSPECIFIED (0):

No description available.

CLASSIFICATION (1):

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

OBJECT_DETECTION (2):

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

OBJECT_TRACKING (3):

Label and track objects in video.

EVENT (4):

Label the range of video for the specified events.

class google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListAnnotatedDatasets.

parent

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

Type

str

filter

Optional. Filter is not supported at this moment.

Type

str

page_size

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

Type

int

page_token

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

Type

str

class google.cloud.datalabeling_v1beta1.types.ListAnnotatedDatasetsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Results of listing annotated datasets for a dataset.

annotated_datasets

The list of annotated datasets to return.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.AnnotatedDataset]

next_page_token

A token to retrieve next page of results.

Type

str

class google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListAnnotationSpecSets.

parent

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

Type

str

filter

Optional. Filter is not supported at this moment.

Type

str

page_size

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

Type

int

page_token

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

Type

str

class google.cloud.datalabeling_v1beta1.types.ListAnnotationSpecSetsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Results of listing annotation spec set under a project.

annotation_spec_sets

The list of annotation spec sets.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.AnnotationSpecSet]

next_page_token

A token to retrieve next page of results.

Type

str

class google.cloud.datalabeling_v1beta1.types.ListDataItemsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListDataItems.

parent

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

Type

str

filter

Optional. Filter is not supported at this moment.

Type

str

page_size

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

Type

int

page_token

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

Type

str

class google.cloud.datalabeling_v1beta1.types.ListDataItemsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Results of listing data items in a dataset.

data_items

The list of data items to return.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.DataItem]

next_page_token

A token to retrieve next page of results.

Type

str

class google.cloud.datalabeling_v1beta1.types.ListDatasetsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListDataset.

parent

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

Type

str

filter

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

Type

str

page_size

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

Type

int

page_token

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

Type

str

class google.cloud.datalabeling_v1beta1.types.ListDatasetsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Results of listing datasets within a project.

datasets

The list of datasets to return.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.Dataset]

next_page_token

A token to retrieve next page of results.

Type

str

class google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListEvaluationJobs.

parent

Required. Evaluation job resource parent. Format: “projects/{project_id}”.

Type

str

filter

Optional. You can filter the jobs to list by model_id (also known as model_name, as described in [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version]) or by evaluation job state (as described in [EvaluationJob.state][google.cloud.datalabeling.v1beta1.EvaluationJob.state]). To filter by both criteria, use the AND operator or the OR operator. For example, you can use the following string for your filter: “evaluationjob.model_id = {model_name} AND evaluationjob.state = {evaluation_job_state}”.

Type

str

page_size

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

Type

int

page_token

Optional. A token identifying a page of results for the server to return. Typically obtained by the [nextPageToken][google.cloud.datalabeling.v1beta1.ListEvaluationJobsResponse.next_page_token] in the response to the previous request. The request returns the first page if this is empty.

Type

str

class google.cloud.datalabeling_v1beta1.types.ListEvaluationJobsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Results for listing evaluation jobs.

evaluation_jobs

The list of evaluation jobs to return.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.EvaluationJob]

next_page_token

A token to retrieve next page of results.

Type

str

class google.cloud.datalabeling_v1beta1.types.ListExamplesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListExamples.

parent

Required. Example resource parent.

Type

str

filter

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}”.

Type

str

page_size

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

Type

int

page_token

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

Type

str

class google.cloud.datalabeling_v1beta1.types.ListExamplesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Results of listing Examples in and annotated dataset.

examples

The list of examples to return.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.Example]

next_page_token

A token to retrieve next page of results.

Type

str

class google.cloud.datalabeling_v1beta1.types.ListInstructionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListInstructions.

parent

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

Type

str

filter

Optional. Filter is not supported at this moment.

Type

str

page_size

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

Type

int

page_token

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

Type

str

class google.cloud.datalabeling_v1beta1.types.ListInstructionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Results of listing instructions under a project.

instructions

The list of Instructions to return.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.Instruction]

next_page_token

A token to retrieve next page of results.

Type

str

class google.cloud.datalabeling_v1beta1.types.NormalizedBoundingPoly(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Normalized bounding polygon.

normalized_vertices

The bounding polygon normalized vertices.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.NormalizedVertex]

class google.cloud.datalabeling_v1beta1.types.NormalizedPolyline(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Normalized polyline.

normalized_vertices

The normalized polyline vertices.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.NormalizedVertex]

class google.cloud.datalabeling_v1beta1.types.NormalizedVertex(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

x

X coordinate.

Type

float

y

Y coordinate.

Type

float

class google.cloud.datalabeling_v1beta1.types.ObjectDetectionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

annotation_spec_set

Required. Annotation spec set resource name.

Type

str

extraction_frame_rate

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

Type

float

class google.cloud.datalabeling_v1beta1.types.ObjectDetectionMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metrics calculated for an image object detection (bounding box) model.

pr_curve

Precision-recall curve.

Type

google.cloud.datalabeling_v1beta1.types.PrCurve

class google.cloud.datalabeling_v1beta1.types.ObjectTrackingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for video object tracking human labeling task.

annotation_spec_set

Required. Annotation spec set resource name.

Type

str

class google.cloud.datalabeling_v1beta1.types.ObjectTrackingFrame(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video frame level annotation for object detection and tracking.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

bounding_poly

This field is a member of oneof bounded_area.

Type

google.cloud.datalabeling_v1beta1.types.BoundingPoly

normalized_bounding_poly

This field is a member of oneof bounded_area.

Type

google.cloud.datalabeling_v1beta1.types.NormalizedBoundingPoly

time_offset

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

Type

google.protobuf.duration_pb2.Duration

class google.cloud.datalabeling_v1beta1.types.OperatorMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

General information useful for labels coming from contributors.

score

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

Type

float

total_votes

The total number of contributors that answer this question.

Type

int

label_votes

The total number of contributors that choose this label.

Type

int

comments

Comments from contributors.

Type

MutableSequence[str]

class google.cloud.datalabeling_v1beta1.types.OutputConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The configuration of output data.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

gcs_destination

Output to a file in Cloud Storage. Should be used for labeling output other than image segmentation.

This field is a member of oneof destination.

Type

google.cloud.datalabeling_v1beta1.types.GcsDestination

gcs_folder_destination

Output to a folder in Cloud Storage. Should be used for image segmentation labeling output.

This field is a member of oneof destination.

Type

google.cloud.datalabeling_v1beta1.types.GcsFolderDestination

class google.cloud.datalabeling_v1beta1.types.PauseEvaluationJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for PauseEvaluationJob.

name

Required. Name of the evaluation job that is going to be paused. Format:

“projects/{project_id}/evaluationJobs/{evaluation_job_id}”.

Type

str

class google.cloud.datalabeling_v1beta1.types.PdfInstruction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Instruction from a PDF file.

gcs_file_uri

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

Type

str

class google.cloud.datalabeling_v1beta1.types.Polyline(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A line with multiple line segments.

vertices

The polyline vertices.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.Vertex]

class google.cloud.datalabeling_v1beta1.types.PolylineConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for image polyline human labeling task.

annotation_spec_set

Required. Annotation spec set resource name.

Type

str

instruction_message

Optional. Instruction message showed on contributors UI.

Type

str

class google.cloud.datalabeling_v1beta1.types.PrCurve(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

annotation_spec

The annotation spec of the label for which the precision-recall curve calculated. If this field is empty, that means the precision-recall curve is an aggregate curve for all labels.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

area_under_curve

Area under the precision-recall curve. Not to be confused with area under a receiver operating characteristic (ROC) curve.

Type

float

confidence_metrics_entries

Entries that make up the precision-recall graph. Each entry is a “point” on the graph drawn for a different confidence_threshold.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.PrCurve.ConfidenceMetricsEntry]

mean_average_precision

Mean average prcision of this curve.

Type

float

class ConfidenceMetricsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

confidence_threshold

Threshold used for this entry.

For classification tasks, this is a classification threshold: a predicted label is categorized as positive or negative (in the context of this point on the PR curve) based on whether the label’s score meets this threshold.

For image object detection (bounding box) tasks, this is the [intersection-over-union

(IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union) threshold for the context of this point on the PR curve.

Type

float

recall

Recall value.

Type

float

precision

Precision value.

Type

float

f1_score

Harmonic mean of recall and precision.

Type

float

recall_at1

Recall value for entries with label that has highest score.

Type

float

precision_at1

Precision value for entries with label that has highest score.

Type

float

f1_score_at1

The harmonic mean of [recall_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at1].

Type

float

recall_at5

Recall value for entries with label that has highest 5 scores.

Type

float

precision_at5

Precision value for entries with label that has highest 5 scores.

Type

float

f1_score_at5

The harmonic mean of [recall_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at5] and [precision_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at5].

Type

float

class google.cloud.datalabeling_v1beta1.types.ResumeEvaluationJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message ResumeEvaluationJob.

name

Required. Name of the evaluation job that is going to be resumed. Format:

“projects/{project_id}/evaluationJobs/{evaluation_job_id}”.

Type

str

class google.cloud.datalabeling_v1beta1.types.SearchEvaluationsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for SearchEvaluation.

parent

Required. Evaluation search parent (project ID). Format: “projects/{project_id}”.

Type

str

filter

Optional. To search evaluations, you can filter by the following:

  • evaluation_job.evaluation_job_id (the last part of [EvaluationJob.name][google.cloud.datalabeling.v1beta1.EvaluationJob.name])

  • evaluation_job.model_id (the {model_name} portion of [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version])

  • evaluation_job.evaluation_job_run_time_start (Minimum threshold for the [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created the evaluation)

  • evaluation_job.evaluation_job_run_time_end (Maximum threshold for the [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created the evaluation)

  • evaluation_job.job_state ([EvaluationJob.state][google.cloud.datalabeling.v1beta1.EvaluationJob.state])

  • annotation_spec.display_name (the Evaluation contains a metric for the annotation spec with this [displayName][google.cloud.datalabeling.v1beta1.AnnotationSpec.display_name])

To filter by multiple critiera, use the AND operator or the OR operator. The following examples shows a string that filters by several critiera:

“evaluationjob.evaluation_job_id = {evaluation_job_id} AND evaluationjob.model_id = {model_name} AND evaluationjob.evaluation_job_run_time_start = {timestamp_1} AND evaluationjob.evaluation_job_run_time_end = {timestamp_2} AND annotation_spec.display_name = {display_name}”.

Type

str

page_size

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

Type

int

page_token

Optional. A token identifying a page of results for the server to return. Typically obtained by the [nextPageToken][google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse.next_page_token] of the response to a previous search request.

If you don’t specify this field, the API call requests the first page of the search.

Type

str

class google.cloud.datalabeling_v1beta1.types.SearchEvaluationsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Results of searching evaluations.

evaluations

The list of evaluations matching the search.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.Evaluation]

next_page_token

A token to retrieve next page of results.

Type

str

class google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message of SearchExampleComparisons.

parent

Required. Name of the [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation] resource to search for example comparisons from. Format:

“projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}”.

Type

str

page_size

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

Type

int

page_token

Optional. A token identifying a page of results for the server to return. Typically obtained by the [nextPageToken][SearchExampleComparisons.next_page_token] of the response to a previous search rquest.

If you don’t specify this field, the API call requests the first page of the search.

Type

str

class google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Results of searching example comparisons.

example_comparisons

A list of example comparisons matching the search criteria.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.SearchExampleComparisonsResponse.ExampleComparison]

next_page_token

A token to retrieve next page of results.

Type

str

class ExampleComparison(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Example comparisons comparing ground truth output and predictions for a specific input.

ground_truth_example

The ground truth output for the input.

Type

google.cloud.datalabeling_v1beta1.types.Example

model_created_examples

Predictions by the model for the input.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.Example]

class google.cloud.datalabeling_v1beta1.types.SegmentationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for image segmentation

annotation_spec_set

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

Type

str

instruction_message

Instruction message showed on labelers UI.

Type

str

class google.cloud.datalabeling_v1beta1.types.SentimentConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for setting up sentiments.

enable_label_sentiment_selection

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.

Type

bool

class google.cloud.datalabeling_v1beta1.types.SequentialSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Start and end position in a sequence (e.g. text segment).

start

Start position (inclusive).

Type

int

end

End position (exclusive).

Type

int

class google.cloud.datalabeling_v1beta1.types.StringAggregationType(value)[source]

Bases: proto.enums.Enum

Values:
STRING_AGGREGATION_TYPE_UNSPECIFIED (0):

No description available.

MAJORITY_VOTE (1):

Majority vote to aggregate answers.

UNANIMOUS_VOTE (2):

Unanimous answers will be adopted.

NO_AGGREGATION (3):

Preserve all answers by crowd compute.

class google.cloud.datalabeling_v1beta1.types.TextClassificationAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Text classification annotation.

annotation_spec

Label of the text.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

class google.cloud.datalabeling_v1beta1.types.TextClassificationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for text classification human labeling task.

allow_multi_label

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

Type

bool

annotation_spec_set

Required. Annotation spec set resource name.

Type

str

sentiment_config

Optional. Configs for sentiment selection.

Type

google.cloud.datalabeling_v1beta1.types.SentimentConfig

class google.cloud.datalabeling_v1beta1.types.TextEntityExtractionAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Text entity extraction annotation.

annotation_spec

Label of the text entities.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

sequential_segment

Position of the entity.

Type

google.cloud.datalabeling_v1beta1.types.SequentialSegment

class google.cloud.datalabeling_v1beta1.types.TextEntityExtractionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Config for text entity extraction human labeling task.

annotation_spec_set

Required. Annotation spec set resource name.

Type

str

class google.cloud.datalabeling_v1beta1.types.TextMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata for the text.

language_code

The language of this text, as a BCP-47. Default value is en-US.

Type

str

class google.cloud.datalabeling_v1beta1.types.TextPayload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Container of information about a piece of text.

text_content

Text content.

Type

str

class google.cloud.datalabeling_v1beta1.types.TimeSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

start_time_offset

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

Type

google.protobuf.duration_pb2.Duration

end_time_offset

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

Type

google.protobuf.duration_pb2.Duration

class google.cloud.datalabeling_v1beta1.types.UpdateEvaluationJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateEvaluationJob.

evaluation_job

Required. Evaluation job that is going to be updated.

Type

google.cloud.datalabeling_v1beta1.types.EvaluationJob

update_mask

Optional. Mask for which fields to update. You can only provide the following fields:

  • evaluationJobConfig.humanAnnotationConfig.instruction

  • evaluationJobConfig.exampleCount

  • evaluationJobConfig.exampleSamplePercentage

You can provide more than one of these fields by separating them with commas.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.cloud.datalabeling_v1beta1.types.Vertex(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

x

X coordinate.

Type

int

y

Y coordinate.

Type

int

class google.cloud.datalabeling_v1beta1.types.VideoClassificationAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video classification annotation.

time_segment

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

Type

google.cloud.datalabeling_v1beta1.types.TimeSegment

annotation_spec

Label of the segment specified by time_segment.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

class google.cloud.datalabeling_v1beta1.types.VideoClassificationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

annotation_spec_set_configs

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.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.VideoClassificationConfig.AnnotationSpecSetConfig]

apply_shot_detection

Optional. Option to apply shot detection on the video.

Type

bool

class AnnotationSpecSetConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

annotation_spec_set

Required. Annotation spec set resource name.

Type

str

allow_multi_label

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

Type

bool

class google.cloud.datalabeling_v1beta1.types.VideoEventAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video event annotation.

annotation_spec

Label of the event in this annotation.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

time_segment

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

Type

google.cloud.datalabeling_v1beta1.types.TimeSegment

class google.cloud.datalabeling_v1beta1.types.VideoObjectTrackingAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Video object tracking annotation.

annotation_spec

Label of the object tracked in this annotation.

Type

google.cloud.datalabeling_v1beta1.types.AnnotationSpec

time_segment

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

Type

google.cloud.datalabeling_v1beta1.types.TimeSegment

object_tracking_frames

The list of frames where this object track appears.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.ObjectTrackingFrame]

class google.cloud.datalabeling_v1beta1.types.VideoPayload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Container of information of a video.

mime_type

Video format.

Type

str

video_uri

Video uri from the user bucket.

Type

str

video_thumbnails

The list of video thumbnails.

Type

MutableSequence[google.cloud.datalabeling_v1beta1.types.VideoThumbnail]

frame_rate

FPS of the video.

Type

float

signed_uri

Signed uri of the video file in the service bucket.

Type

str

class google.cloud.datalabeling_v1beta1.types.VideoThumbnail(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Container of information of a video thumbnail.

thumbnail

A byte string of the video frame.

Type

bytes

time_offset

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

Type

google.protobuf.duration_pb2.Duration