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.

For more information, see Importing items into a 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 available for AutoML Video Intelligence.

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

Annotation details for classification predictions.

video_classification

VideoClassificationAnnotation

Annotation details for video classification. Returned for Video Classification 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.

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_classification.csv in the new directory, and also a JSON file for each video classification requested. That is, each row in the input CSV file.

The format of the video_classification.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 the video time segment.

  • 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_classification field, and are sorted by the video_classification.type field. The types returned are determined by the classifaction_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 makes predictions for a video, it will only produce results that have at least this confidence score. The default is 0.

segment_classification

(boolean) Set to true to request segment-level classification. AutoML Video Intelligence returns labels and their confidence scores for the entire segment of the video that user specified in the request configuration. The default is "true".

shot_classification

(boolean) Set to true to request shot-level classification. AutoML Video Intelligence determines the boundaries for each camera shot in the entire segment of the video that user specified in the request configuration. AutoML Video Intelligence then returns labels and their confidence scores for each detected shot, along with the start and end time of the shot. WARNING: Model evaluation is not done for this classification type, the quality of it depends on training data, but there are no metrics provided to describe that quality. The default is "false".

1s_interval_classification

(boolean) Set to true to request classification for a video at one-second intervals. AutoML Video Intelligence returns labels and their confidence scores for each second of the entire segment of the video that user specified in the request configuration. WARNING: Model evaluation is not done for this classification type, the quality of it depends on training data, but there are no metrics provided to describe that quality. The default is "false".

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.

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

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. These metrics only describe the quality of predictions where the type is set to segment_classification. For information on the prediction type, see BatchPredictRequest.params.

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_classification_dataset_metadata

VideoClassificationDatasetMetadata

Metadata for a dataset used for video classification.

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.

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,TIME_SEGMENT_START,TIME_SEGMENT_END
  • 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.

  • TIME_SEGMENT_START and TIME_SEGMENT_END - The start and end timestamps in seconds for the segment of video to be annotated. The values must be within the length of the video, and TIME_SEGMENT_END must be after the TIME_SEGMENT_START.

You can specify videos in the CSV file without any labels. You must then use the AutoML Video Intelligence UI to apply labels to the video before you train your model. To specify a video segment in this way, provide the Google Cloud Storage URI for the video followed by three commas.

Sample file:

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

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,120,180.000021
gs://folder/video1.avi,bike,150,180.000021
gs://folder/vid2.avi,car,0,60.5
gs://folder/vid3.avi,,,

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.

  • display_name: =, !=, and regex(). Uses re2 syntax.

An example of using the filter is:

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

  • regex(display_name, "^A") -> The dataset's display name starts with "A"

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.

  • display_name: =, !=, and regex(). Uses re2 syntax.

Some examples of using the filter are:

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

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

  • regex(display_name, "^A") -> The models's display name starts with "A".

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_classification_model_metadata

VideoClassificationModelMetadata

Metadata for video classification 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.

classification_evaluation_metrics

ClassificationEvaluationMetrics

Evaluation metrics for classification models.

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.

AutoML Video Intelligence writes a CSV file named video_classification.csv in the Google Cloud Storage bucket specified in gcs_destination.

The output file has the following fields:

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. AutoML Video Intelligence writes this file to the Google Cloud Storage bucket specified in gcs_destination.

Each CSV file identified with a GCS_FILE_PATH value has the following format:

GCS_FILE_PATH,LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END
  • GCS_FILE_PATH - The path to the original, imported video stored in Google Cloud Storage.

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

  • TIME_SEGMENT_START and TIME_SEGMENT_END - The start and end timestamps in seconds for the segment of video to be annotated. The values must be within the length of the video, and TIME_SEGMENT_END must be after the TIME_SEGMENT_START.

Fields
gcs_destination

GcsDestination

The Google Cloud Storage location where the output from the predict command is to be written to. Does not apply for this product.

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.

TimeSegment

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

Fields
start_time_offset

Duration

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

end_time_offset

Duration

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

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

VideoClassificationAnnotation

Contains annotation details specific to video classification.

Fields
type

string

Output only. Expresses the type of video classification. Possible values:

  • segment - Classification done on a specified by user time segment of a video. AnnotationSpec is answered to be present in that time segment, if it is present in any part of it. The video ML model evaluations are done only for this type of classification.

  • shot- Shot-level classification. AutoML Video Intelligence determines the boundaries for each camera shot in the entire segment of the video that user specified in the request configuration. AutoML Video Intelligence then returns labels and their confidence scores for each detected shot, along with the start and end time of the shot. WARNING: Model evaluation is not done for this classification type, the quality of it depends on training data, but there are no metrics provided to describe that quality.

  • 1s_interval - AutoML Video Intelligence returns labels and their confidence scores for each second of the entire segment of the video that user specified in the request configuration. WARNING: Model evaluation is not done for this classification type, the quality of it depends on training data, but there are no metrics provided to describe that quality.

classification_annotation

ClassificationAnnotation

Output only . The classification details of this annotation.

time_segment

TimeSegment

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

VideoClassificationDatasetMetadata

Dataset metadata specific to video classification. All Video Classification datasets are treated as multi label.

VideoClassificationModelMetadata

Model metadata specific to video classification.