1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
|
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="datalabeling_v1beta1.html">Data Labeling API</a> . <a href="datalabeling_v1beta1.projects.html">projects</a> . <a href="datalabeling_v1beta1.projects.datasets.html">datasets</a> . <a href="datalabeling_v1beta1.projects.datasets.annotatedDatasets.html">annotatedDatasets</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="datalabeling_v1beta1.projects.datasets.annotatedDatasets.dataItems.html">dataItems()</a></code>
</p>
<p class="firstline">Returns the dataItems Resource.</p>
<p class="toc_element">
<code><a href="datalabeling_v1beta1.projects.datasets.annotatedDatasets.examples.html">examples()</a></code>
</p>
<p class="firstline">Returns the examples Resource.</p>
<p class="toc_element">
<code><a href="datalabeling_v1beta1.projects.datasets.annotatedDatasets.feedbackThreads.html">feedbackThreads()</a></code>
</p>
<p class="firstline">Returns the feedbackThreads Resource.</p>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes an annotated dataset by resource name.</p>
<p class="toc_element">
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets an annotated dataset by resource name.</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists annotated datasets for a dataset. Pagination is supported.</p>
<p class="toc_element">
<code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="delete">delete(name, x__xgafv=None)</code>
<pre>Deletes an annotated dataset by resource name.
Args:
name: string, Required. Name of the annotated dataset to delete, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id} (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>
<div class="method">
<code class="details" id="get">get(name, x__xgafv=None)</code>
<pre>Gets an annotated dataset by resource name.
Args:
name: string, Required. Name of the annotated dataset to get, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id} (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
"annotationSource": "A String", # Output only. Source of the annotation.
"annotationType": "A String", # Output only. Type of the annotation. It is specified when starting labeling task.
"blockingResources": [ # Output only. The names of any related resources that are blocking changes to the annotated dataset.
"A String",
],
"completedExampleCount": "A String", # Output only. Number of examples that have annotation in the annotated dataset.
"createTime": "A String", # Output only. Time the AnnotatedDataset was created.
"description": "A String", # Output only. The description of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 characters.
"displayName": "A String", # Output only. The display name of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 64 characters.
"exampleCount": "A String", # Output only. Number of examples in the annotated dataset.
"labelStats": { # Statistics about annotation specs. # Output only. Per label statistics.
"exampleCount": { # Map of each annotation spec's example count. Key is the annotation spec name and value is the number of examples for that annotation spec. If the annotated dataset does not have annotation spec, the map will return a pair where the key is empty string and value is the total number of annotations.
"a_key": "A String",
},
},
"metadata": { # Metadata on AnnotatedDataset. # Output only. Additional information about AnnotatedDataset.
"boundingPolyConfig": { # Config for image bounding poly (and bounding box) human labeling task. # Configuration for image bounding box and bounding poly task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"instructionMessage": "A String", # Optional. Instruction message showed on contributors UI.
},
"eventConfig": { # Config for video event human labeling task. # Configuration for video event labeling task.
"annotationSpecSets": [ # Required. The list of annotation spec set resource name. Similar to video classification, we support selecting event from multiple AnnotationSpecSet at the same time.
"A String",
],
"clipLength": 42, # Videos will be cut to smaller clips to make it easier for labelers to work on. Users can configure is field in seconds, if not set, default value is 60s.
"overlapLength": 42, # The overlap length between different video clips. Users can configure is field in seconds, if not set, default value is 1s.
},
"humanAnnotationConfig": { # Configuration for how human labeling task should be done. # HumanAnnotationConfig used when requesting the human labeling task for this AnnotatedDataset.
"annotatedDatasetDescription": "A String", # Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.
"annotatedDatasetDisplayName": "A String", # Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .
"contributorEmails": [ # Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/
"A String",
],
"instruction": "A String", # Required. Instruction resource name.
"labelGroup": "A String", # Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
"languageCode": "A String", # Optional. The Language of this question, as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Default value is en-US. Only need to set this when task is language related. For example, French text classification.
"questionDuration": "A String", # Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.
"replicaCount": 42, # Optional. Replication of questions. Each question will be sent to up to this number of contributors to label. Aggregated answers will be returned. Default is set to 1. For image related labeling, valid values are 1, 3, 5.
"userEmailAddress": "A String", # Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.
},
"imageClassificationConfig": { # Config for image classification human labeling task. # Configuration for image classification task.
"allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one image.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"answerAggregationType": "A String", # Optional. The type of how to aggregate answers.
},
"objectDetectionConfig": { # Config for video object detection human labeling task. Object detection will be conducted on the images extracted from the video, and those objects will be labeled with bounding boxes. User need to specify the number of images to be extracted per second as the extraction frame rate. # Configuration for video object detection task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"extractionFrameRate": 3.14, # Required. Number of frames per second to be extracted from the video.
},
"objectTrackingConfig": { # Config for video object tracking human labeling task. # Configuration for video object tracking task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"clipLength": 42, # Videos will be cut to smaller clips to make it easier for labelers to work on. Users can configure is field in seconds, if not set, default value is 20s.
"overlapLength": 42, # The overlap length between different video clips. Users can configure is field in seconds, if not set, default value is 0.3s.
},
"polylineConfig": { # Config for image polyline human labeling task. # Configuration for image polyline task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"instructionMessage": "A String", # Optional. Instruction message showed on contributors UI.
},
"segmentationConfig": { # Config for image segmentation # Configuration for image segmentation task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name. format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
"instructionMessage": "A String", # Instruction message showed on labelers UI.
},
"textClassificationConfig": { # Config for text classification human labeling task. # Configuration for text classification task.
"allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one text segment.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"sentimentConfig": { # Config for setting up sentiments. # Optional. Configs for sentiment selection. We deprecate sentiment analysis in data labeling side as it is incompatible with uCAIP.
"enableLabelSentimentSelection": True or False, # If set to true, contributors will have the option to select sentiment of the label they selected, to mark it as negative or positive label. Default is false.
},
},
"textEntityExtractionConfig": { # Config for text entity extraction human labeling task. # Configuration for text entity extraction task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
},
"videoClassificationConfig": { # Config for video classification human labeling task. Currently two types of video classification are supported: 1. Assign labels on the entire video. 2. Split the video into multiple video clips based on camera shot, and assign labels on each video clip. # Configuration for video classification task.
"annotationSpecSetConfigs": [ # Required. The list of annotation spec set configs. Since watching a video clip takes much longer time than an image, we support label with multiple AnnotationSpecSet at the same time. Labels in each AnnotationSpecSet will be shown in a group to contributors. Contributors can select one or more (depending on whether to allow multi label) from each group.
{ # Annotation spec set with the setting of allowing multi labels or not.
"allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels from one annotation spec set.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
},
],
"applyShotDetection": True or False, # Optional. Option to apply shot detection on the video.
},
},
"name": "A String", # Output only. AnnotatedDataset resource name in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Lists annotated datasets for a dataset. Pagination is supported.
Args:
parent: string, Required. Name of the dataset to list annotated datasets, format: projects/{project_id}/datasets/{dataset_id} (required)
filter: string, Optional. Filter is not supported at this moment.
pageSize: integer, Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
pageToken: string, Optional. A token identifying a page of results for the server to return. Typically obtained by ListAnnotatedDatasetsResponse.next_page_token of the previous [DataLabelingService.ListAnnotatedDatasets] call. Return first page if empty.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Results of listing annotated datasets for a dataset.
"annotatedDatasets": [ # The list of annotated datasets to return.
{ # AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.
"annotationSource": "A String", # Output only. Source of the annotation.
"annotationType": "A String", # Output only. Type of the annotation. It is specified when starting labeling task.
"blockingResources": [ # Output only. The names of any related resources that are blocking changes to the annotated dataset.
"A String",
],
"completedExampleCount": "A String", # Output only. Number of examples that have annotation in the annotated dataset.
"createTime": "A String", # Output only. Time the AnnotatedDataset was created.
"description": "A String", # Output only. The description of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 characters.
"displayName": "A String", # Output only. The display name of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 64 characters.
"exampleCount": "A String", # Output only. Number of examples in the annotated dataset.
"labelStats": { # Statistics about annotation specs. # Output only. Per label statistics.
"exampleCount": { # Map of each annotation spec's example count. Key is the annotation spec name and value is the number of examples for that annotation spec. If the annotated dataset does not have annotation spec, the map will return a pair where the key is empty string and value is the total number of annotations.
"a_key": "A String",
},
},
"metadata": { # Metadata on AnnotatedDataset. # Output only. Additional information about AnnotatedDataset.
"boundingPolyConfig": { # Config for image bounding poly (and bounding box) human labeling task. # Configuration for image bounding box and bounding poly task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"instructionMessage": "A String", # Optional. Instruction message showed on contributors UI.
},
"eventConfig": { # Config for video event human labeling task. # Configuration for video event labeling task.
"annotationSpecSets": [ # Required. The list of annotation spec set resource name. Similar to video classification, we support selecting event from multiple AnnotationSpecSet at the same time.
"A String",
],
"clipLength": 42, # Videos will be cut to smaller clips to make it easier for labelers to work on. Users can configure is field in seconds, if not set, default value is 60s.
"overlapLength": 42, # The overlap length between different video clips. Users can configure is field in seconds, if not set, default value is 1s.
},
"humanAnnotationConfig": { # Configuration for how human labeling task should be done. # HumanAnnotationConfig used when requesting the human labeling task for this AnnotatedDataset.
"annotatedDatasetDescription": "A String", # Optional. A human-readable description for AnnotatedDataset. The description can be up to 10000 characters long.
"annotatedDatasetDisplayName": "A String", # Required. A human-readable name for AnnotatedDataset defined by users. Maximum of 64 characters .
"contributorEmails": [ # Optional. If you want your own labeling contributors to manage and work on this labeling request, you can set these contributors here. We will give them access to the question types in crowdcompute. Note that these emails must be registered in crowdcompute worker UI: https://crowd-compute.appspot.com/
"A String",
],
"instruction": "A String", # Required. Instruction resource name.
"labelGroup": "A String", # Optional. A human-readable label used to logically group labeling tasks. This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
"languageCode": "A String", # Optional. The Language of this question, as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Default value is en-US. Only need to set this when task is language related. For example, French text classification.
"questionDuration": "A String", # Optional. Maximum duration for contributors to answer a question. Maximum is 3600 seconds. Default is 3600 seconds.
"replicaCount": 42, # Optional. Replication of questions. Each question will be sent to up to this number of contributors to label. Aggregated answers will be returned. Default is set to 1. For image related labeling, valid values are 1, 3, 5.
"userEmailAddress": "A String", # Email of the user who started the labeling task and should be notified by email. If empty no notification will be sent.
},
"imageClassificationConfig": { # Config for image classification human labeling task. # Configuration for image classification task.
"allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one image.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"answerAggregationType": "A String", # Optional. The type of how to aggregate answers.
},
"objectDetectionConfig": { # Config for video object detection human labeling task. Object detection will be conducted on the images extracted from the video, and those objects will be labeled with bounding boxes. User need to specify the number of images to be extracted per second as the extraction frame rate. # Configuration for video object detection task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"extractionFrameRate": 3.14, # Required. Number of frames per second to be extracted from the video.
},
"objectTrackingConfig": { # Config for video object tracking human labeling task. # Configuration for video object tracking task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"clipLength": 42, # Videos will be cut to smaller clips to make it easier for labelers to work on. Users can configure is field in seconds, if not set, default value is 20s.
"overlapLength": 42, # The overlap length between different video clips. Users can configure is field in seconds, if not set, default value is 0.3s.
},
"polylineConfig": { # Config for image polyline human labeling task. # Configuration for image polyline task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"instructionMessage": "A String", # Optional. Instruction message showed on contributors UI.
},
"segmentationConfig": { # Config for image segmentation # Configuration for image segmentation task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name. format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
"instructionMessage": "A String", # Instruction message showed on labelers UI.
},
"textClassificationConfig": { # Config for text classification human labeling task. # Configuration for text classification task.
"allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels for one text segment.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
"sentimentConfig": { # Config for setting up sentiments. # Optional. Configs for sentiment selection. We deprecate sentiment analysis in data labeling side as it is incompatible with uCAIP.
"enableLabelSentimentSelection": True or False, # If set to true, contributors will have the option to select sentiment of the label they selected, to mark it as negative or positive label. Default is false.
},
},
"textEntityExtractionConfig": { # Config for text entity extraction human labeling task. # Configuration for text entity extraction task.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
},
"videoClassificationConfig": { # Config for video classification human labeling task. Currently two types of video classification are supported: 1. Assign labels on the entire video. 2. Split the video into multiple video clips based on camera shot, and assign labels on each video clip. # Configuration for video classification task.
"annotationSpecSetConfigs": [ # Required. The list of annotation spec set configs. Since watching a video clip takes much longer time than an image, we support label with multiple AnnotationSpecSet at the same time. Labels in each AnnotationSpecSet will be shown in a group to contributors. Contributors can select one or more (depending on whether to allow multi label) from each group.
{ # Annotation spec set with the setting of allowing multi labels or not.
"allowMultiLabel": True or False, # Optional. If allow_multi_label is true, contributors are able to choose multiple labels from one annotation spec set.
"annotationSpecSet": "A String", # Required. Annotation spec set resource name.
},
],
"applyShotDetection": True or False, # Optional. Option to apply shot detection on the video.
},
},
"name": "A String", # Output only. AnnotatedDataset resource name in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
},
],
"nextPageToken": "A String", # A token to retrieve next page of results.
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next()</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
</body></html>
|