Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
feat: add video object tracking support (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and callmehiphop committed Jun 11, 2019
1 parent 47364ab commit f9c737f
Show file tree
Hide file tree
Showing 51 changed files with 1,402 additions and 678 deletions.
19 changes: 11 additions & 8 deletions protos/google/cloud/automl/v1beta1/annotation_payload.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,21 +17,20 @@ syntax = "proto3";

package google.cloud.automl.v1beta1;

import "google/api/annotations.proto";
import "google/cloud/automl/v1beta1/classification.proto";
import "google/cloud/automl/v1beta1/detection.proto";
import "google/cloud/automl/v1beta1/tables.proto";
import "google/cloud/automl/v1beta1/text_extraction.proto";
import "google/cloud/automl/v1beta1/text_sentiment.proto";
import "google/cloud/automl/v1beta1/translation.proto";
import "google/protobuf/any.proto";
import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Contains annotation information that is relevant to AutoML.
message AnnotationPayload {
// Output only . Additional information about the annotation
Expand All @@ -50,6 +49,9 @@ message AnnotationPayload {
// Returned for Video Classification predictions.
VideoClassificationAnnotation video_classification = 9;

// Annotation details for video object tracking.
VideoObjectTrackingAnnotation video_object_tracking = 8;

// Annotation details for text extraction.
TextExtractionAnnotation text_extraction = 6;

Expand All @@ -65,10 +67,11 @@ message AnnotationPayload {
// ancestor dataset, or the dataset that was used to train the model in use.
string annotation_spec_id = 1;

// Output only. The value of [AnnotationSpec.display_name][google.cloud.automl.v1beta1.AnnotationSpec.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.
// Output only. The value of
// [display_name][google.cloud.automl.v1beta1.AnnotationSpec.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.
string display_name = 5;
}
44 changes: 44 additions & 0 deletions protos/google/cloud/automl/v1beta1/annotation_spec.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

package google.cloud.automl.v1beta1;

import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";

// A definition of an annotation spec.
message AnnotationSpec {
// Output only. Resource name of the annotation spec.
// Form:
//
// 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
string name = 1;

// Required.
// The name of the annotation spec to show in the interface. The name can be
// up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
// (_), and ASCII digits 0-9.
string display_name = 2;

// Output only. The number of examples in the parent dataset
// labeled by the annotation spec.
int32 example_count = 9;
}
41 changes: 23 additions & 18 deletions protos/google/cloud/automl/v1beta1/classification.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,14 +17,25 @@ syntax = "proto3";

package google.cloud.automl.v1beta1;

import "google/api/annotations.proto";
import "google/cloud/automl/v1beta1/temporal.proto";
import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
option java_outer_classname = "ClassificationProto";
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";

// Type of the classification problem.
enum ClassificationType {
// An un-set value of this enum.
CLASSIFICATION_TYPE_UNSPECIFIED = 0;

// At most one label is allowed per example.
MULTICLASS = 1;

// Multiple labels are allowed for one example.
MULTILABEL = 2;
}

// Contains annotation details specific to classification.
message ClassificationAnnotation {
Expand Down Expand Up @@ -140,11 +151,16 @@ message ClassificationEvaluationMetrics {
message Row {
// 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.
// to the length of the `annotation_spec_id` field or, if that one is not
// populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
repeated int32 example_count = 1;
}

// Output only. IDs of the annotation specs used in the confusion matrix.
// For Tables CLASSIFICATION
//
// [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
// only list of [annotation_spec_display_name-s][] is populated.
repeated string annotation_spec_id = 1;

// Output only. Rows in the confusion matrix. The number of rows is equal to
Expand Down Expand Up @@ -174,9 +190,10 @@ message ClassificationEvaluationMetrics {
// 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.
// Precision-recall curve is derived from them.
// The above metrics may also be supplied for additional values of
// position_threshold.
// 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.
repeated ConfidenceMetricsEntry confidence_metrics_entry = 3;

// Output only. Confusion matrix of the evaluation.
Expand All @@ -188,15 +205,3 @@ message ClassificationEvaluationMetrics {
// Output only. The annotation spec ids used for this evaluation.
repeated string annotation_spec_id = 5;
}

// Type of the classification problem.
enum ClassificationType {
// Should not be used, an un-set enum has this value by default.
CLASSIFICATION_TYPE_UNSPECIFIED = 0;

// At most one label is allowed per example.
MULTICLASS = 1;

// Multiple labels are allowed for one example.
MULTILABEL = 2;
}
5 changes: 2 additions & 3 deletions protos/google/cloud/automl/v1beta1/column_spec.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,16 +17,15 @@ syntax = "proto3";

package google.cloud.automl.v1beta1;

import "google/api/annotations.proto";
import "google/cloud/automl/v1beta1/data_stats.proto";
import "google/cloud/automl/v1beta1/data_types.proto";
import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were
// given on import .
// Used by:
Expand Down
9 changes: 5 additions & 4 deletions protos/google/cloud/automl/v1beta1/data_items.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,18 +17,17 @@ syntax = "proto3";

package google.cloud.automl.v1beta1;

import "google/api/annotations.proto";
import "google/cloud/automl/v1beta1/io.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// A representation of an image.
// Only images up to 30MB in size are supported.
message Image {
Expand Down Expand Up @@ -73,6 +72,7 @@ message Document {

// A representation of a row in a relational table.
message Row {
// Input Only.
// The resource IDs of the column specs describing the columns of the row.
// If set must contain, but possibly in a different order, all input feature
//
Expand All @@ -82,7 +82,8 @@ message Row {
// field is set.
repeated string column_spec_ids = 2;

// Required. The values of the row cells, given in the same order as the
// Input Only.
// The values of the row cells, given in the same order as the
// column_spec_ids, or, if not set, then in the same order as input feature
//
// [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
Expand Down
6 changes: 4 additions & 2 deletions protos/google/cloud/automl/v1beta1/data_stats.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -24,7 +24,6 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// The data statistics of a series of values that share the same DataType.
message DataStats {
// The data statistics specific to a DataType.
Expand Down Expand Up @@ -53,6 +52,9 @@ message DataStats {

// The number of values that are null.
int64 null_value_count = 2;

// The number of values that are valid.
int64 valid_value_count = 9;
}

// The data statistics of a series of FLOAT64 values.
Expand Down
91 changes: 44 additions & 47 deletions protos/google/cloud/automl/v1beta1/data_types.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC.
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -18,58 +18,12 @@ syntax = "proto3";
package google.cloud.automl.v1beta1;

import "google/api/annotations.proto";
import "google/cloud/automl/v1beta1/io.proto";
import "google/cloud/automl/v1beta1/text_extraction.proto";
import "google/protobuf/any.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
option java_multiple_files = true;
option java_package = "com.google.cloud.automl.v1beta1";
option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";


// Indicated the type of data that can be stored in a structured data entity
// (e.g. a table).
message DataType {
// Details of DataType-s that need additional specification.
oneof details {
// If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
// then `list_element_type` is the type of the elements.
DataType list_element_type = 2;

// If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
// provides type information for the struct's fields.
StructType struct_type = 3;

// If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
// then `time_format` provides the format in which that time field is
// expressed. The time_format must either be one of:
// * `UNIX_SECONDS`
// * `UNIX_MILLISECONDS`
// * `UNIX_MICROSECONDS`
// * `UNIX_NANOSECONDS`
// (for respectively number of seconds, milliseconds, microseconds and
// nanoseconds since start of the Unix epoch);
// or be written in `strftime` syntax. If time_format is not set, then the
// default format as described on the type_code is used.
string time_format = 5;
}

// Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
TypeCode type_code = 1;

// If true, this DataType can also be `null`.
bool nullable = 4;
}

// `StructType` defines the DataType-s of a [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT] type.
message StructType {
// Unordered map of struct field names to their data types.
// Fields cannot be added or removed via Update. Their names and
// data types are still mutable.
map<string, DataType> fields = 1;
}

// `TypeCode` is used as a part of
// [DataType][google.cloud.automl.v1beta1.DataType].
//
Expand Down Expand Up @@ -114,3 +68,46 @@ enum TypeCode {
// 4648, section 4).
CATEGORY = 10;
}

// Indicated the type of data that can be stored in a structured data entity
// (e.g. a table).
message DataType {
// Details of DataType-s that need additional specification.
oneof details {
// If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
// then `list_element_type` is the type of the elements.
DataType list_element_type = 2;

// If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
// provides type information for the struct's fields.
StructType struct_type = 3;

// If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
// then `time_format` provides the format in which that time field is
// expressed. The time_format must either be one of:
// * `UNIX_SECONDS`
// * `UNIX_MILLISECONDS`
// * `UNIX_MICROSECONDS`
// * `UNIX_NANOSECONDS`
// (for respectively number of seconds, milliseconds, microseconds and
// nanoseconds since start of the Unix epoch);
// or be written in `strftime` syntax. If time_format is not set, then the
// default format as described on the type_code is used.
string time_format = 5;
}

// Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
TypeCode type_code = 1;

// If true, this DataType can also be `NULL`. In .CSV files `NULL` value is
// expressed as an empty string.
bool nullable = 4;
}

// `StructType` defines the DataType-s of a [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT] type.
message StructType {
// Unordered map of struct field names to their data types.
// Fields cannot be added or removed via Update. Their names and
// data types are still mutable.
map<string, DataType> fields = 1;
}

0 comments on commit f9c737f

Please sign in to comment.