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.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +75 -0
  6. data/lib/google-cloud-data_labeling-v1beta1.rb +21 -0
  7. data/lib/google/cloud/data_labeling/v1beta1.rb +35 -0
  8. data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service.rb +50 -0
  9. data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb +3294 -0
  10. data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/credentials.rb +51 -0
  11. data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/operations.rb +570 -0
  12. data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb +193 -0
  13. data/lib/google/cloud/data_labeling/v1beta1/version.rb +28 -0
  14. data/lib/google/cloud/datalabeling/v1beta1/annotation_pb.rb +178 -0
  15. data/lib/google/cloud/datalabeling/v1beta1/annotation_spec_set_pb.rb +33 -0
  16. data/lib/google/cloud/datalabeling/v1beta1/data_labeling_service_pb.rb +301 -0
  17. data/lib/google/cloud/datalabeling/v1beta1/data_labeling_service_services_pb.rb +132 -0
  18. data/lib/google/cloud/datalabeling/v1beta1/data_payloads_pb.rb +45 -0
  19. data/lib/google/cloud/datalabeling/v1beta1/dataset_pb.rb +142 -0
  20. data/lib/google/cloud/datalabeling/v1beta1/evaluation_job_pb.rb +71 -0
  21. data/lib/google/cloud/datalabeling/v1beta1/evaluation_pb.rb +93 -0
  22. data/lib/google/cloud/datalabeling/v1beta1/human_annotation_config_pb.rb +98 -0
  23. data/lib/google/cloud/datalabeling/v1beta1/instruction_pb.rb +42 -0
  24. data/lib/google/cloud/datalabeling/v1beta1/operations_pb.rb +124 -0
  25. data/proto_docs/README.md +4 -0
  26. data/proto_docs/google/api/field_behavior.rb +59 -0
  27. data/proto_docs/google/api/resource.rb +283 -0
  28. data/proto_docs/google/cloud/datalabeling/v1beta1/annotation.rb +407 -0
  29. data/proto_docs/google/cloud/datalabeling/v1beta1/annotation_spec_set.rb +71 -0
  30. data/proto_docs/google/cloud/datalabeling/v1beta1/data_labeling_service.rb +839 -0
  31. data/proto_docs/google/cloud/datalabeling/v1beta1/data_payloads.rb +87 -0
  32. data/proto_docs/google/cloud/datalabeling/v1beta1/dataset.rb +354 -0
  33. data/proto_docs/google/cloud/datalabeling/v1beta1/evaluation.rb +225 -0
  34. data/proto_docs/google/cloud/datalabeling/v1beta1/evaluation_job.rb +280 -0
  35. data/proto_docs/google/cloud/datalabeling/v1beta1/human_annotation_config.rb +248 -0
  36. data/proto_docs/google/cloud/datalabeling/v1beta1/instruction.rb +88 -0
  37. data/proto_docs/google/cloud/datalabeling/v1beta1/operations.rb +279 -0
  38. data/proto_docs/google/longrunning/operations.rb +150 -0
  39. data/proto_docs/google/protobuf/any.rb +138 -0
  40. data/proto_docs/google/protobuf/duration.rb +98 -0
  41. data/proto_docs/google/protobuf/empty.rb +36 -0
  42. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  43. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  44. data/proto_docs/google/rpc/status.rb +46 -0
  45. metadata +227 -0
@@ -0,0 +1,280 @@
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
+ # Defines an evaluation job that runs periodically to generate
25
+ # {::Google::Cloud::DataLabeling::V1beta1::Evaluation Evaluations}. [Creating an evaluation
26
+ # job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point
27
+ # for using continuous evaluation.
28
+ # @!attribute [rw] name
29
+ # @return [::String]
30
+ # Output only. After you create a job, Data Labeling Service assigns a name
31
+ # to the job with the following format:
32
+ #
33
+ # "projects/<var>\\{project_id}</var>/evaluationJobs/<var>\\{evaluation_job_id}</var>"
34
+ # @!attribute [rw] description
35
+ # @return [::String]
36
+ # Required. Description of the job. The description can be up to 25,000
37
+ # characters long.
38
+ # @!attribute [rw] state
39
+ # @return [::Google::Cloud::DataLabeling::V1beta1::EvaluationJob::State]
40
+ # Output only. Describes the current state of the job.
41
+ # @!attribute [rw] schedule
42
+ # @return [::String]
43
+ # Required. Describes the interval at which the job runs. This interval must
44
+ # be at least 1 day, and it is rounded to the nearest day. For example, if
45
+ # you specify a 50-hour interval, the job runs every 2 days.
46
+ #
47
+ # You can provide the schedule in
48
+ # [crontab format](/scheduler/docs/configuring/cron-job-schedules) or in an
49
+ # [English-like
50
+ # format](/appengine/docs/standard/python/config/cronref#schedule_format).
51
+ #
52
+ # Regardless of what you specify, the job will run at 10:00 AM UTC. Only the
53
+ # interval from this schedule is used, not the specific time of day.
54
+ # @!attribute [rw] model_version
55
+ # @return [::String]
56
+ # Required. The [AI Platform Prediction model
57
+ # version](/ml-engine/docs/prediction-overview) to be evaluated. Prediction
58
+ # input and output is sampled from this model version. When creating an
59
+ # evaluation job, specify the model version in the following format:
60
+ #
61
+ # "projects/<var>\\{project_id}</var>/models/<var>\\{model_name}</var>/versions/<var>\\{version_name}</var>"
62
+ #
63
+ # There can only be one evaluation job per model version.
64
+ # @!attribute [rw] evaluation_job_config
65
+ # @return [::Google::Cloud::DataLabeling::V1beta1::EvaluationJobConfig]
66
+ # Required. Configuration details for the evaluation job.
67
+ # @!attribute [rw] annotation_spec_set
68
+ # @return [::String]
69
+ # Required. Name of the {::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet AnnotationSpecSet} describing all the
70
+ # labels that your machine learning model outputs. You must create this
71
+ # resource before you create an evaluation job and provide its name in the
72
+ # following format:
73
+ #
74
+ # "projects/<var>\\{project_id}</var>/annotationSpecSets/<var>\\{annotation_spec_set_id}</var>"
75
+ # @!attribute [rw] label_missing_ground_truth
76
+ # @return [::Boolean]
77
+ # Required. Whether you want Data Labeling Service to provide ground truth
78
+ # labels for prediction input. If you want the service to assign human
79
+ # labelers to annotate your data, set this to `true`. If you want to provide
80
+ # your own ground truth labels in the evaluation job's BigQuery table, set
81
+ # this to `false`.
82
+ # @!attribute [rw] attempts
83
+ # @return [::Array<::Google::Cloud::DataLabeling::V1beta1::Attempt>]
84
+ # Output only. Every time the evaluation job runs and an error occurs, the
85
+ # failed attempt is appended to this array.
86
+ # @!attribute [rw] create_time
87
+ # @return [::Google::Protobuf::Timestamp]
88
+ # Output only. Timestamp of when this evaluation job was created.
89
+ class EvaluationJob
90
+ include ::Google::Protobuf::MessageExts
91
+ extend ::Google::Protobuf::MessageExts::ClassMethods
92
+
93
+ # State of the job.
94
+ module State
95
+ STATE_UNSPECIFIED = 0
96
+
97
+ # The job is scheduled to run at the {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#schedule configured interval}. You
98
+ # can {::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client#pause_evaluation_job pause} or
99
+ # {::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client#delete_evaluation_job delete} the job.
100
+ #
101
+ # When the job is in this state, it samples prediction input and output
102
+ # from your model version into your BigQuery table as predictions occur.
103
+ SCHEDULED = 1
104
+
105
+ # The job is currently running. When the job runs, Data Labeling Service
106
+ # does several things:
107
+ #
108
+ # 1. If you have configured your job to use Data Labeling Service for
109
+ # ground truth labeling, the service creates a
110
+ # {::Google::Cloud::DataLabeling::V1beta1::Dataset Dataset} and a labeling task for all data sampled
111
+ # since the last time the job ran. Human labelers provide ground truth
112
+ # labels for your data. Human labeling may take hours, or even days,
113
+ # depending on how much data has been sampled. The job remains in the
114
+ # `RUNNING` state during this time, and it can even be running multiple
115
+ # times in parallel if it gets triggered again (for example 24 hours
116
+ # later) before the earlier run has completed. When human labelers have
117
+ # finished labeling the data, the next step occurs.
118
+ # <br><br>
119
+ # If you have configured your job to provide your own ground truth
120
+ # labels, Data Labeling Service still creates a {::Google::Cloud::DataLabeling::V1beta1::Dataset Dataset} for newly
121
+ # sampled data, but it expects that you have already added ground truth
122
+ # labels to the BigQuery table by this time. The next step occurs
123
+ # immediately.
124
+ #
125
+ # 2. Data Labeling Service creates an {::Google::Cloud::DataLabeling::V1beta1::Evaluation Evaluation} by comparing your
126
+ # model version's predictions with the ground truth labels.
127
+ #
128
+ # If the job remains in this state for a long time, it continues to sample
129
+ # prediction data into your BigQuery table and will run again at the next
130
+ # interval, even if it causes the job to run multiple times in parallel.
131
+ RUNNING = 2
132
+
133
+ # The job is not sampling prediction input and output into your BigQuery
134
+ # table and it will not run according to its schedule. You can
135
+ # {::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client#resume_evaluation_job resume} the job.
136
+ PAUSED = 3
137
+
138
+ # The job has this state right before it is deleted.
139
+ STOPPED = 4
140
+ end
141
+ end
142
+
143
+ # Configures specific details of how a continuous evaluation job works. Provide
144
+ # this configuration when you create an EvaluationJob.
145
+ # @!attribute [rw] image_classification_config
146
+ # @return [::Google::Cloud::DataLabeling::V1beta1::ImageClassificationConfig]
147
+ # Specify this field if your model version performs image classification or
148
+ # general classification.
149
+ #
150
+ # `annotationSpecSet` in this configuration must match
151
+ # {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#annotation_spec_set EvaluationJob.annotationSpecSet}.
152
+ # `allowMultiLabel` in this configuration must match
153
+ # `classificationMetadata.isMultiLabel` in {::Google::Cloud::DataLabeling::V1beta1::EvaluationJobConfig#input_config input_config}.
154
+ # @!attribute [rw] bounding_poly_config
155
+ # @return [::Google::Cloud::DataLabeling::V1beta1::BoundingPolyConfig]
156
+ # Specify this field if your model version performs image object detection
157
+ # (bounding box detection).
158
+ #
159
+ # `annotationSpecSet` in this configuration must match
160
+ # {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#annotation_spec_set EvaluationJob.annotationSpecSet}.
161
+ # @!attribute [rw] text_classification_config
162
+ # @return [::Google::Cloud::DataLabeling::V1beta1::TextClassificationConfig]
163
+ # Specify this field if your model version performs text classification.
164
+ #
165
+ # `annotationSpecSet` in this configuration must match
166
+ # {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#annotation_spec_set EvaluationJob.annotationSpecSet}.
167
+ # `allowMultiLabel` in this configuration must match
168
+ # `classificationMetadata.isMultiLabel` in {::Google::Cloud::DataLabeling::V1beta1::EvaluationJobConfig#input_config input_config}.
169
+ # @!attribute [rw] input_config
170
+ # @return [::Google::Cloud::DataLabeling::V1beta1::InputConfig]
171
+ # Rquired. Details for the sampled prediction input. Within this
172
+ # configuration, there are requirements for several fields:
173
+ #
174
+ # * `dataType` must be one of `IMAGE`, `TEXT`, or `GENERAL_DATA`.
175
+ # * `annotationType` must be one of `IMAGE_CLASSIFICATION_ANNOTATION`,
176
+ # `TEXT_CLASSIFICATION_ANNOTATION`, `GENERAL_CLASSIFICATION_ANNOTATION`,
177
+ # or `IMAGE_BOUNDING_BOX_ANNOTATION` (image object detection).
178
+ # * If your machine learning model performs classification, you must specify
179
+ # `classificationMetadata.isMultiLabel`.
180
+ # * You must specify `bigquerySource` (not `gcsSource`).
181
+ # @!attribute [rw] evaluation_config
182
+ # @return [::Google::Cloud::DataLabeling::V1beta1::EvaluationConfig]
183
+ # Required. Details for calculating evaluation metrics and creating
184
+ # {::Google::Cloud::DataLabeling::V1beta1::Evaluation Evaulations}. If your model version performs image object
185
+ # detection, you must specify the `boundingBoxEvaluationOptions` field within
186
+ # this configuration. Otherwise, provide an empty object for this
187
+ # configuration.
188
+ # @!attribute [rw] human_annotation_config
189
+ # @return [::Google::Cloud::DataLabeling::V1beta1::HumanAnnotationConfig]
190
+ # Optional. Details for human annotation of your data. If you set
191
+ # {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#label_missing_ground_truth labelMissingGroundTruth} to
192
+ # `true` for this evaluation job, then you must specify this field. If you
193
+ # plan to provide your own ground truth labels, then omit this field.
194
+ #
195
+ # Note that you must create an {::Google::Cloud::DataLabeling::V1beta1::Instruction Instruction} resource before you can
196
+ # specify this field. Provide the name of the instruction resource in the
197
+ # `instruction` field within this configuration.
198
+ # @!attribute [rw] bigquery_import_keys
199
+ # @return [::Google::Protobuf::Map{::String => ::String}]
200
+ # Required. Prediction keys that tell Data Labeling Service where to find the
201
+ # data for evaluation in your BigQuery table. When the service samples
202
+ # prediction input and output from your model version and saves it to
203
+ # BigQuery, the data gets stored as JSON strings in the BigQuery table. These
204
+ # keys tell Data Labeling Service how to parse the JSON.
205
+ #
206
+ # You can provide the following entries in this field:
207
+ #
208
+ # * `data_json_key`: the data key for prediction input. You must provide
209
+ # either this key or `reference_json_key`.
210
+ # * `reference_json_key`: the data reference key for prediction input. You
211
+ # must provide either this key or `data_json_key`.
212
+ # * `label_json_key`: the label key for prediction output. Required.
213
+ # * `label_score_json_key`: the score key for prediction output. Required.
214
+ # * `bounding_box_json_key`: the bounding box key for prediction output.
215
+ # Required if your model version perform image object detection.
216
+ #
217
+ # Learn [how to configure prediction
218
+ # keys](/ml-engine/docs/continuous-evaluation/create-job#prediction-keys).
219
+ # @!attribute [rw] example_count
220
+ # @return [::Integer]
221
+ # Required. The maximum number of predictions to sample and save to BigQuery
222
+ # during each {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#schedule evaluation interval}. This limit
223
+ # overrides `example_sample_percentage`: even if the service has not sampled
224
+ # enough predictions to fulfill `example_sample_perecentage` during an
225
+ # interval, it stops sampling predictions when it meets this limit.
226
+ # @!attribute [rw] example_sample_percentage
227
+ # @return [::Float]
228
+ # Required. Fraction of predictions to sample and save to BigQuery during
229
+ # each {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#schedule evaluation interval}. For example, 0.1 means
230
+ # 10% of predictions served by your model version get saved to BigQuery.
231
+ # @!attribute [rw] evaluation_job_alert_config
232
+ # @return [::Google::Cloud::DataLabeling::V1beta1::EvaluationJobAlertConfig]
233
+ # Optional. Configuration details for evaluation job alerts. Specify this
234
+ # field if you want to receive email alerts if the evaluation job finds that
235
+ # your predictions have low mean average precision during a run.
236
+ class EvaluationJobConfig
237
+ include ::Google::Protobuf::MessageExts
238
+ extend ::Google::Protobuf::MessageExts::ClassMethods
239
+
240
+ # @!attribute [rw] key
241
+ # @return [::String]
242
+ # @!attribute [rw] value
243
+ # @return [::String]
244
+ class BigqueryImportKeysEntry
245
+ include ::Google::Protobuf::MessageExts
246
+ extend ::Google::Protobuf::MessageExts::ClassMethods
247
+ end
248
+ end
249
+
250
+ # Provides details for how an evaluation job sends email alerts based on the
251
+ # results of a run.
252
+ # @!attribute [rw] email
253
+ # @return [::String]
254
+ # Required. An email address to send alerts to.
255
+ # @!attribute [rw] min_acceptable_mean_average_precision
256
+ # @return [::Float]
257
+ # Required. A number between 0 and 1 that describes a minimum mean average
258
+ # precision threshold. When the evaluation job runs, if it calculates that
259
+ # your model version's predictions from the recent interval have
260
+ # {::Google::Cloud::DataLabeling::V1beta1::PrCurve#mean_average_precision meanAveragePrecision} below this
261
+ # threshold, then it sends an alert to your specified email.
262
+ class EvaluationJobAlertConfig
263
+ include ::Google::Protobuf::MessageExts
264
+ extend ::Google::Protobuf::MessageExts::ClassMethods
265
+ end
266
+
267
+ # Records a failed evaluation job run.
268
+ # @!attribute [rw] attempt_time
269
+ # @return [::Google::Protobuf::Timestamp]
270
+ # @!attribute [rw] partial_failures
271
+ # @return [::Array<::Google::Rpc::Status>]
272
+ # Details of errors that occurred.
273
+ class Attempt
274
+ include ::Google::Protobuf::MessageExts
275
+ extend ::Google::Protobuf::MessageExts::ClassMethods
276
+ end
277
+ end
278
+ end
279
+ end
280
+ end
@@ -0,0 +1,248 @@
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
+ # Configuration for how human labeling task should be done.
25
+ # @!attribute [rw] instruction
26
+ # @return [::String]
27
+ # Required. Instruction resource name.
28
+ # @!attribute [rw] annotated_dataset_display_name
29
+ # @return [::String]
30
+ # Required. A human-readable name for AnnotatedDataset defined by
31
+ # users. Maximum of 64 characters
32
+ # .
33
+ # @!attribute [rw] annotated_dataset_description
34
+ # @return [::String]
35
+ # Optional. A human-readable description for AnnotatedDataset.
36
+ # The description can be up to 10000 characters long.
37
+ # @!attribute [rw] label_group
38
+ # @return [::String]
39
+ # Optional. A human-readable label used to logically group labeling tasks.
40
+ # This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
41
+ # @!attribute [rw] language_code
42
+ # @return [::String]
43
+ # Optional. The Language of this question, as a
44
+ # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
45
+ # Default value is en-US.
46
+ # Only need to set this when task is language related. For example, French
47
+ # text classification.
48
+ # @!attribute [rw] replica_count
49
+ # @return [::Integer]
50
+ # Optional. Replication of questions. Each question will be sent to up to
51
+ # this number of contributors to label. Aggregated answers will be returned.
52
+ # Default is set to 1.
53
+ # For image related labeling, valid values are 1, 3, 5.
54
+ # @!attribute [rw] question_duration
55
+ # @return [::Google::Protobuf::Duration]
56
+ # Optional. Maximum duration for contributors to answer a question. Maximum
57
+ # is 3600 seconds. Default is 3600 seconds.
58
+ # @!attribute [rw] contributor_emails
59
+ # @return [::Array<::String>]
60
+ # Optional. If you want your own labeling contributors to manage and work on
61
+ # this labeling request, you can set these contributors here. We will give
62
+ # them access to the question types in crowdcompute. Note that these
63
+ # emails must be registered in crowdcompute worker UI:
64
+ # https://crowd-compute.appspot.com/
65
+ # @!attribute [rw] user_email_address
66
+ # @return [::String]
67
+ # Email of the user who started the labeling task and should be notified by
68
+ # email. If empty no notification will be sent.
69
+ class HumanAnnotationConfig
70
+ include ::Google::Protobuf::MessageExts
71
+ extend ::Google::Protobuf::MessageExts::ClassMethods
72
+ end
73
+
74
+ # Config for image classification human labeling task.
75
+ # @!attribute [rw] annotation_spec_set
76
+ # @return [::String]
77
+ # Required. Annotation spec set resource name.
78
+ # @!attribute [rw] allow_multi_label
79
+ # @return [::Boolean]
80
+ # Optional. If allow_multi_label is true, contributors are able to choose
81
+ # multiple labels for one image.
82
+ # @!attribute [rw] answer_aggregation_type
83
+ # @return [::Google::Cloud::DataLabeling::V1beta1::StringAggregationType]
84
+ # Optional. The type of how to aggregate answers.
85
+ class ImageClassificationConfig
86
+ include ::Google::Protobuf::MessageExts
87
+ extend ::Google::Protobuf::MessageExts::ClassMethods
88
+ end
89
+
90
+ # Config for image bounding poly (and bounding box) human labeling task.
91
+ # @!attribute [rw] annotation_spec_set
92
+ # @return [::String]
93
+ # Required. Annotation spec set resource name.
94
+ # @!attribute [rw] instruction_message
95
+ # @return [::String]
96
+ # Optional. Instruction message showed on contributors UI.
97
+ class BoundingPolyConfig
98
+ include ::Google::Protobuf::MessageExts
99
+ extend ::Google::Protobuf::MessageExts::ClassMethods
100
+ end
101
+
102
+ # Config for image polyline human labeling task.
103
+ # @!attribute [rw] annotation_spec_set
104
+ # @return [::String]
105
+ # Required. Annotation spec set resource name.
106
+ # @!attribute [rw] instruction_message
107
+ # @return [::String]
108
+ # Optional. Instruction message showed on contributors UI.
109
+ class PolylineConfig
110
+ include ::Google::Protobuf::MessageExts
111
+ extend ::Google::Protobuf::MessageExts::ClassMethods
112
+ end
113
+
114
+ # Config for image segmentation
115
+ # @!attribute [rw] annotation_spec_set
116
+ # @return [::String]
117
+ # Required. Annotation spec set resource name. format:
118
+ # projects/\\{project_id}/annotationSpecSets/\\{annotation_spec_set_id}
119
+ # @!attribute [rw] instruction_message
120
+ # @return [::String]
121
+ # Instruction message showed on labelers UI.
122
+ class SegmentationConfig
123
+ include ::Google::Protobuf::MessageExts
124
+ extend ::Google::Protobuf::MessageExts::ClassMethods
125
+ end
126
+
127
+ # Config for video classification human labeling task.
128
+ # Currently two types of video classification are supported:
129
+ # 1. Assign labels on the entire video.
130
+ # 2. Split the video into multiple video clips based on camera shot, and
131
+ # assign labels on each video clip.
132
+ # @!attribute [rw] annotation_spec_set_configs
133
+ # @return [::Array<::Google::Cloud::DataLabeling::V1beta1::VideoClassificationConfig::AnnotationSpecSetConfig>]
134
+ # Required. The list of annotation spec set configs.
135
+ # Since watching a video clip takes much longer time than an image, we
136
+ # support label with multiple AnnotationSpecSet at the same time. Labels
137
+ # in each AnnotationSpecSet will be shown in a group to contributors.
138
+ # Contributors can select one or more (depending on whether to allow multi
139
+ # label) from each group.
140
+ # @!attribute [rw] apply_shot_detection
141
+ # @return [::Boolean]
142
+ # Optional. Option to apply shot detection on the video.
143
+ class VideoClassificationConfig
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+
147
+ # Annotation spec set with the setting of allowing multi labels or not.
148
+ # @!attribute [rw] annotation_spec_set
149
+ # @return [::String]
150
+ # Required. Annotation spec set resource name.
151
+ # @!attribute [rw] allow_multi_label
152
+ # @return [::Boolean]
153
+ # Optional. If allow_multi_label is true, contributors are able to
154
+ # choose multiple labels from one annotation spec set.
155
+ class AnnotationSpecSetConfig
156
+ include ::Google::Protobuf::MessageExts
157
+ extend ::Google::Protobuf::MessageExts::ClassMethods
158
+ end
159
+ end
160
+
161
+ # Config for video object detection human labeling task.
162
+ # Object detection will be conducted on the images extracted from the video,
163
+ # and those objects will be labeled with bounding boxes.
164
+ # User need to specify the number of images to be extracted per second as the
165
+ # extraction frame rate.
166
+ # @!attribute [rw] annotation_spec_set
167
+ # @return [::String]
168
+ # Required. Annotation spec set resource name.
169
+ # @!attribute [rw] extraction_frame_rate
170
+ # @return [::Float]
171
+ # Required. Number of frames per second to be extracted from the video.
172
+ class ObjectDetectionConfig
173
+ include ::Google::Protobuf::MessageExts
174
+ extend ::Google::Protobuf::MessageExts::ClassMethods
175
+ end
176
+
177
+ # Config for video object tracking human labeling task.
178
+ # @!attribute [rw] annotation_spec_set
179
+ # @return [::String]
180
+ # Required. Annotation spec set resource name.
181
+ class ObjectTrackingConfig
182
+ include ::Google::Protobuf::MessageExts
183
+ extend ::Google::Protobuf::MessageExts::ClassMethods
184
+ end
185
+
186
+ # Config for video event human labeling task.
187
+ # @!attribute [rw] annotation_spec_sets
188
+ # @return [::Array<::String>]
189
+ # Required. The list of annotation spec set resource name. Similar to video
190
+ # classification, we support selecting event from multiple AnnotationSpecSet
191
+ # at the same time.
192
+ class EventConfig
193
+ include ::Google::Protobuf::MessageExts
194
+ extend ::Google::Protobuf::MessageExts::ClassMethods
195
+ end
196
+
197
+ # Config for text classification human labeling task.
198
+ # @!attribute [rw] allow_multi_label
199
+ # @return [::Boolean]
200
+ # Optional. If allow_multi_label is true, contributors are able to choose
201
+ # multiple labels for one text segment.
202
+ # @!attribute [rw] annotation_spec_set
203
+ # @return [::String]
204
+ # Required. Annotation spec set resource name.
205
+ # @!attribute [rw] sentiment_config
206
+ # @return [::Google::Cloud::DataLabeling::V1beta1::SentimentConfig]
207
+ # Optional. Configs for sentiment selection.
208
+ class TextClassificationConfig
209
+ include ::Google::Protobuf::MessageExts
210
+ extend ::Google::Protobuf::MessageExts::ClassMethods
211
+ end
212
+
213
+ # Config for setting up sentiments.
214
+ # @!attribute [rw] enable_label_sentiment_selection
215
+ # @return [::Boolean]
216
+ # If set to true, contributors will have the option to select sentiment of
217
+ # the label they selected, to mark it as negative or positive label. Default
218
+ # is false.
219
+ class SentimentConfig
220
+ include ::Google::Protobuf::MessageExts
221
+ extend ::Google::Protobuf::MessageExts::ClassMethods
222
+ end
223
+
224
+ # Config for text entity extraction human labeling task.
225
+ # @!attribute [rw] annotation_spec_set
226
+ # @return [::String]
227
+ # Required. Annotation spec set resource name.
228
+ class TextEntityExtractionConfig
229
+ include ::Google::Protobuf::MessageExts
230
+ extend ::Google::Protobuf::MessageExts::ClassMethods
231
+ end
232
+
233
+ module StringAggregationType
234
+ STRING_AGGREGATION_TYPE_UNSPECIFIED = 0
235
+
236
+ # Majority vote to aggregate answers.
237
+ MAJORITY_VOTE = 1
238
+
239
+ # Unanimous answers will be adopted.
240
+ UNANIMOUS_VOTE = 2
241
+
242
+ # Preserve all answers by crowd compute.
243
+ NO_AGGREGATION = 3
244
+ end
245
+ end
246
+ end
247
+ end
248
+ end