UNPKG

googleapis

Version:
1,060 lines 332 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace datalabeling_v1beta1 { export interface Options extends GlobalOptions { version: 'v1beta1'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Data Labeling API * * Public API for Google Cloud AI Data Labeling Service. * * @example * ```js * const {google} = require('googleapis'); * const datalabeling = google.datalabeling('v1beta1'); * ``` */ export class Datalabeling { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Metadata of a CreateInstruction operation. */ export interface Schema$GoogleCloudDatalabelingV1alpha1CreateInstructionMetadata { /** * Timestamp when create instruction request was created. */ createTime?: string | null; /** * The name of the created Instruction. projects/{project_id\}/instructions/{instruction_id\} */ instruction?: string | null; /** * Partial failures encountered. E.g. single files that couldn't be read. Status details field will contain standard GCP error details. */ partialFailures?: Schema$GoogleRpcStatus[]; } /** * Metadata of an ExportData operation. */ export interface Schema$GoogleCloudDatalabelingV1alpha1ExportDataOperationMetadata { /** * Output only. The name of annotated dataset in format "projects/x/datasets/x/annotatedDatasets/x". */ annotatedDataset?: string | null; /** * Output only. Timestamp when export dataset request was created. */ createTime?: string | null; /** * Output only. The name of dataset to be exported. "projects/x/datasets/x" */ dataset?: string | null; /** * Output only. Partial failures encountered. E.g. single files that couldn't be read. Status details field will contain standard GCP error details. */ partialFailures?: Schema$GoogleRpcStatus[]; } /** * Response used for ExportDataset longrunning operation. */ export interface Schema$GoogleCloudDatalabelingV1alpha1ExportDataOperationResponse { /** * Output only. The name of annotated dataset in format "projects/x/datasets/x/annotatedDatasets/x". */ annotatedDataset?: string | null; /** * Ouptut only. The name of dataset. "projects/x/datasets/x" */ dataset?: string | null; /** * Output only. Number of examples exported successfully. */ exportCount?: number | null; /** * Output only. Statistic infos of labels in the exported dataset. */ labelStats?: Schema$GoogleCloudDatalabelingV1alpha1LabelStats; /** * Output only. output_config in the ExportData request. */ outputConfig?: Schema$GoogleCloudDatalabelingV1alpha1OutputConfig; /** * Output only. Total number of examples requested to export */ totalCount?: number | null; } /** * Export destination of the data.Only gcs path is allowed in output_uri. */ export interface Schema$GoogleCloudDatalabelingV1alpha1GcsDestination { /** * Required. The format of the gcs destination. Only "text/csv" and "application/json" are supported. */ mimeType?: string | null; /** * Required. The output uri of destination file. */ outputUri?: string | null; } /** * Export folder destination of the data. */ export interface Schema$GoogleCloudDatalabelingV1alpha1GcsFolderDestination { /** * Required. Cloud Storage directory to export data to. */ outputFolderUri?: string | null; } /** * Configuration for how human labeling task should be done. */ export interface Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig { /** * Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long. */ annotatedDatasetDescription?: string | null; /** * Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters . */ annotatedDatasetDisplayName?: string | null; /** * 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/ */ contributorEmails?: string[] | null; /** * Required. Instruction resource name. */ instruction?: string | null; /** * Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression `[a-zA-Z\\d_-]{0,128\}`. */ labelGroup?: string | null; /** * Optional. The Language of this question, as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Default value is en-US. Only need to set this when task is language related. For example, French text classification. */ languageCode?: string | null; /** * Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds. */ questionDuration?: string | null; /** * 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. */ replicaCount?: number | null; /** * Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent. */ userEmailAddress?: string | null; } /** * Metadata of an ImportData operation. */ export interface Schema$GoogleCloudDatalabelingV1alpha1ImportDataOperationMetadata { /** * Output only. Timestamp when import dataset request was created. */ createTime?: string | null; /** * Output only. The name of imported dataset. "projects/x/datasets/x" */ dataset?: string | null; /** * Output only. Partial failures encountered. E.g. single files that couldn't be read. Status details field will contain standard GCP error details. */ partialFailures?: Schema$GoogleRpcStatus[]; } /** * Response used for ImportData longrunning operation. */ export interface Schema$GoogleCloudDatalabelingV1alpha1ImportDataOperationResponse { /** * Ouptut only. The name of imported dataset. */ dataset?: string | null; /** * Output only. Number of examples imported successfully. */ importCount?: number | null; /** * Output only. Total number of examples requested to import */ totalCount?: number | null; } /** * Details of a LabelImageBoundingBox operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelImageBoundingBoxOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Details of LabelImageBoundingPoly operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelImageBoundingPolyOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Metadata of a LabelImageClassification operation. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelImageClassificationOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Details of a LabelImageOrientedBoundingBox operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelImageOrientedBoundingBoxOperationMetadata { /** * Basic human annotation config. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Details of LabelImagePolyline operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelImagePolylineOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Details of a LabelImageSegmentation operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelImageSegmentationOperationMetadata { /** * Basic human annotation config. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Metadata of a labeling operation, such as LabelImage or LabelVideo. Next tag: 23 */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelOperationMetadata { /** * Output only. The name of annotated dataset in format "projects/x/datasets/x/annotatedDatasets/x". */ annotatedDataset?: string | null; /** * Output only. Timestamp when labeling request was created. */ createTime?: string | null; /** * Output only. The name of dataset to be labeled. "projects/x/datasets/x" */ dataset?: string | null; /** * Details of label image bounding box operation. */ imageBoundingBoxDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelImageBoundingBoxOperationMetadata; /** * Details of label image bounding poly operation. */ imageBoundingPolyDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelImageBoundingPolyOperationMetadata; /** * Details of label image classification operation. */ imageClassificationDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelImageClassificationOperationMetadata; /** * Details of label image oriented bounding box operation. */ imageOrientedBoundingBoxDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelImageOrientedBoundingBoxOperationMetadata; /** * Details of label image polyline operation. */ imagePolylineDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelImagePolylineOperationMetadata; /** * Details of label image segmentation operation. */ imageSegmentationDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelImageSegmentationOperationMetadata; /** * Output only. Partial failures encountered. E.g. single files that couldn't be read. Status details field will contain standard GCP error details. */ partialFailures?: Schema$GoogleRpcStatus[]; /** * Output only. Progress of label operation. Range: [0, 100]. */ progressPercent?: number | null; /** * Details of label text classification operation. */ textClassificationDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelTextClassificationOperationMetadata; /** * Details of label text entity extraction operation. */ textEntityExtractionDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelTextEntityExtractionOperationMetadata; /** * Details of label video classification operation. */ videoClassificationDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelVideoClassificationOperationMetadata; /** * Details of label video event operation. */ videoEventDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelVideoEventOperationMetadata; /** * Details of label video object detection operation. */ videoObjectDetectionDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelVideoObjectDetectionOperationMetadata; /** * Details of label video object tracking operation. */ videoObjectTrackingDetails?: Schema$GoogleCloudDatalabelingV1alpha1LabelVideoObjectTrackingOperationMetadata; } /** * Statistics about annotation specs. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelStats { /** * 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. */ exampleCount?: { [key: string]: string; } | null; } /** * Details of a LabelTextClassification operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelTextClassificationOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Details of a LabelTextEntityExtraction operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelTextEntityExtractionOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Details of a LabelVideoClassification operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelVideoClassificationOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Details of a LabelVideoEvent operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelVideoEventOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Details of a LabelVideoObjectDetection operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelVideoObjectDetectionOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * Details of a LabelVideoObjectTracking operation metadata. */ export interface Schema$GoogleCloudDatalabelingV1alpha1LabelVideoObjectTrackingOperationMetadata { /** * Basic human annotation config used in labeling request. */ basicConfig?: Schema$GoogleCloudDatalabelingV1alpha1HumanAnnotationConfig; } /** * The configuration of output data. */ export interface Schema$GoogleCloudDatalabelingV1alpha1OutputConfig { /** * Output to a file in Cloud Storage. Should be used for labeling output other than image segmentation. */ gcsDestination?: Schema$GoogleCloudDatalabelingV1alpha1GcsDestination; /** * Output to a folder in Cloud Storage. Should be used for image segmentation or document de-identification labeling outputs. */ gcsFolderDestination?: Schema$GoogleCloudDatalabelingV1alpha1GcsFolderDestination; } /** * 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. */ export interface Schema$GoogleCloudDatalabelingV1beta1AnnotatedDataset { /** * Output only. Source of the annotation. */ annotationSource?: string | null; /** * Output only. Type of the annotation. It is specified when starting labeling task. */ annotationType?: string | null; /** * Output only. The names of any related resources that are blocking changes to the annotated dataset. */ blockingResources?: string[] | null; /** * Output only. Number of examples that have annotation in the annotated dataset. */ completedExampleCount?: string | null; /** * Output only. Time the AnnotatedDataset was created. */ createTime?: string | null; /** * Output only. The description of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 characters. */ description?: string | null; /** * Output only. The display name of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 64 characters. */ displayName?: string | null; /** * Output only. Number of examples in the annotated dataset. */ exampleCount?: string | null; /** * Output only. Per label statistics. */ labelStats?: Schema$GoogleCloudDatalabelingV1beta1LabelStats; /** * Output only. Additional information about AnnotatedDataset. */ metadata?: Schema$GoogleCloudDatalabelingV1beta1AnnotatedDatasetMetadata; /** * Output only. AnnotatedDataset resource name in format of: projects/{project_id\}/datasets/{dataset_id\}/annotatedDatasets/ {annotated_dataset_id\} */ name?: string | null; } /** * Metadata on AnnotatedDataset. */ export interface Schema$GoogleCloudDatalabelingV1beta1AnnotatedDatasetMetadata { /** * Configuration for image bounding box and bounding poly task. */ boundingPolyConfig?: Schema$GoogleCloudDatalabelingV1beta1BoundingPolyConfig; /** * Configuration for video event labeling task. */ eventConfig?: Schema$GoogleCloudDatalabelingV1beta1EventConfig; /** * HumanAnnotationConfig used when requesting the human labeling task for this AnnotatedDataset. */ humanAnnotationConfig?: Schema$GoogleCloudDatalabelingV1beta1HumanAnnotationConfig; /** * Configuration for image classification task. */ imageClassificationConfig?: Schema$GoogleCloudDatalabelingV1beta1ImageClassificationConfig; /** * Configuration for video object detection task. */ objectDetectionConfig?: Schema$GoogleCloudDatalabelingV1beta1ObjectDetectionConfig; /** * Configuration for video object tracking task. */ objectTrackingConfig?: Schema$GoogleCloudDatalabelingV1beta1ObjectTrackingConfig; /** * Configuration for image polyline task. */ polylineConfig?: Schema$GoogleCloudDatalabelingV1beta1PolylineConfig; /** * Configuration for image segmentation task. */ segmentationConfig?: Schema$GoogleCloudDatalabelingV1beta1SegmentationConfig; /** * Configuration for text classification task. */ textClassificationConfig?: Schema$GoogleCloudDatalabelingV1beta1TextClassificationConfig; /** * Configuration for text entity extraction task. */ textEntityExtractionConfig?: Schema$GoogleCloudDatalabelingV1beta1TextEntityExtractionConfig; /** * Configuration for video classification task. */ videoClassificationConfig?: Schema$GoogleCloudDatalabelingV1beta1VideoClassificationConfig; } /** * 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. */ export interface Schema$GoogleCloudDatalabelingV1beta1Annotation { /** * Output only. Annotation metadata, including information like votes for labels. */ annotationMetadata?: Schema$GoogleCloudDatalabelingV1beta1AnnotationMetadata; /** * Output only. Sentiment for this annotation. */ annotationSentiment?: string | null; /** * Output only. The source of the annotation. */ annotationSource?: string | null; /** * Output only. This is the actual annotation value, e.g classification, bounding box values are stored here. */ annotationValue?: Schema$GoogleCloudDatalabelingV1beta1AnnotationValue; /** * Output only. Unique name of this annotation, format is: projects/{project_id\}/datasets/{dataset_id\}/annotatedDatasets/{annotated_dataset\}/examples/{example_id\}/annotations/{annotation_id\} */ name?: string | null; } /** * Additional information associated with the annotation. */ export interface Schema$GoogleCloudDatalabelingV1beta1AnnotationMetadata { /** * Metadata related to human labeling. */ operatorMetadata?: Schema$GoogleCloudDatalabelingV1beta1OperatorMetadata; } /** * 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`. */ export interface Schema$GoogleCloudDatalabelingV1beta1AnnotationSpec { /** * Optional. User-provided description of the annotation specification. The description can be up to 10,000 characters long. */ description?: string | null; /** * Required. The display name of the AnnotationSpec. Maximum of 64 characters. */ displayName?: string | null; /** * Output only. This is the integer index of the AnnotationSpec. The index for the whole AnnotationSpecSet is sequential starting from 0. For example, an AnnotationSpecSet with classes `dog` and `cat`, might contain one AnnotationSpec with `{ display_name: "dog", index: 0 \}` and one AnnotationSpec with `{ display_name: "cat", index: 1 \}`. This is especially useful for model training as it encodes the string labels into numeric values. */ index?: number | null; } /** * 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. */ export interface Schema$GoogleCloudDatalabelingV1beta1AnnotationSpecSet { /** * Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task. */ annotationSpecs?: Schema$GoogleCloudDatalabelingV1beta1AnnotationSpec[]; /** * Output only. The names of any related resources that are blocking changes to the annotation spec set. */ blockingResources?: string[] | null; /** * Optional. User-provided description of the annotation specification set. The description can be up to 10,000 characters long. */ description?: string | null; /** * Required. The display name for AnnotationSpecSet that you define when you create it. Maximum of 64 characters. */ displayName?: string | null; /** * Output only. The AnnotationSpecSet resource name in the following format: "projects/{project_id\}/annotationSpecSets/{annotation_spec_set_id\}" */ name?: string | null; } /** * Annotation spec set with the setting of allowing multi labels or not. */ export interface Schema$GoogleCloudDatalabelingV1beta1AnnotationSpecSetConfig { /** * Optional. If allow_multi_label is true, contributors are able to choose multiple labels from one annotation spec set. */ allowMultiLabel?: boolean | null; /** * Required. Annotation spec set resource name. */ annotationSpecSet?: string | null; } /** * Annotation value for an example. */ export interface Schema$GoogleCloudDatalabelingV1beta1AnnotationValue { /** * Annotation value for image bounding box, oriented bounding box and polygon cases. */ imageBoundingPolyAnnotation?: Schema$GoogleCloudDatalabelingV1beta1ImageBoundingPolyAnnotation; /** * Annotation value for image classification case. */ imageClassificationAnnotation?: Schema$GoogleCloudDatalabelingV1beta1ImageClassificationAnnotation; /** * 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. */ imagePolylineAnnotation?: Schema$GoogleCloudDatalabelingV1beta1ImagePolylineAnnotation; /** * Annotation value for image segmentation. */ imageSegmentationAnnotation?: Schema$GoogleCloudDatalabelingV1beta1ImageSegmentationAnnotation; /** * Annotation value for text classification case. */ textClassificationAnnotation?: Schema$GoogleCloudDatalabelingV1beta1TextClassificationAnnotation; /** * Annotation value for text entity extraction case. */ textEntityExtractionAnnotation?: Schema$GoogleCloudDatalabelingV1beta1TextEntityExtractionAnnotation; /** * Annotation value for video classification case. */ videoClassificationAnnotation?: Schema$GoogleCloudDatalabelingV1beta1VideoClassificationAnnotation; /** * Annotation value for video event case. */ videoEventAnnotation?: Schema$GoogleCloudDatalabelingV1beta1VideoEventAnnotation; /** * Annotation value for video object detection and tracking case. */ videoObjectTrackingAnnotation?: Schema$GoogleCloudDatalabelingV1beta1VideoObjectTrackingAnnotation; } /** * Records a failed evaluation job run. */ export interface Schema$GoogleCloudDatalabelingV1beta1Attempt { attemptTime?: string | null; /** * Details of errors that occurred. */ partialFailures?: Schema$GoogleRpcStatus[]; } /** * The BigQuery location for input data. If used in an EvaluationJob, this is where the service saves the prediction input and output sampled from the model version. */ export interface Schema$GoogleCloudDatalabelingV1beta1BigQuerySource { /** * 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. If you specify the URI of a table that already exists, it must have the [correct schema](/ml-engine/docs/continuous-evaluation/create-job#table-schema). Provide the table URI in the following format: "bq://{your_project_id\}/ {your_dataset_name\}/{your_table_name\}" [Learn more](/ml-engine/docs/continuous-evaluation/create-job#table-schema). */ inputUri?: string | null; } /** * Options regarding evaluation between bounding boxes. */ export interface Schema$GoogleCloudDatalabelingV1beta1BoundingBoxEvaluationOptions { /** * 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. */ iouThreshold?: number | null; } /** * A bounding polygon in the image. */ export interface Schema$GoogleCloudDatalabelingV1beta1BoundingPoly { /** * The bounding polygon vertices. */ vertices?: Schema$GoogleCloudDatalabelingV1beta1Vertex[]; } /** * Config for image bounding poly (and bounding box) human labeling task. */ export interface Schema$GoogleCloudDatalabelingV1beta1BoundingPolyConfig { /** * Required. Annotation spec set resource name. */ annotationSpecSet?: string | null; /** * Optional. Instruction message showed on contributors UI. */ instructionMessage?: string | null; } /** * Metadata for classification annotations. */ export interface Schema$GoogleCloudDatalabelingV1beta1ClassificationMetadata { /** * Whether the classification task is multi-label or not. */ isMultiLabel?: boolean | null; } /** * Metrics calculated for a classification model. */ export interface Schema$GoogleCloudDatalabelingV1beta1ClassificationMetrics { /** * Confusion matrix of predicted labels vs. ground truth labels. */ confusionMatrix?: Schema$GoogleCloudDatalabelingV1beta1ConfusionMatrix; /** * Precision-recall curve based on ground truth labels, predicted labels, and scores for the predicted labels. */ prCurve?: Schema$GoogleCloudDatalabelingV1beta1PrCurve; } export interface Schema$GoogleCloudDatalabelingV1beta1ConfidenceMetricsEntry { /** * 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. */ confidenceThreshold?: number | null; /** * Harmonic mean of recall and precision. */ f1Score?: number | null; /** * The harmonic mean of recall_at1 and precision_at1. */ f1ScoreAt1?: number | null; /** * The harmonic mean of recall_at5 and precision_at5. */ f1ScoreAt5?: number | null; /** * Precision value. */ precision?: number | null; /** * Precision value for entries with label that has highest score. */ precisionAt1?: number | null; /** * Precision value for entries with label that has highest 5 scores. */ precisionAt5?: number | null; /** * Recall value. */ recall?: number | null; /** * Recall value for entries with label that has highest score. */ recallAt1?: number | null; /** * Recall value for entries with label that has highest 5 scores. */ recallAt5?: number | null; } /** * 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. */ export interface Schema$GoogleCloudDatalabelingV1beta1ConfusionMatrix { row?: Schema$GoogleCloudDatalabelingV1beta1Row[]; } export interface Schema$GoogleCloudDatalabelingV1beta1ConfusionMatrixEntry { /** * The annotation spec of a predicted label. */ annotationSpec?: Schema$GoogleCloudDatalabelingV1beta1AnnotationSpec; /** * Number of items predicted to have this label. (The ground truth label for these items is the `Row.annotationSpec` of this entry's parent.) */ itemCount?: number | null; } /** * Request message for CreateAnnotationSpecSet. */ export interface Schema$GoogleCloudDatalabelingV1beta1CreateAnnotationSpecSetRequest { /** * 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. */ annotationSpecSet?: Schema$GoogleCloudDatalabelingV1beta1AnnotationSpecSet; } /** * Request message for CreateDataset. */ export interface Schema$GoogleCloudDatalabelingV1beta1CreateDatasetRequest { /** * Required. The dataset to be created. */ dataset?: Schema$GoogleCloudDatalabelingV1beta1Dataset; } /** * Request message for CreateEvaluationJob. */ export interface Schema$GoogleCloudDatalabelingV1beta1CreateEvaluationJobRequest { /** * Required. The evaluation job to create. */ job?: Schema$GoogleCloudDatalabelingV1beta1EvaluationJob; } /** * Metadata of a CreateInstruction operation. */ export interface Schema$GoogleCloudDatalabelingV1beta1CreateInstructionMetadata { /** * Timestamp when create instruction request was created. */ createTime?: string | null; /** * The name of the created Instruction. projects/{project_id\}/instructions/{instruction_id\} */ instruction?: string | null; /** * Partial failures encountered. E.g. single files that couldn't be read. Status details field will contain standard GCP error details. */ partialFailures?: Schema$GoogleRpcStatus[]; } /** * Request message for CreateInstruction. */ export interface Schema$GoogleCloudDatalabelingV1beta1CreateInstructionRequest { /** * Required. Instruction of how to perform the labeling task. */ instruction?: Schema$GoogleCloudDatalabelingV1beta1Instruction; } /** * Deprecated: this instruction format is not supported any more. Instruction from a CSV file. */ export interface Schema$GoogleCloudDatalabelingV1beta1CsvInstruction { /** * CSV file for the instruction. Only gcs path is allowed. */ gcsFileUri?: string | null; } /** * DataItem is a piece of data, without annotation. For example, an image. */ export interface Schema$GoogleCloudDatalabelingV1beta1DataItem { /** * The image payload, a container of the image bytes/uri. */ imagePayload?: Schema$GoogleCloudDatalabelingV1beta1ImagePayload; /** * Output only. Name of the data item, in format of: projects/{project_id\}/datasets/{dataset_id\}/dataItems/{data_item_id\} */ name?: string | null; /** * The text payload, a container of text content. */ textPayload?: Schema$GoogleCloudDatalabelingV1beta1TextPayload; /** * The video payload, a container of the video uri. */ videoPayload?: Schema$GoogleCloudDatalabelingV1beta1VideoPayload; } /** * Dataset is the resource to hold your data. You can request multiple labeling tasks for a dataset while each one will generate an AnnotatedDataset. */ export interface Schema$GoogleCloudDatalabelingV1beta1Dataset { /** * Output only. The names of any related resources that are blocking changes to the dataset. */ blockingResources?: string[] | null; /** * Output only. Time the dataset is created. */ createTime?: string | null; /** * Output only. The number of data items in the dataset. */ dataItemCount?: string | null; /** * Optional. User-provided description of the annotation specification set. The description can be up to 10000 characters long. */ description?: string | null; /** * Required. The display name of the dataset. Maximum of 64 characters. */ displayName?: string | null; /** * 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. */ inputConfigs?: Schema$GoogleCloudDatalabelingV1beta1InputConfig[]; /** * Last time that the Dataset is migrated to AI Platform V2. If any of the AnnotatedDataset is migrated, the last_migration_time in Dataset is also updated. */ lastMigrateTime?: string | null; /** * Output only. Dataset resource name, format is: projects/{project_id\}/datasets/{dataset_id\} */ name?: string | null; } /** * Describes an evaluation between a machine learning model's predictions and ground truth labels. Created when an EvaluationJob runs successfully. */ export interface Schema$GoogleCloudDatalabelingV1beta1Evaluation { /** * Output only. Type of task that the model version being evaluated performs, as defined in the evaluationJobConfig.inputConfig.annotationType field of the evaluation job that created this evaluation. */ annotationType?: string | null; /** * Output only. Options used in the evaluation job that created this evaluation. */ config?: Schema$GoogleCloudDatalabelingV1beta1EvaluationConfig; /** * Output only. Timestamp for when this evaluation was created. */ createTime?: string | null; /** * 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. */ evaluatedItemCount?: string | null; /** * Output only. Timestamp for when the evaluation job that created this evaluation ran. */ evaluationJobRunTime?: string | null; /** * Output only. Metrics comparing predictions to ground truth labels. */ evaluationMetrics?: Schema$GoogleCloudDatalabelingV1beta1EvaluationMetrics; /** * Output only. Resource name of an evaluation. The name has the following format: "projects/{project_id\}/datasets/{dataset_id\}/evaluations/ {evaluation_id\}' */ name?: string | null; } /** * Configuration details used for calculating evaluation metrics and creating an Evaluation. */ export interface Schema$GoogleCloudDatalabelingV1beta1EvaluationConfig { /** * Only specify this field if the related model performs image object detection (`IMAGE_BOUNDING_BOX_ANNOTATION`). Describes how to evaluate bounding boxes. */ boundingBoxEvaluationOptions?: Schema$GoogleCloudDatalabelingV1beta1BoundingBoxEvaluationOptions; } /** * Defines an evaluation job that runs periodically to generate Evaluations. [Creating an evaluation job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point for using continuous evaluation. */ export interface Schema$GoogleCloudDatalabelingV1beta1EvaluationJob { /** * Required. Name of the 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\}" */ annotationSpecSet?: string | null; /** * Output only. Every time the evaluation job runs and an error occurs, the failed attempt is appended to this array. */ attempts?: Schema$GoogleCloudDatalabelingV1beta1Attempt[]; /** * Output only. Timestamp of when this evaluation job was created. */ createTime?: string | null; /** * Required. Description of the job. The description can be up to 25,000 characters long. */ description?: string | null; /** * Required. Configuration details for the evaluation job. */ evaluationJobConfig?: Schema$GoogleCloudDatalabelingV1beta1EvaluationJobConfig; /** * 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`. */ labelMissingGroundTruth?: boolean | null; /** * Required. The [AI Platform Prediction model version](/ml-engine/docs/prediction-overview) 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. */ modelVersion?: string | null; /** * 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\}" */ name?: string | null; /** * 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](/scheduler/docs/configuring/cron-job-schedules) or in an [English-like format](/appengine/docs/standard/python/config/cronref#schedule_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. */ schedule?: string | null; /** * Output only. Describes the current state of the job. */ state?: string | null; } /** * Provides details for how an evaluation job sends email alerts based on the results of a run. */ export interface Schema$GoogleCloudDatalabelingV1beta1EvaluationJobAlertConfig { /** * Required. An email address to send alerts to. */ email?: string | null; /** * 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 below this threshold, then it sends an alert to your specified email. */ minAcceptableMeanAveragePrecision?: number | null; } /** * Configures specific details of how a continuous evaluation job works. Provide this configuration when you create an EvaluationJob. */ export interface Schema$GoogleCloudDatalabelingV1beta1EvaluationJobConfig { /** * 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](/ml-engine/docs/continuous-evaluation/create-job#prediction-keys). */ bigqueryImportKeys?: { [key: string]: string; } | null; /** * Specify this field if your model version performs image object detection (bounding box detection). `annotationSpecSet` in this configuration must match EvaluationJob.annotationSpecSet. */ boundingPolyConfig?: Schema$GoogleCloudDatalabelingV1beta1BoundingPolyConfig; /** * Required. Details for calculating evaluation metrics and creating Evaulations. 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. */ evaluationConfig?: Schema$GoogleCloudDatalabelingV1beta1EvaluationConfig; /** * 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. */ evaluationJobAlertConfig?: Schema$GoogleCloudDatalabelingV1beta1EvaluationJobAlertConfig; /** * Required. The maximum number of predictions to sample and save to BigQuery during each evaluation interval. 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. */ exampleCount?: number | null; /** * Required. Fraction of predictions to sample and save to BigQuery during each evaluation interval. For example, 0.1 means 10% of predictions served by your model version get saved to BigQuery. */ exampleSamplePercentage?: number | null; /** * Optional. Details for human annotation of your data. If you set labelMissingGroundTruth 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 resource before you can specify this field. Provide the name of the instruction resource in the `instruction` field within this configuration. */ humanAnnotationConfig?: Schema$GoogleCloudDatalabelingV1beta1HumanAnnotationConfig; /** * Specify this field if your model version performs image classification or general classification. `annotationSpecSet` in this configuration must match EvaluationJob.annotationSpecSet. `allowMultiLabel` in this configuration must match `classificationMetadata.isMultiLabel` in input_config. */ imageClassificationConfig?: Schema$GoogleCloudDatalabelingV1beta1ImageClassificationConfig; /** * 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 mu