Package google.cloud.automl.v1beta1

Index

AutoMl

AutoML Server API.

The resource names are assigned by the server. The server never reuses names that it has created after the resources with those names are deleted.

An ID of a resource is the last element of the item's resource name. For projects/{project_id}/locations/{location_id}/datasets/{dataset_id}, then the id for the item is {dataset_id}.

Currently the only supported location_id is "us-central1".

On any input that is documented to expect a string parameter in snake_case or dash-case, either of those cases is accepted.

CreateDataset

rpc CreateDataset(CreateDatasetRequest) returns (Dataset)

Creates a dataset.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CreateModel

rpc CreateModel(CreateModelRequest) returns (Operation)

Creates a model. Returns a Model in the response field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteDataset

rpc DeleteDataset(DeleteDatasetRequest) returns (Operation)

Deletes a dataset and all of its contents. Returns empty response in the response field when it completes, and delete_details in the metadata field.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteModel

rpc DeleteModel(DeleteModelRequest) returns (Operation)

Deletes a model. Returns google.protobuf.Empty in the response field when it completes, and delete_details in the metadata field.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeployModel

rpc DeployModel(DeployModelRequest) returns (Operation)

Deploys a model. Not applicable for this product. This product automatically deploys models when they are successfully trained.

Returns an empty response in the response field when it completes.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ExportData

rpc ExportData(ExportDataRequest) returns (Operation)

Exports dataset's data to the provided output location. Returns an empty response in the response field when it completes.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetAnnotationSpec

rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec)

Gets an annotation spec.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetDataset

rpc GetDataset(GetDatasetRequest) returns (Dataset)

Gets a dataset.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetModel

rpc GetModel(GetModelRequest) returns (Model)

Gets a model.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetModelEvaluation

rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation)

Gets a model evaluation.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ImportData

rpc ImportData(ImportDataRequest) returns (Operation)

Imports data into a dataset.

You can only call this method for an empty Dataset.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListDatasets

rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse)

Lists datasets in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListModelEvaluations

rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse)

Lists model evaluations.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListModels

rpc ListModels(ListModelsRequest) returns (ListModelsResponse)

Lists models.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UndeployModel

rpc UndeployModel(UndeployModelRequest) returns (Operation)

Removes a deployed model. Not applicable for this product. This product automatically removes deployed models that are deleted.

Returns an empty response in the response field when it completes.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

PredictionService

AutoML Prediction API.

On any input that is documented to expect a string parameter in snake_case or dash-case, either of those cases is accepted.

BatchPredict

rpc BatchPredict(BatchPredictRequest) returns (Operation)

Perform a batch prediction and return the id of a long-running operation. You can request the operation result by using the GetOperation method. When the operation has completed, you can call GetOperation to retrieve a BatchPredictResult from the response field.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Predict

rpc Predict(PredictRequest) returns (PredictResponse)

Not used for AutoML Video Intelligence Object Tracking.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

AnnotationPayload

Contains annotation information that is relevant to AutoML.

Fields
annotation_spec_id

string

Output only . The resource ID of the annotation spec that this annotation pertains to. The annotation spec comes from either an ancestor dataset, or the dataset that was used to train the model in use.

display_name

string

Output only. The value of display_name when the model was trained. Because this field returns a value at model training time, for different models trained using the same dataset, the returned value could be different as model owner could update the display_name between any two model training.

Union field detail. Output only . Additional information about the annotation specific to the AutoML domain. detail can be only one of the following:
classification

ClassificationAnnotation

Not used for AutoML Video Intelligence Object Tracking.

video_object_tracking

VideoObjectTrackingAnnotation

Annotation details for object tracking predictions.

AnnotationSpec

A definition of an annotation.

Fields
name

string

Output only. Resource name of the annotation spec. Form:

'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'

display_name

string

Required. The name of the annotation spec to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.

example_count

int32

Output only. The number of examples in the parent dataset labeled by the annotation spec.

BatchPredictInputConfig

Input configuration for BatchPredict action. The input is one or more CSV files stored in Google Cloud Storage where the CSV files are in the following format:

GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
  • GCS_FILE_PATH identifies the Google Cloud Storage path to a video up to 50GB in size and up to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.

  • TIME_SEGMENT_START and TIME_SEGMENT_END must be within the length of the video, and end has to be after the start. Both are measured in seconds from the beginning of the video.

Three sample rows:

gs://folder/video1.mp4,10,40
gs://folder/video1.mp4,20,60
gs://folder/vid2.mov,0,inf

See Annotating videos for more information.

Fields
gcs_source

GcsSource

The Google Cloud Storage location for the input content.

BatchPredictOperationMetadata

Details of BatchPredict operation.

Fields
input_config

BatchPredictInputConfig

Output only. The input config that was given upon starting this batch predict operation.

output_info

BatchPredictOutputInfo

Output only. Information further describing this batch predict's output.

BatchPredictOutputInfo

Further describes this batch predict's output. Supplements

BatchPredictOutputConfig.

Fields
Union field output_location. The output location into which prediction output is written. output_location can be only one of the following:
gcs_output_directory

string

The full path of the Google Cloud Storage directory created, into which the prediction output is written.

bigquery_output_dataset

string

The path of the BigQuery dataset created, in bq://projectId.bqDatasetId format, into which the prediction output is written.

BatchPredictOutputConfig

Output configuration for BatchPredict Action.

AutoML Video Intelligence creates a directory specified in the gcsDestination. The name of the directory is "prediction-<model-display-name>-<timestamp-of-prediction-call>", where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.

AutoML Video Intelligence creates a file named video_object_tracking.csv in the new directory, and also a JSON file for each object tracking request in it, that is, each row in the input CSV file.

The format of the video_object_tracking.csv file is as follows:

GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
  • The GCS_FILE_PATH, TIME_SEGMENT_START, TIME_SEGMENT_END match the same fields from the input CSV file.

  • JSON_FILE_NAME is the name of the JSON file in the output directory that contains prediction responses for each video time segment. The JSON files are named video_object_tracking_1.json, video_object_tracking_2.json, and so on up to the number of object tracking requests. These files include the AnnotationPayload in JSON format.

  • STATUS contains "OK" if the prediction completed successfully; otherwise contains error information. If STATUS is not "OK" then the JSON file for that prediction might be empty or the file might not exist.

Each JSON file where STATUS is "OK", contains a list of AnnotationPayload protos in JSON format, which are the predictions for the video time segment the file is assigned to in the video_classification.csv. All AnnotationPayload protos have a video_object_tracking field, and are sorted by the video_object_tracking.type field. The types returned are determined by the object_tracking_types parameter of BatchPredictRequest.params.

Fields
Union field destination. Required. The destination of the output. destination can be only one of the following:
gcs_destination

GcsDestination

The Google Cloud Storage location of the directory where the output is to be written to.

bigquery_destination

BigQueryDestination

The BigQuery location where the output is to be written to.

BatchPredictRequest

Request message for PredictionService.BatchPredict.

Fields
name

string

Name of the model requested to serve the batch prediction.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.models.predict

input_config

BatchPredictInputConfig

Required. The input configuration for batch prediction.

output_config

BatchPredictOutputConfig

Required. The Configuration specifying where output predictions should be written.

params

map<string, string>

Can be one of the following:

score_threshold

(float) A value from 0.0 to 1.0. When the model detects objects on video frames, it will only produce bounding boxes that have at least this confidence score. The default is 0.5.

max_bounding_box_count

(int64) The maximum number of bounding boxes to return per video frame. The default is 100. The requested value might be limited by server.

min_bounding_box_size

(float) Only return bounding boxes where the shortest edge of the bounding box is at least

min_bounding_box_size

long, relative to the size of the video frame. The value is a percentage of the size of the video frame and can be a value from 0 to 1. For example, if you set

min_bounding_box_size

to 0.2, then the model will only return bounding boxes where the shortest edge is greater than 20 percent of the size of the related edge from the video frame. The default is 0.

See Annotating videos for more details.

BatchPredictResult

Result of the Batch Predict. This message is returned in response of the operation returned by the PredictionService.BatchPredict.

Fields
metadata

map<string, string>

Additional domain-specific prediction response metadata.

Includes the following fields:

  • max_bounding_box_count - (int64) The maximum number of bounding boxes that could have been returned for a frame of video.

BigQueryDestination

The BigQuery location for the output content.

Fields
output_uri

string

Required. BigQuery URI to a project, up to 2000 characters long. For example: bq://projectId

BoundingBoxMetricsEntry

Bounding box matching model metrics for a single intersection-over-union threshold and multiple label match confidence thresholds.

Fields
iou_threshold

float

Output only. The intersection-over-union threshold value used to compute this metrics entry.

mean_average_precision

float

Output only. The mean average precision, most often close to au_prc.

confidence_metrics_entries[]

ConfidenceMetricsEntry

Output only. Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is derived from them.

ConfidenceMetricsEntry

Metrics for a single confidence threshold.

Fields
confidence_threshold

float

Output only. The confidence threshold value used to compute the metrics.

recall

float

Output only. Recall under the given confidence threshold.

precision

float

Output only. Precision under the given confidence threshold.

f1_score

float

Output only. The harmonic mean of recall and precision.

BoundingPoly

A bounding polygon of a detected object on a plane. On output both vertices and normalized_vertices are provided. The polygon is formed by connecting vertices in the order they are listed.

Fields
normalized_vertices[]

NormalizedVertex

Output only . The bounding polygon normalized vertices.

ClassificationAnnotation

Contains annotation details specific to classification.

Fields
score

float

Output only. A confidence estimate between 0.0 and 1.0. A higher value means greater confidence that the annotation is positive. If a user approves an annotation as negative or positive, the score value remains unchanged. If a user creates an annotation, the score is 0 for negative or 1 for positive.

ClassificationEvaluationMetrics

Model evaluation metrics for classification problems. Note: For Video Classification this metrics only describe quality of the Video Classification predictions of "segment_classification" type.

Fields
au_prc

float

Output only. The Area Under Precision-Recall Curve metric. Micro-averaged for the overall evaluation.

base_au_prc
(deprecated)

float

Output only. The Area Under Precision-Recall Curve metric based on priors. Micro-averaged for the overall evaluation. Deprecated.

au_roc

float

Output only. The Area Under Receiver Operating Characteristic curve metric. Micro-averaged for the overall evaluation.

log_loss

float

Output only. The Log Loss metric.

confidence_metrics_entry[]

ConfidenceMetricsEntry

Output only. Metrics for each confidence_threshold in 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and position_threshold = INT32_MAX_VALUE. ROC and precision-recall curves, and other aggregated metrics are derived from them. The confidence metrics entries may also be supplied for additional values of position_threshold, but from these no aggregated metrics are computed.

confusion_matrix

ConfusionMatrix

Output only. Confusion matrix of the evaluation. Only set for MULTICLASS classification problems where number of labels is no more than 10. Only set for model level evaluation, not for evaluation per label.

annotation_spec_id[]

string

Output only. The annotation spec ids used for this evaluation.

ConfidenceMetricsEntry

Metrics for a single confidence threshold.

Fields
confidence_threshold

float

Output only. Metrics are computed with an assumption that the model never returns predictions with score lower than this value.

position_threshold

int32

Output only. Metrics are computed with an assumption that the model always returns at most this many predictions (ordered by their score, descendingly), but they all still need to meet the confidence_threshold.

recall

float

Output only. Recall (True Positive Rate) for the given confidence threshold.

precision

float

Output only. Precision for the given confidence threshold.

false_positive_rate

float

Output only. False Positive Rate for the given confidence threshold.

f1_score

float

Output only. The harmonic mean of recall and precision.

recall_at1

float

Output only. The Recall (True Positive Rate) when only considering the label that has the highest prediction score and not below the confidence threshold for each example.

precision_at1

float

Output only. The precision when only considering the label that has the highest prediction score and not below the confidence threshold for each example.

false_positive_rate_at1

float

Output only. The False Positive Rate when only considering the label that has the highest prediction score and not below the confidence threshold for each example.

f1_score_at1

float

Output only. The harmonic mean of recall_at1 and precision_at1.

true_positive_count

int64

Output only. The number of model created labels that match a ground truth label.

false_positive_count

int64

Output only. The number of model created labels that do not match a ground truth label.

false_negative_count

int64

Output only. The number of ground truth labels that are not matched by a model created label.

true_negative_count

int64

Output only. The number of labels that were not created by the model, but if they would, they would not match a ground truth label.

ConfusionMatrix

Confusion matrix of the model running the classification.

Fields
annotation_spec_id[]

string

Output only. IDs of the annotation specs used in the confusion matrix.

row[]

Row

Output only. Rows in the confusion matrix. The number of rows is equal to the size of annotation_spec_id. row[i].value[j] is the number of examples that have ground truth of the annotation_spec_id[i] and are predicted as annotation_spec_id[j] by the model being evaluated.

Row

Output only. A row in the confusion matrix.

Fields
example_count[]

int32

Output only. Value of the specific cell in the confusion matrix. The number of values each row has (i.e. the length of the row) is equal to the length of the annotation_spec_id field or, if that one is not populated, length of the display_name field.

CreateDatasetRequest

Request message for AutoMl.CreateDataset.

Fields
parent

string

The resource name of the project to create the dataset for.

Authorization requires the following Google IAM permission on the specified resource parent:

  • automl.datasets.create

dataset

Dataset

The dataset to create.

CreateModelOperationMetadata

Details of CreateModel operation.

CreateModelRequest

Request message for AutoMl.CreateModel.

Fields
parent

string

Resource name of the parent project where the model is being created.

Authorization requires the following Google IAM permission on the specified resource parent:

  • automl.models.create

model

Model

The model to create.

Dataset

A workspace for solving a single, particular machine learning (ML) problem. A workspace contains examples that may be annotated.

Fields
name

string

Output only. The resource name of the dataset. Form: projects/{project_id}/locations/{location_id}/datasets/{dataset_id}

display_name

string

Required. The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.

example_count

int32

Output only. The number of examples in the dataset.

create_time

Timestamp

Output only. Timestamp when this dataset was created.

video_object_tracking_dataset_metadata

VideoObjectTrackingDatasetMetadata

Metadata for a dataset used for video object tracking.

DeleteDatasetRequest

Request message for AutoMl.DeleteDataset.

Fields
name

string

The resource name of the dataset to delete.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.datasets.delete

DeleteModelRequest

Request message for AutoMl.DeleteModel.

Fields
name

string

Resource name of the model being deleted.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.models.delete

DeleteOperationMetadata

Details of operations that perform deletes of any entities.

DeployModelOperationMetadata

Details of DeployModel operation.

DeployModelRequest

Request message for AutoMl.DeployModel.

Fields
name

string

Resource name of the model to deploy.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.models.deploy

ExamplePayload

Example data used for training or prediction.

ExportDataOperationMetadata

Details of ExportData operation.

Fields
output_info

ExportDataOutputInfo

Output only. Information further describing this export data's output.

ExportDataOutputInfo

Further describes this export data's output. Supplements OutputConfig.

Fields
Union field output_location. The output location to which the exported data is written. output_location can be only one of the following:
gcs_output_directory

string

The full path of the Google Cloud Storage directory created, into which the exported data is written.

bigquery_output_dataset

string

The path of the BigQuery dataset created, in bq://projectId.bqDatasetId format, into which the exported data is written.

ExportDataRequest

Request message for AutoMl.ExportData.

Fields
name

string

Required. The resource name of the dataset.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.datasets.export

output_config

OutputConfig

Required. The desired output location.

GcsDestination

The Google Cloud Storage location where the output is to be written to.

Fields
output_uri_prefix

string

Required. Google Cloud Storage URI to output directory, up to 2000 characters long. Accepted forms: * Prefix path: gs://bucket/directory The requesting user must have write permission to the bucket. The directory is created if it doesn't exist.

GcsSource

The Google Cloud Storage location for the input content.

Fields
input_uris[]

string

Required. Google Cloud Storage URIs to input files, up to 2000 characters long. Accepted forms: * Full object path, e.g. gs://bucket/directory/object.csv

GetAnnotationSpecRequest

Request message for AutoMl.GetAnnotationSpec.

Fields
name

string

The resource name of the annotation spec to retrieve.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.annotationSpecs.get

GetDatasetRequest

Request message for AutoMl.GetDataset.

Fields
name

string

The resource name of the dataset to retrieve.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.datasets.get

GetModelEvaluationRequest

Request message for AutoMl.GetModelEvaluation.

Fields
name

string

Resource name for the model evaluation.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.modelEvaluations.get

GetModelRequest

Request message for AutoMl.GetModel.

Fields
name

string

Resource name of the model.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.models.get

ImportDataOperationMetadata

Details of ImportData operation.

ImportDataRequest

Request message for AutoMl.ImportData.

Fields
name

string

Required. Dataset name. Dataset must already exist. All imported annotations and examples will be added.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.datasets.import

input_config

InputConfig

Required. The desired input location and its domain specific semantics, if any.

InputConfig

Input configuration for ImportData action.

The format of input depends on dataset_metadata the Dataset into which the import is happening has. As input source the gcs_source is expected, unless specified otherwise. If a file with identical content (even if it had different GCS_FILE_PATH) is mentioned multiple times , then its label, bounding boxes etc. are appended. The same file should be always provided with the same ML_USE and GCS_FILE_PATH, if it is not then these values are nondeterministically selected from the given ones.

The formats are represented in EBNF with commas being literal and with non-terminal symbols defined near the end of this comment. The formats are:

See Preparing your training data for more information.

A CSV file(s) with each line in format:

ML_USE,GCS_FILE_PATH
  • ML_USE - Identifies the data set that the current row (file) applies to. This value can be one of the following:

    • TRAIN - Rows in this file are used to train the model.
    • TEST - Rows in this file are used to test the model during training.
    • UNASSIGNED - Rows in this file are not categorized. They are Automatically divided into train and test data. 80% for training and 20% for testing.
  • GCS_FILE_PATH - Identifies a file stored in Google Cloud Storage that contains the model training information.

For example file:

TRAIN,gs:folder/train_videos.csv
TEST,gs:folder/test_videos.csv
UNASSIGNED,gs:folder/other_videos.csv

After the training data set has been determined from the TRAIN and UNASSIGNED CSV files, the training data is divided into train and validation data sets. 70% for training and 30% for validation.

Each CSV file specified using the GCS_FILE_PATH field has the following format:

GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX
  • GCS_FILE_PATH - The path to a video stored in Google Cloud Storage. The video can be up to 1h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.

  • LABEL - A label that identifies the object of the video segment.

  • [INSTANCE_ID] - You can provide an instance id or leave this field blank. Providing instance ids can help to obtain a better model. That is, you can identify a specific labeled entity in a video frame with an instance id. If that entity leaves the video frame, and shows up at a later timestamp, you can identify the identity with the same instance id to help train a more accurate model.

  • TIMESTAMP - The time, in seconds that identifies the frame of video with the labeled object. TIMESTAMP must be greater than zero and less than or equal to the length of the video. AutoML Video Intelligence uses the video frame that is closest to the TIMESTAMP to train the model.

  • BOUNDING_BOX - The coordinates of the labeled object in the video frame. You can specify up to 500 bounding boxes per video frame. A bounding box consists of four pairs of horizontal and vertical (x,y) coordinates that form a square region of the video that contains an object to be tracked. For example: 0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9. An empty field is equivalent to a value of 0.

Here is an example of the format of one of the CSV files identified by the gcsSource "top level" file.

 gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9
 gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9
 gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3
 gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,,
 gs://folder/video1.avi,bike,,12,50,.45,.45,,,.55,.55
 gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1

Errors:

If any of the provided CSV files can't be parsed or if more than certain percent of CSV rows cannot be processed then the operation fails and nothing is imported. Regardless of overall success or failure the per-row failures, up to a certain count cap, will be listed in Operation.metadata.partial_failures.

Fields
gcs_source

GcsSource

The Google Cloud Storage location for the input content.

ListDatasetsRequest

Request message for AutoMl.ListDatasets.

Fields
parent

string

The resource name of the project from which to list datasets.

Authorization requires the following Google IAM permission on the specified resource parent:

  • automl.datasets.list

filter

string

An expression for filtering the results of the request.

  • dataset_metadata: test for existence of metadata.

An example of using the filter is:

  • video_object_tracking_dataset_metadata:* --> The dataset has video_object_tracking_dataset_metadata.

page_size

int32

Requested page size. Server may return fewer results than requested. If unspecified, server will pick a default size.

page_token

string

A token identifying a page of results for the server to return Typically obtained via ListDatasetsResponse.next_page_token of the previous AutoMl.ListDatasets call.

ListDatasetsResponse

Response message for AutoMl.ListDatasets.

Fields
datasets[]

Dataset

The datasets read.

next_page_token

string

A token to retrieve next page of results. Pass to ListDatasetsRequest.page_token to obtain that page.

ListModelEvaluationsRequest

Request message for AutoMl.ListModelEvaluations.

Fields
parent

string

Resource name of the model to list the model evaluations for. If modelId is set as "-", this will list model evaluations from across all models of the parent location.

Authorization requires the following Google IAM permission on the specified resource parent:

  • automl.modelEvaluations.list

filter

string

An expression for filtering the results of the request.

  • annotation_spec_id - for =, != or existence. See example below for the last.

Some examples of using the filter are:

  • annotation_spec_id!=4 --> The model evaluation was done for annotation spec with ID different than 4.
  • NOT annotation_spec_id:* --> The model evaluation was done for aggregate of all annotation specs.

page_size

int32

Requested page size.

page_token

string

A token identifying a page of results for the server to return. Typically obtained via ListModelEvaluationsResponse.next_page_token of the previous AutoMl.ListModelEvaluations call.

ListModelEvaluationsResponse

Response message for AutoMl.ListModelEvaluations.

Fields
model_evaluation[]

ModelEvaluation

List of model evaluations in the requested page.

next_page_token

string

A token to retrieve next page of results. Pass to the ListModelEvaluationsRequest.page_token field of a new AutoMl.ListModelEvaluations request to obtain that page.

ListModelsRequest

Request message for AutoMl.ListModels.

Fields
parent

string

Resource name of the project, from which to list the models.

Authorization requires the following Google IAM permission on the specified resource parent:

  • automl.models.list

filter

string

An expression for filtering the results of the request.

  • model_metadata: test for existence of metadata.

  • dataset_id: = or != a dataset ID.

Some examples of using the filter are:

  • video_object_tracking_model_metadata:* --> The model has video_object_tracking_model_metadata.

  • dataset_id=5 --> The model was created from a dataset with an ID of 5.

page_size

int32

Requested page size.

page_token

string

A token identifying a page of results for the server to return Typically obtained via ListModelsResponse.next_page_token of the previous AutoMl.ListModels call.

ListModelsResponse

Response message for AutoMl.ListModels.

Fields
model[]

Model

List of models in the requested page.

next_page_token

string

A token to retrieve next page of results. Pass to ListModelsRequest.page_token to obtain that page.

Model

API proto representing a trained machine learning model.

Fields
name

string

Output only. Resource name of the model. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

display_name

string

Required. The name of the model to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. It must start with a letter.

dataset_id

string

Required. The resource ID of the dataset used to create the model. The dataset must come from the same ancestor project and location.

create_time

Timestamp

Output only. Timestamp when the model training finished and can be used for prediction.

update_time

Timestamp

Output only. Timestamp when this model was last updated.

deployment_state

DeploymentState

Output only. Deployment state of the model. A model can only serve prediction requests after it gets deployed.

video_object_tracking_model_metadata

VideoObjectTrackingModelMetadata

Metadata for video object tracking models.

DeploymentState

Deployment state of the model.

Enums
DEPLOYMENT_STATE_UNSPECIFIED Should not be used, an un-set enum has this value by default.
DEPLOYED Model is deployed.
UNDEPLOYED Model is not deployed.

ModelEvaluation

Evaluation results of a model.

Fields
name

string

Output only. Resource name of the model evaluation. Format:

projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}

annotation_spec_id

string

Output only. The ID of the annotation spec that the model evaluation applies to. The The ID is empty for the overall model evaluation.

display_name

string

Output only. The value of display_name at the moment when the model was trained. Because this field returns a value at model training time, for different models trained from the same dataset, the values may differ, since display names could had been changed between the two model's trainings.

The display_name is empty for the overall model evaluation.

create_time

Timestamp

Output only. Timestamp when this model evaluation was created.

evaluated_example_count

int32

Output only. The number of examples used for model evaluation, i.e. for which ground truth from time of model creation is compared against the predicted annotations created by the model. For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is the total number of all examples used for evaluation. Otherwise, this is the count of examples that according to the ground truth were annotated by the

annotation_spec_id.

Union field metrics. Output only. Problem type specific evaluation metrics. metrics can be only one of the following:
classification_evaluation_metrics

ClassificationEvaluationMetrics

Model evaluation metrics.

video_object_tracking_evaluation_metrics

VideoObjectTrackingEvaluationMetrics

Evaluation metrics for object tracking models.

NormalizedVertex

A vertex represents a 2D point in the image. The normalized vertex coordinates are between 0 to 1 fractions relative to the original plane (image, video). E.g. if the plane (e.g. whole image) would have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would be at the position (1, 6) on that plane.

Fields
x

float

Required. Horizontal coordinate.

y

float

Required. Vertical coordinate.

OperationMetadata

Metadata used across all long running operations returned by AutoML API.

Fields
progress_percent

int32

Output only. Progress of operation. Range: [0, 100]. Not used currently.

partial_failures[]

Status

Output only. Partial failures encountered. E.g. single files that couldn't be read. This field should never exceed 20 entries. Status details field will contain standard GCP error details.

create_time

Timestamp

Output only. Time when the operation was created.

update_time

Timestamp

Output only. Time when the operation was updated for the last time.

Union field details. Ouptut only. Details of specific operation. Even if this field is empty, the presence allows to distinguish different types of operations. details can be only one of the following:
delete_details

DeleteOperationMetadata

Details of a Delete operation.

deploy_model_details

DeployModelOperationMetadata

Details of a DeployModel operation.

undeploy_model_details

UndeployModelOperationMetadata

Details of an UndeployModel operation.

create_model_details

CreateModelOperationMetadata

Details of CreateModel operation.

import_data_details

ImportDataOperationMetadata

Details of ImportData operation.

batch_predict_details

BatchPredictOperationMetadata

Details of BatchPredict operation.

export_data_details

ExportDataOperationMetadata

Details of ExportData operation.

OutputConfig

Output configuration for ExportData.

As destination the gcs_destination must be set. Only ground truth annotations are exported (not approved annotations are not exported).

The outputs correspond to how the data was imported, and may be used as input to import data. The output formats are represented as EBNF with literal commas and same non-terminal symbols definitions as the InputConfig for import data.

The outputs are contained within a CSV file named video_object_tracking.csv, with each line in the following format and may have multiple lines per a single ML_USE:

ML_USE,GCS_FILE_PATH

Each GCS_FILE_PATH leads to another CSV file that describes examples that have given ML_USE, using the following row format:

GCS_FILE_PATH,LABEL,INSTANCE_ID,TIMESTAMP,BOUNDING_BOX

Here the data in the GCS_FILE_PATH column point at the original, source locations of the imported videos.

Fields
gcs_destination

GcsDestination

The Google Cloud Storage location where the output is to be written to.

In the given directory a new directory is created similar to the following where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format:

export_data-<dataset-display-name>-<timestamp-of-export-call>

All export output will be written into that directory.

PredictRequest

Request message for PredictionService.Predict.

Fields
name

string

Name of the model requested to serve the prediction.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.models.predict

payload

ExamplePayload

Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve.

params

map<string, string>

Additional domain-specific parameters, any string must be up to 25000 characters long.

PredictResponse

Response message for PredictionService.Predict.

Fields
payload[]

AnnotationPayload

Prediction result.

metadata

map<string, string>

Additional domain-specific prediction response metadata.

UndeployModelOperationMetadata

Details of UndeployModel operation.

UndeployModelRequest

Request message for AutoMl.UndeployModel.

Fields
name

string

Resource name of the model to undeploy.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.models.undeploy

VideoObjectTrackingAnnotation

Annotation details for video object tracking.

Fields
instance_id

string

Optional. The instance of the object, expressed as a positive integer. Used to tell apart objects of the same type (i.e. AnnotationSpec) when multiple are present on a single example. NOTE: Instance ID prediction quality is not a part of model evaluation and is done as best effort. Especially in cases when an entity goes off-screen for a longer time (minutes), when it comes back it may be given a new instance ID.

time_offset

Duration

Required. A time (frame) of a video to which this annotation pertains. Represented as the duration since the video's start.

bounding_box

BoundingPoly

Required. The rectangle representing the object location on the frame (i.e. at the time_offset of the video).

score

float

Output only. The confidence that this annotation is positive for the video at the time_offset, value in [0, 1], higher means higher positivity confidence. For annotations created by the user the score is 1. When user approves an annotation, the original float score is kept (and not changed to 1).

VideoObjectTrackingDatasetMetadata

Dataset metadata specific to video object tracking.

VideoObjectTrackingEvaluationMetrics

Model evaluation metrics for video object tracking problems. Evaluates prediction quality of both labeled bounding boxes and labeled tracks (i.e. series of bounding boxes sharing same label and instance ID).

Fields
evaluated_frame_count

int32

Output only. The number of video frames used to create this evaluation.

evaluated_bounding_box_count

int32

Output only. The total number of bounding boxes (i.e. summed over all frames) the ground truth used to create this evaluation had.

evaluated_track_count

int32

Output only. The total number of tracks (i.e. as seen across all frames) the ground truth used to create this evaluation had.

bounding_box_metrics_entries[]

BoundingBoxMetricsEntry

Output only. The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair.

bounding_box_mean_average_precision

float

Output only. The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.

VideoObjectTrackingModelMetadata

Model metadata specific to video object tracking.