google-cloud-data_labeling-v1beta1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-data_labeling-v1beta1.rb +21 -0
- data/lib/google/cloud/data_labeling/v1beta1.rb +35 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service.rb +50 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb +3294 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/credentials.rb +51 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/operations.rb +570 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb +193 -0
- data/lib/google/cloud/data_labeling/v1beta1/version.rb +28 -0
- data/lib/google/cloud/datalabeling/v1beta1/annotation_pb.rb +178 -0
- data/lib/google/cloud/datalabeling/v1beta1/annotation_spec_set_pb.rb +33 -0
- data/lib/google/cloud/datalabeling/v1beta1/data_labeling_service_pb.rb +301 -0
- data/lib/google/cloud/datalabeling/v1beta1/data_labeling_service_services_pb.rb +132 -0
- data/lib/google/cloud/datalabeling/v1beta1/data_payloads_pb.rb +45 -0
- data/lib/google/cloud/datalabeling/v1beta1/dataset_pb.rb +142 -0
- data/lib/google/cloud/datalabeling/v1beta1/evaluation_job_pb.rb +71 -0
- data/lib/google/cloud/datalabeling/v1beta1/evaluation_pb.rb +93 -0
- data/lib/google/cloud/datalabeling/v1beta1/human_annotation_config_pb.rb +98 -0
- data/lib/google/cloud/datalabeling/v1beta1/instruction_pb.rb +42 -0
- data/lib/google/cloud/datalabeling/v1beta1/operations_pb.rb +124 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/annotation.rb +407 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/annotation_spec_set.rb +71 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/data_labeling_service.rb +839 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/data_payloads.rb +87 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/dataset.rb +354 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/evaluation.rb +225 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/evaluation_job.rb +280 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/human_annotation_config.rb +248 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/instruction.rb +88 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/operations.rb +279 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +227 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DataLabeling
|
23
|
+
module V1beta1
|
24
|
+
# Container of information about an image.
|
25
|
+
# @!attribute [rw] mime_type
|
26
|
+
# @return [::String]
|
27
|
+
# Image format.
|
28
|
+
# @!attribute [rw] image_thumbnail
|
29
|
+
# @return [::String]
|
30
|
+
# A byte string of a thumbnail image.
|
31
|
+
# @!attribute [rw] image_uri
|
32
|
+
# @return [::String]
|
33
|
+
# Image uri from the user bucket.
|
34
|
+
# @!attribute [rw] signed_uri
|
35
|
+
# @return [::String]
|
36
|
+
# Signed uri of the image file in the service bucket.
|
37
|
+
class ImagePayload
|
38
|
+
include ::Google::Protobuf::MessageExts
|
39
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
40
|
+
end
|
41
|
+
|
42
|
+
# Container of information about a piece of text.
|
43
|
+
# @!attribute [rw] text_content
|
44
|
+
# @return [::String]
|
45
|
+
# Text content.
|
46
|
+
class TextPayload
|
47
|
+
include ::Google::Protobuf::MessageExts
|
48
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
49
|
+
end
|
50
|
+
|
51
|
+
# Container of information of a video thumbnail.
|
52
|
+
# @!attribute [rw] thumbnail
|
53
|
+
# @return [::String]
|
54
|
+
# A byte string of the video frame.
|
55
|
+
# @!attribute [rw] time_offset
|
56
|
+
# @return [::Google::Protobuf::Duration]
|
57
|
+
# Time offset relative to the beginning of the video, corresponding to the
|
58
|
+
# video frame where the thumbnail has been extracted from.
|
59
|
+
class VideoThumbnail
|
60
|
+
include ::Google::Protobuf::MessageExts
|
61
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
62
|
+
end
|
63
|
+
|
64
|
+
# Container of information of a video.
|
65
|
+
# @!attribute [rw] mime_type
|
66
|
+
# @return [::String]
|
67
|
+
# Video format.
|
68
|
+
# @!attribute [rw] video_uri
|
69
|
+
# @return [::String]
|
70
|
+
# Video uri from the user bucket.
|
71
|
+
# @!attribute [rw] video_thumbnails
|
72
|
+
# @return [::Array<::Google::Cloud::DataLabeling::V1beta1::VideoThumbnail>]
|
73
|
+
# The list of video thumbnails.
|
74
|
+
# @!attribute [rw] frame_rate
|
75
|
+
# @return [::Float]
|
76
|
+
# FPS of the video.
|
77
|
+
# @!attribute [rw] signed_uri
|
78
|
+
# @return [::String]
|
79
|
+
# Signed uri of the video file in the service bucket.
|
80
|
+
class VideoPayload
|
81
|
+
include ::Google::Protobuf::MessageExts
|
82
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,354 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DataLabeling
|
23
|
+
module V1beta1
|
24
|
+
# Dataset is the resource to hold your data. You can request multiple labeling
|
25
|
+
# tasks for a dataset while each one will generate an AnnotatedDataset.
|
26
|
+
# @!attribute [rw] name
|
27
|
+
# @return [::String]
|
28
|
+
# Output only. Dataset resource name, format is:
|
29
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
30
|
+
# @!attribute [rw] display_name
|
31
|
+
# @return [::String]
|
32
|
+
# Required. The display name of the dataset. Maximum of 64 characters.
|
33
|
+
# @!attribute [rw] description
|
34
|
+
# @return [::String]
|
35
|
+
# Optional. User-provided description of the annotation specification set.
|
36
|
+
# The description can be up to 10000 characters long.
|
37
|
+
# @!attribute [rw] create_time
|
38
|
+
# @return [::Google::Protobuf::Timestamp]
|
39
|
+
# Output only. Time the dataset is created.
|
40
|
+
# @!attribute [rw] input_configs
|
41
|
+
# @return [::Array<::Google::Cloud::DataLabeling::V1beta1::InputConfig>]
|
42
|
+
# Output only. This is populated with the original input configs
|
43
|
+
# where ImportData is called. It is available only after the clients
|
44
|
+
# import data to this dataset.
|
45
|
+
# @!attribute [rw] blocking_resources
|
46
|
+
# @return [::Array<::String>]
|
47
|
+
# Output only. The names of any related resources that are blocking changes
|
48
|
+
# to the dataset.
|
49
|
+
# @!attribute [rw] data_item_count
|
50
|
+
# @return [::Integer]
|
51
|
+
# Output only. The number of data items in the dataset.
|
52
|
+
class Dataset
|
53
|
+
include ::Google::Protobuf::MessageExts
|
54
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
55
|
+
end
|
56
|
+
|
57
|
+
# The configuration of input data, including data type, location, etc.
|
58
|
+
# @!attribute [rw] text_metadata
|
59
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::TextMetadata]
|
60
|
+
# Required for text import, as language code must be specified.
|
61
|
+
# @!attribute [rw] gcs_source
|
62
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::GcsSource]
|
63
|
+
# Source located in Cloud Storage.
|
64
|
+
# @!attribute [rw] bigquery_source
|
65
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::BigQuerySource]
|
66
|
+
# Source located in BigQuery. You must specify this field if you are using
|
67
|
+
# this InputConfig in an {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob EvaluationJob}.
|
68
|
+
# @!attribute [rw] data_type
|
69
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::DataType]
|
70
|
+
# Required. Data type must be specifed when user tries to import data.
|
71
|
+
# @!attribute [rw] annotation_type
|
72
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotationType]
|
73
|
+
# Optional. The type of annotation to be performed on this data. You must
|
74
|
+
# specify this field if you are using this InputConfig in an
|
75
|
+
# {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob EvaluationJob}.
|
76
|
+
# @!attribute [rw] classification_metadata
|
77
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::ClassificationMetadata]
|
78
|
+
# Optional. Metadata about annotations for the input. You must specify this
|
79
|
+
# field if you are using this InputConfig in an {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob EvaluationJob} for a
|
80
|
+
# model version that performs classification.
|
81
|
+
class InputConfig
|
82
|
+
include ::Google::Protobuf::MessageExts
|
83
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
+
end
|
85
|
+
|
86
|
+
# Metadata for the text.
|
87
|
+
# @!attribute [rw] language_code
|
88
|
+
# @return [::String]
|
89
|
+
# The language of this text, as a
|
90
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
|
91
|
+
# Default value is en-US.
|
92
|
+
class TextMetadata
|
93
|
+
include ::Google::Protobuf::MessageExts
|
94
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
95
|
+
end
|
96
|
+
|
97
|
+
# Metadata for classification annotations.
|
98
|
+
# @!attribute [rw] is_multi_label
|
99
|
+
# @return [::Boolean]
|
100
|
+
# Whether the classification task is multi-label or not.
|
101
|
+
class ClassificationMetadata
|
102
|
+
include ::Google::Protobuf::MessageExts
|
103
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
104
|
+
end
|
105
|
+
|
106
|
+
# Source of the Cloud Storage file to be imported.
|
107
|
+
# @!attribute [rw] input_uri
|
108
|
+
# @return [::String]
|
109
|
+
# Required. The input URI of source file. This must be a Cloud Storage path
|
110
|
+
# (`gs://...`).
|
111
|
+
# @!attribute [rw] mime_type
|
112
|
+
# @return [::String]
|
113
|
+
# Required. The format of the source file. Only "text/csv" is supported.
|
114
|
+
class GcsSource
|
115
|
+
include ::Google::Protobuf::MessageExts
|
116
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
117
|
+
end
|
118
|
+
|
119
|
+
# The BigQuery location for input data. If used in an {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob EvaluationJob}, this
|
120
|
+
# is where the service saves the prediction input and output sampled from the
|
121
|
+
# model version.
|
122
|
+
# @!attribute [rw] input_uri
|
123
|
+
# @return [::String]
|
124
|
+
# Required. BigQuery URI to a table, up to 2,000 characters long. If you
|
125
|
+
# specify the URI of a table that does not exist, Data Labeling Service
|
126
|
+
# creates a table at the URI with the correct schema when you create your
|
127
|
+
# {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob EvaluationJob}. If you specify the URI of a table that already exists,
|
128
|
+
# it must have the
|
129
|
+
# [correct
|
130
|
+
# schema](/ml-engine/docs/continuous-evaluation/create-job#table-schema).
|
131
|
+
#
|
132
|
+
# Provide the table URI in the following format:
|
133
|
+
#
|
134
|
+
# "bq://<var>\\{your_project_id}</var>/<var>\\{your_dataset_name}</var>/<var>\\{your_table_name}</var>"
|
135
|
+
#
|
136
|
+
# [Learn
|
137
|
+
# more](/ml-engine/docs/continuous-evaluation/create-job#table-schema).
|
138
|
+
class BigQuerySource
|
139
|
+
include ::Google::Protobuf::MessageExts
|
140
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
141
|
+
end
|
142
|
+
|
143
|
+
# The configuration of output data.
|
144
|
+
# @!attribute [rw] gcs_destination
|
145
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::GcsDestination]
|
146
|
+
# Output to a file in Cloud Storage. Should be used for labeling output
|
147
|
+
# other than image segmentation.
|
148
|
+
# @!attribute [rw] gcs_folder_destination
|
149
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::GcsFolderDestination]
|
150
|
+
# Output to a folder in Cloud Storage. Should be used for image
|
151
|
+
# segmentation labeling output.
|
152
|
+
class OutputConfig
|
153
|
+
include ::Google::Protobuf::MessageExts
|
154
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
155
|
+
end
|
156
|
+
|
157
|
+
# Export destination of the data.Only gcs path is allowed in
|
158
|
+
# output_uri.
|
159
|
+
# @!attribute [rw] output_uri
|
160
|
+
# @return [::String]
|
161
|
+
# Required. The output uri of destination file.
|
162
|
+
# @!attribute [rw] mime_type
|
163
|
+
# @return [::String]
|
164
|
+
# Required. The format of the gcs destination. Only "text/csv" and
|
165
|
+
# "application/json"
|
166
|
+
# are supported.
|
167
|
+
class GcsDestination
|
168
|
+
include ::Google::Protobuf::MessageExts
|
169
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
170
|
+
end
|
171
|
+
|
172
|
+
# Export folder destination of the data.
|
173
|
+
# @!attribute [rw] output_folder_uri
|
174
|
+
# @return [::String]
|
175
|
+
# Required. Cloud Storage directory to export data to.
|
176
|
+
class GcsFolderDestination
|
177
|
+
include ::Google::Protobuf::MessageExts
|
178
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
179
|
+
end
|
180
|
+
|
181
|
+
# DataItem is a piece of data, without annotation. For example, an image.
|
182
|
+
# @!attribute [rw] image_payload
|
183
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::ImagePayload]
|
184
|
+
# The image payload, a container of the image bytes/uri.
|
185
|
+
# @!attribute [rw] text_payload
|
186
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::TextPayload]
|
187
|
+
# The text payload, a container of text content.
|
188
|
+
# @!attribute [rw] video_payload
|
189
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::VideoPayload]
|
190
|
+
# The video payload, a container of the video uri.
|
191
|
+
# @!attribute [rw] name
|
192
|
+
# @return [::String]
|
193
|
+
# Output only. Name of the data item, in format of:
|
194
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}/dataItems/\\{data_item_id}
|
195
|
+
class DataItem
|
196
|
+
include ::Google::Protobuf::MessageExts
|
197
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
198
|
+
end
|
199
|
+
|
200
|
+
# AnnotatedDataset is a set holding annotations for data in a Dataset. Each
|
201
|
+
# labeling task will generate an AnnotatedDataset under the Dataset that the
|
202
|
+
# task is requested for.
|
203
|
+
# @!attribute [rw] name
|
204
|
+
# @return [::String]
|
205
|
+
# Output only. AnnotatedDataset resource name in format of:
|
206
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}/annotatedDatasets/
|
207
|
+
# \\{annotated_dataset_id}
|
208
|
+
# @!attribute [rw] display_name
|
209
|
+
# @return [::String]
|
210
|
+
# Output only. The display name of the AnnotatedDataset. It is specified in
|
211
|
+
# HumanAnnotationConfig when user starts a labeling task. Maximum of 64
|
212
|
+
# characters.
|
213
|
+
# @!attribute [rw] description
|
214
|
+
# @return [::String]
|
215
|
+
# Output only. The description of the AnnotatedDataset. It is specified in
|
216
|
+
# HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
|
217
|
+
# characters.
|
218
|
+
# @!attribute [rw] annotation_source
|
219
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotationSource]
|
220
|
+
# Output only. Source of the annotation.
|
221
|
+
# @!attribute [rw] annotation_type
|
222
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotationType]
|
223
|
+
# Output only. Type of the annotation. It is specified when starting labeling
|
224
|
+
# task.
|
225
|
+
# @!attribute [rw] example_count
|
226
|
+
# @return [::Integer]
|
227
|
+
# Output only. Number of examples in the annotated dataset.
|
228
|
+
# @!attribute [rw] completed_example_count
|
229
|
+
# @return [::Integer]
|
230
|
+
# Output only. Number of examples that have annotation in the annotated
|
231
|
+
# dataset.
|
232
|
+
# @!attribute [rw] label_stats
|
233
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::LabelStats]
|
234
|
+
# Output only. Per label statistics.
|
235
|
+
# @!attribute [rw] create_time
|
236
|
+
# @return [::Google::Protobuf::Timestamp]
|
237
|
+
# Output only. Time the AnnotatedDataset was created.
|
238
|
+
# @!attribute [rw] metadata
|
239
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotatedDatasetMetadata]
|
240
|
+
# Output only. Additional information about AnnotatedDataset.
|
241
|
+
# @!attribute [rw] blocking_resources
|
242
|
+
# @return [::Array<::String>]
|
243
|
+
# Output only. The names of any related resources that are blocking changes
|
244
|
+
# to the annotated dataset.
|
245
|
+
class AnnotatedDataset
|
246
|
+
include ::Google::Protobuf::MessageExts
|
247
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
248
|
+
end
|
249
|
+
|
250
|
+
# Statistics about annotation specs.
|
251
|
+
# @!attribute [rw] example_count
|
252
|
+
# @return [::Google::Protobuf::Map{::String => ::Integer}]
|
253
|
+
# Map of each annotation spec's example count. Key is the annotation spec
|
254
|
+
# name and value is the number of examples for that annotation spec.
|
255
|
+
# If the annotated dataset does not have annotation spec, the map will return
|
256
|
+
# a pair where the key is empty string and value is the total number of
|
257
|
+
# annotations.
|
258
|
+
class LabelStats
|
259
|
+
include ::Google::Protobuf::MessageExts
|
260
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
261
|
+
|
262
|
+
# @!attribute [rw] key
|
263
|
+
# @return [::String]
|
264
|
+
# @!attribute [rw] value
|
265
|
+
# @return [::Integer]
|
266
|
+
class ExampleCountEntry
|
267
|
+
include ::Google::Protobuf::MessageExts
|
268
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# Metadata on AnnotatedDataset.
|
273
|
+
# @!attribute [rw] image_classification_config
|
274
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::ImageClassificationConfig]
|
275
|
+
# Configuration for image classification task.
|
276
|
+
# @!attribute [rw] bounding_poly_config
|
277
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::BoundingPolyConfig]
|
278
|
+
# Configuration for image bounding box and bounding poly task.
|
279
|
+
# @!attribute [rw] polyline_config
|
280
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::PolylineConfig]
|
281
|
+
# Configuration for image polyline task.
|
282
|
+
# @!attribute [rw] segmentation_config
|
283
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::SegmentationConfig]
|
284
|
+
# Configuration for image segmentation task.
|
285
|
+
# @!attribute [rw] video_classification_config
|
286
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::VideoClassificationConfig]
|
287
|
+
# Configuration for video classification task.
|
288
|
+
# @!attribute [rw] object_detection_config
|
289
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::ObjectDetectionConfig]
|
290
|
+
# Configuration for video object detection task.
|
291
|
+
# @!attribute [rw] object_tracking_config
|
292
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::ObjectTrackingConfig]
|
293
|
+
# Configuration for video object tracking task.
|
294
|
+
# @!attribute [rw] event_config
|
295
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::EventConfig]
|
296
|
+
# Configuration for video event labeling task.
|
297
|
+
# @!attribute [rw] text_classification_config
|
298
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::TextClassificationConfig]
|
299
|
+
# Configuration for text classification task.
|
300
|
+
# @!attribute [rw] text_entity_extraction_config
|
301
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::TextEntityExtractionConfig]
|
302
|
+
# Configuration for text entity extraction task.
|
303
|
+
# @!attribute [rw] human_annotation_config
|
304
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::HumanAnnotationConfig]
|
305
|
+
# HumanAnnotationConfig used when requesting the human labeling task for this
|
306
|
+
# AnnotatedDataset.
|
307
|
+
class AnnotatedDatasetMetadata
|
308
|
+
include ::Google::Protobuf::MessageExts
|
309
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
310
|
+
end
|
311
|
+
|
312
|
+
# An Example is a piece of data and its annotation. For example, an image with
|
313
|
+
# label "house".
|
314
|
+
# @!attribute [rw] image_payload
|
315
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::ImagePayload]
|
316
|
+
# The image payload, a container of the image bytes/uri.
|
317
|
+
# @!attribute [rw] text_payload
|
318
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::TextPayload]
|
319
|
+
# The text payload, a container of the text content.
|
320
|
+
# @!attribute [rw] video_payload
|
321
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::VideoPayload]
|
322
|
+
# The video payload, a container of the video uri.
|
323
|
+
# @!attribute [rw] name
|
324
|
+
# @return [::String]
|
325
|
+
# Output only. Name of the example, in format of:
|
326
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}/annotatedDatasets/
|
327
|
+
# \\{annotated_dataset_id}/examples/\\{example_id}
|
328
|
+
# @!attribute [rw] annotations
|
329
|
+
# @return [::Array<::Google::Cloud::DataLabeling::V1beta1::Annotation>]
|
330
|
+
# Output only. Annotations for the piece of data in Example.
|
331
|
+
# One piece of data can have multiple annotations.
|
332
|
+
class Example
|
333
|
+
include ::Google::Protobuf::MessageExts
|
334
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
335
|
+
end
|
336
|
+
|
337
|
+
module DataType
|
338
|
+
DATA_TYPE_UNSPECIFIED = 0
|
339
|
+
|
340
|
+
# Allowed for continuous evaluation.
|
341
|
+
IMAGE = 1
|
342
|
+
|
343
|
+
VIDEO = 2
|
344
|
+
|
345
|
+
# Allowed for continuous evaluation.
|
346
|
+
TEXT = 4
|
347
|
+
|
348
|
+
# Allowed for continuous evaluation.
|
349
|
+
GENERAL_DATA = 6
|
350
|
+
end
|
351
|
+
end
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
@@ -0,0 +1,225 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DataLabeling
|
23
|
+
module V1beta1
|
24
|
+
# Describes an evaluation between a machine learning model's predictions and
|
25
|
+
# ground truth labels. Created when an {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob EvaluationJob} runs successfully.
|
26
|
+
# @!attribute [rw] name
|
27
|
+
# @return [::String]
|
28
|
+
# Output only. Resource name of an evaluation. The name has the following
|
29
|
+
# format:
|
30
|
+
#
|
31
|
+
# "projects/<var>\\{project_id}</var>/datasets/<var>\\{dataset_id}</var>/evaluations/<var>\\{evaluation_id</var>}'
|
32
|
+
# @!attribute [rw] config
|
33
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::EvaluationConfig]
|
34
|
+
# Output only. Options used in the evaluation job that created this
|
35
|
+
# evaluation.
|
36
|
+
# @!attribute [rw] evaluation_job_run_time
|
37
|
+
# @return [::Google::Protobuf::Timestamp]
|
38
|
+
# Output only. Timestamp for when the evaluation job that created this
|
39
|
+
# evaluation ran.
|
40
|
+
# @!attribute [rw] create_time
|
41
|
+
# @return [::Google::Protobuf::Timestamp]
|
42
|
+
# Output only. Timestamp for when this evaluation was created.
|
43
|
+
# @!attribute [rw] evaluation_metrics
|
44
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::EvaluationMetrics]
|
45
|
+
# Output only. Metrics comparing predictions to ground truth labels.
|
46
|
+
# @!attribute [rw] annotation_type
|
47
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotationType]
|
48
|
+
# Output only. Type of task that the model version being evaluated performs,
|
49
|
+
# as defined in the
|
50
|
+
#
|
51
|
+
# {::Google::Cloud::DataLabeling::V1beta1::EvaluationJobConfig#input_config evaluationJobConfig.inputConfig.annotationType}
|
52
|
+
# field of the evaluation job that created this evaluation.
|
53
|
+
# @!attribute [rw] evaluated_item_count
|
54
|
+
# @return [::Integer]
|
55
|
+
# Output only. The number of items in the ground truth dataset that were used
|
56
|
+
# for this evaluation. Only populated when the evaulation is for certain
|
57
|
+
# AnnotationTypes.
|
58
|
+
class Evaluation
|
59
|
+
include ::Google::Protobuf::MessageExts
|
60
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
61
|
+
end
|
62
|
+
|
63
|
+
# Configuration details used for calculating evaluation metrics and creating an
|
64
|
+
# {::Google::Cloud::DataLabeling::V1beta1::Evaluation Evaluation}.
|
65
|
+
# @!attribute [rw] bounding_box_evaluation_options
|
66
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::BoundingBoxEvaluationOptions]
|
67
|
+
# Only specify this field if the related model performs image object
|
68
|
+
# detection (`IMAGE_BOUNDING_BOX_ANNOTATION`). Describes how to evaluate
|
69
|
+
# bounding boxes.
|
70
|
+
class EvaluationConfig
|
71
|
+
include ::Google::Protobuf::MessageExts
|
72
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
73
|
+
end
|
74
|
+
|
75
|
+
# Options regarding evaluation between bounding boxes.
|
76
|
+
# @!attribute [rw] iou_threshold
|
77
|
+
# @return [::Float]
|
78
|
+
# Minimum
|
79
|
+
# [intersection-over-union
|
80
|
+
#
|
81
|
+
# (IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union)
|
82
|
+
# required for 2 bounding boxes to be considered a match. This must be a
|
83
|
+
# number between 0 and 1.
|
84
|
+
class BoundingBoxEvaluationOptions
|
85
|
+
include ::Google::Protobuf::MessageExts
|
86
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
87
|
+
end
|
88
|
+
|
89
|
+
# @!attribute [rw] classification_metrics
|
90
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::ClassificationMetrics]
|
91
|
+
# @!attribute [rw] object_detection_metrics
|
92
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::ObjectDetectionMetrics]
|
93
|
+
class EvaluationMetrics
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
end
|
97
|
+
|
98
|
+
# Metrics calculated for a classification model.
|
99
|
+
# @!attribute [rw] pr_curve
|
100
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::PrCurve]
|
101
|
+
# Precision-recall curve based on ground truth labels, predicted labels, and
|
102
|
+
# scores for the predicted labels.
|
103
|
+
# @!attribute [rw] confusion_matrix
|
104
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::ConfusionMatrix]
|
105
|
+
# Confusion matrix of predicted labels vs. ground truth labels.
|
106
|
+
class ClassificationMetrics
|
107
|
+
include ::Google::Protobuf::MessageExts
|
108
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
109
|
+
end
|
110
|
+
|
111
|
+
# Metrics calculated for an image object detection (bounding box) model.
|
112
|
+
# @!attribute [rw] pr_curve
|
113
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::PrCurve]
|
114
|
+
# Precision-recall curve.
|
115
|
+
class ObjectDetectionMetrics
|
116
|
+
include ::Google::Protobuf::MessageExts
|
117
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
118
|
+
end
|
119
|
+
|
120
|
+
# @!attribute [rw] annotation_spec
|
121
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotationSpec]
|
122
|
+
# The annotation spec of the label for which the precision-recall curve
|
123
|
+
# calculated. If this field is empty, that means the precision-recall curve
|
124
|
+
# is an aggregate curve for all labels.
|
125
|
+
# @!attribute [rw] area_under_curve
|
126
|
+
# @return [::Float]
|
127
|
+
# Area under the precision-recall curve. Not to be confused with area under
|
128
|
+
# a receiver operating characteristic (ROC) curve.
|
129
|
+
# @!attribute [rw] confidence_metrics_entries
|
130
|
+
# @return [::Array<::Google::Cloud::DataLabeling::V1beta1::PrCurve::ConfidenceMetricsEntry>]
|
131
|
+
# Entries that make up the precision-recall graph. Each entry is a "point" on
|
132
|
+
# the graph drawn for a different `confidence_threshold`.
|
133
|
+
# @!attribute [rw] mean_average_precision
|
134
|
+
# @return [::Float]
|
135
|
+
# Mean average prcision of this curve.
|
136
|
+
class PrCurve
|
137
|
+
include ::Google::Protobuf::MessageExts
|
138
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
139
|
+
|
140
|
+
# @!attribute [rw] confidence_threshold
|
141
|
+
# @return [::Float]
|
142
|
+
# Threshold used for this entry.
|
143
|
+
#
|
144
|
+
# For classification tasks, this is a classification threshold: a
|
145
|
+
# predicted label is categorized as positive or negative (in the context of
|
146
|
+
# this point on the PR curve) based on whether the label's score meets this
|
147
|
+
# threshold.
|
148
|
+
#
|
149
|
+
# For image object detection (bounding box) tasks, this is the
|
150
|
+
# [intersection-over-union
|
151
|
+
#
|
152
|
+
# (IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union)
|
153
|
+
# threshold for the context of this point on the PR curve.
|
154
|
+
# @!attribute [rw] recall
|
155
|
+
# @return [::Float]
|
156
|
+
# Recall value.
|
157
|
+
# @!attribute [rw] precision
|
158
|
+
# @return [::Float]
|
159
|
+
# Precision value.
|
160
|
+
# @!attribute [rw] f1_score
|
161
|
+
# @return [::Float]
|
162
|
+
# Harmonic mean of recall and precision.
|
163
|
+
# @!attribute [rw] recall_at1
|
164
|
+
# @return [::Float]
|
165
|
+
# Recall value for entries with label that has highest score.
|
166
|
+
# @!attribute [rw] precision_at1
|
167
|
+
# @return [::Float]
|
168
|
+
# Precision value for entries with label that has highest score.
|
169
|
+
# @!attribute [rw] f1_score_at1
|
170
|
+
# @return [::Float]
|
171
|
+
# The harmonic mean of {::Google::Cloud::DataLabeling::V1beta1::PrCurve::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::DataLabeling::V1beta1::PrCurve::ConfidenceMetricsEntry#precision_at1 precision_at1}.
|
172
|
+
# @!attribute [rw] recall_at5
|
173
|
+
# @return [::Float]
|
174
|
+
# Recall value for entries with label that has highest 5 scores.
|
175
|
+
# @!attribute [rw] precision_at5
|
176
|
+
# @return [::Float]
|
177
|
+
# Precision value for entries with label that has highest 5 scores.
|
178
|
+
# @!attribute [rw] f1_score_at5
|
179
|
+
# @return [::Float]
|
180
|
+
# The harmonic mean of {::Google::Cloud::DataLabeling::V1beta1::PrCurve::ConfidenceMetricsEntry#recall_at5 recall_at5} and {::Google::Cloud::DataLabeling::V1beta1::PrCurve::ConfidenceMetricsEntry#precision_at5 precision_at5}.
|
181
|
+
class ConfidenceMetricsEntry
|
182
|
+
include ::Google::Protobuf::MessageExts
|
183
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Confusion matrix of the model running the classification. Only applicable
|
188
|
+
# when the metrics entry aggregates multiple labels. Not applicable when the
|
189
|
+
# entry is for a single label.
|
190
|
+
# @!attribute [rw] row
|
191
|
+
# @return [::Array<::Google::Cloud::DataLabeling::V1beta1::ConfusionMatrix::Row>]
|
192
|
+
class ConfusionMatrix
|
193
|
+
include ::Google::Protobuf::MessageExts
|
194
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
195
|
+
|
196
|
+
# @!attribute [rw] annotation_spec
|
197
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotationSpec]
|
198
|
+
# The annotation spec of a predicted label.
|
199
|
+
# @!attribute [rw] item_count
|
200
|
+
# @return [::Integer]
|
201
|
+
# Number of items predicted to have this label. (The ground truth label for
|
202
|
+
# these items is the `Row.annotationSpec` of this entry's parent.)
|
203
|
+
class ConfusionMatrixEntry
|
204
|
+
include ::Google::Protobuf::MessageExts
|
205
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
206
|
+
end
|
207
|
+
|
208
|
+
# A row in the confusion matrix. Each entry in this row has the same
|
209
|
+
# ground truth label.
|
210
|
+
# @!attribute [rw] annotation_spec
|
211
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotationSpec]
|
212
|
+
# The annotation spec of the ground truth label for this row.
|
213
|
+
# @!attribute [rw] entries
|
214
|
+
# @return [::Array<::Google::Cloud::DataLabeling::V1beta1::ConfusionMatrix::ConfusionMatrixEntry>]
|
215
|
+
# A list of the confusion matrix entries. One entry for each possible
|
216
|
+
# predicted label.
|
217
|
+
class Row
|
218
|
+
include ::Google::Protobuf::MessageExts
|
219
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|