blob: b8b3bb6c71136e992eb87261883f8ebe3d8f35d6 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="vision_v1p2beta1.html">Cloud Vision API</a> . <a href="vision_v1p2beta1.projects.html">projects</a> . <a href="vision_v1p2beta1.projects.images.html">images</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#annotate">annotate(parent, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Run image detection and annotation for a batch of images.</p>
80<p class="toc_element">
81 <code><a href="#asyncBatchAnnotate">asyncBatchAnnotate(parent, body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Run asynchronous image detection and annotation for a list of images.</p>
83<h3>Method Details</h3>
84<div class="method">
85 <code class="details" id="annotate">annotate(parent, body=None, x__xgafv=None)</code>
86 <pre>Run image detection and annotation for a batch of images.
87
88Args:
89 parent: string, Optional. Target project and location to make a call.
90
91Format: `projects/{project-id}/locations/{location-id}`.
92
93If no parent is specified, a region will be chosen automatically.
94
95Supported location-ids:
96 `us`: USA country only,
97 `asia`: East asia areas, like Japan, Taiwan,
98 `eu`: The European Union.
99
100Example: `projects/project-A/locations/eu`. (required)
101 body: object, The request body.
102 The object takes the form of:
103
104{ # Multiple image annotation requests are batched into a single service call.
105 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
106 #
107 # Format: `projects/{project-id}/locations/{location-id}`.
108 #
109 # If no parent is specified, a region will be chosen automatically.
110 #
111 # Supported location-ids:
112 # `us`: USA country only,
113 # `asia`: East asia areas, like Japan, Taiwan,
114 # `eu`: The European Union.
115 #
116 # Example: `projects/project-A/locations/eu`.
117 &quot;requests&quot;: [ # Required. Individual image annotation requests for this batch.
118 { # Request for performing Google Cloud Vision API tasks over a user-provided
119 # image, with user-requested features, and with context information.
120 &quot;image&quot;: { # Client image to perform Google Cloud Vision API tasks over. # The image to be processed.
121 &quot;content&quot;: &quot;A String&quot;, # Image content, represented as a stream of bytes.
122 # Note: As with all `bytes` fields, protobuffers use a pure binary
123 # representation, whereas JSON representations use base64.
124 &quot;source&quot;: { # External image source (Google Cloud Storage or web URL image location). # Google Cloud Storage image location, or publicly-accessible image
125 # URL. If both `content` and `source` are provided for an image, `content`
126 # takes precedence and is used to perform the image annotation request.
127 &quot;imageUri&quot;: &quot;A String&quot;, # The URI of the source image. Can be either:
128 #
129 # 1. A Google Cloud Storage URI of the form
130 # `gs://bucket_name/object_name`. Object versioning is not supported. See
131 # [Google Cloud Storage Request
132 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
133 # info.
134 #
135 # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
136 # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
137 # completed. Your request may fail if the specified host denies the
138 # request (e.g. due to request throttling or DOS prevention), or if Google
139 # throttles requests to the site for abuse prevention. You should not
140 # depend on externally-hosted images for production applications.
141 #
142 # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
143 # precedence.
144 &quot;gcsImageUri&quot;: &quot;A String&quot;, # **Use `image_uri` instead.**
145 #
146 # The Google Cloud Storage URI of the form
147 # `gs://bucket_name/object_name`. Object versioning is not supported. See
148 # [Google Cloud Storage Request
149 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
150 },
151 },
152 &quot;features&quot;: [ # Requested features.
153 { # The type of Google Cloud Vision API detection to perform, and the maximum
154 # number of results to return for that type. Multiple `Feature` objects can
155 # be specified in the `features` list.
156 &quot;type&quot;: &quot;A String&quot;, # The feature type.
157 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
158 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
159 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
160 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
161 # &quot;builtin/latest&quot;.
162 },
163 ],
164 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image.
165 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
166 # yields the best results since it enables automatic language detection. For
167 # languages based on the Latin alphabet, setting `language_hints` is not
168 # needed. In rare cases, when the language of the text in the image is known,
169 # setting a hint will help get better results (although it will be a
170 # significant hindrance if the hint is wrong). Text detection returns an
171 # error if one or more of the specified languages is not one of the
172 # [supported languages](https://cloud.google.com/vision/docs/languages).
173 &quot;A String&quot;,
174 ],
175 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
176 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
177 },
178 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
179 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
180 # of doubles representing degrees latitude and degrees longitude. Unless
181 # specified otherwise, this must conform to the
182 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
183 # standard&lt;/a&gt;. Values must be within normalized ranges.
184 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
185 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
186 },
187 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
188 # of doubles representing degrees latitude and degrees longitude. Unless
189 # specified otherwise, this must conform to the
190 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
191 # standard&lt;/a&gt;. Values must be within normalized ranges.
192 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
193 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
194 },
195 },
196 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
197 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
198 # of the image. For example, if the desired aspect ratio is 4/3, the
199 # corresponding float value should be 1.33333. If not specified, the
200 # best possible crop is returned. The number of provided aspect ratios is
201 # limited to a maximum of 16; any aspect ratios provided after the 16th are
202 # ignored.
203 3.14,
204 ],
205 },
206 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
207 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
208 #
209 # Format is:
210 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
211 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
212 # If it is not specified, system discretion will be applied.
213 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
214 { # A vertex represents a 2D point in the image.
215 # NOTE: the normalized vertex coordinates are relative to the original image
216 # and range from 0 to 1.
217 &quot;y&quot;: 3.14, # Y coordinate.
218 &quot;x&quot;: 3.14, # X coordinate.
219 },
220 ],
221 &quot;vertices&quot;: [ # The bounding polygon vertices.
222 { # A vertex represents a 2D point in the image.
223 # NOTE: the vertex coordinates are in the same scale as the original image.
224 &quot;y&quot;: 42, # Y coordinate.
225 &quot;x&quot;: 42, # X coordinate.
226 },
227 ],
228 },
229 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
230 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
231 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
232 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
233 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
234 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
235 # migrate existing products to these categories as well.
236 &quot;A String&quot;,
237 ],
238 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
239 # on Product labels. We currently support an AND of OR of key-value
240 # expressions, where each expression within an OR must have the same key. An
241 # &#x27;=&#x27; should be used to connect the key and value.
242 #
243 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
244 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
245 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
246 },
247 },
248 },
249 ],
250 }
251
252 x__xgafv: string, V1 error format.
253 Allowed values
254 1 - v1 error format
255 2 - v2 error format
256
257Returns:
258 An object of the form:
259
260 { # Response to a batch image annotation request.
261 &quot;responses&quot;: [ # Individual responses to image annotation requests within the batch.
262 { # Response to an image annotation request.
263 &quot;context&quot;: { # If an image was produced from a file (e.g. a PDF), this message gives # If present, contextual information is needed to understand where this image
264 # comes from.
265 # information about the source of that image.
266 &quot;uri&quot;: &quot;A String&quot;, # The URI of the file used to produce the image.
267 &quot;pageNumber&quot;: 42, # If the file was a PDF or TIFF, this field gives the page number within
268 # the file used to produce the image.
269 },
270 &quot;logoAnnotations&quot;: [ # If present, logo detection has completed successfully.
271 { # Set of detected entity features.
272 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
273 # fields, such a score or string that qualifies the entity.
274 { # A `Property` consists of a user-supplied name/value pair.
275 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
276 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
277 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
278 },
279 ],
280 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
281 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
282 # `LocationInfo` elements can be present because one location may
283 # indicate the location of the scene in the image, and another location
284 # may indicate the location of the place where the image was taken.
285 # Location information is usually present for landmarks.
286 { # Detected entity location information.
287 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
288 # of doubles representing degrees latitude and degrees longitude. Unless
289 # specified otherwise, this must conform to the
290 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
291 # standard&lt;/a&gt;. Values must be within normalized ranges.
292 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
293 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
294 },
295 },
296 ],
297 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
298 # [Google Knowledge Graph Search
299 # API](https://developers.google.com/knowledge-graph/).
300 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
301 # The accuracy of the entity detection in an image.
302 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
303 # this field represents the confidence that there is a tower in the query
304 # image. Range [0, 1].
305 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
306 # `description` is expressed.
307 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
308 # for `LABEL_DETECTION` features.
309 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
310 { # A vertex represents a 2D point in the image.
311 # NOTE: the normalized vertex coordinates are relative to the original image
312 # and range from 0 to 1.
313 &quot;y&quot;: 3.14, # Y coordinate.
314 &quot;x&quot;: 3.14, # X coordinate.
315 },
316 ],
317 &quot;vertices&quot;: [ # The bounding polygon vertices.
318 { # A vertex represents a 2D point in the image.
319 # NOTE: the vertex coordinates are in the same scale as the original image.
320 &quot;y&quot;: 42, # Y coordinate.
321 &quot;x&quot;: 42, # X coordinate.
322 },
323 ],
324 },
325 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
326 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
327 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
328 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
329 # detected distant towering building, even though the confidence that
330 # there is a tower in each image may be the same. Range [0, 1].
331 },
332 ],
333 &quot;webDetection&quot;: { # Relevant information for the image from the Internet. # If present, web detection has completed successfully.
334 &quot;webEntities&quot;: [ # Deduced entities from similar images on the Internet.
335 { # Entity deduced from similar images on the Internet.
336 &quot;entityId&quot;: &quot;A String&quot;, # Opaque entity ID.
337 &quot;description&quot;: &quot;A String&quot;, # Canonical description of the entity, in English.
338 &quot;score&quot;: 3.14, # Overall relevancy score for the entity.
339 # Not normalized and not comparable across different image queries.
340 },
341 ],
342 &quot;pagesWithMatchingImages&quot;: [ # Web pages containing the matching images from the Internet.
343 { # Metadata for web pages.
344 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the web page.
345 &quot;partialMatchingImages&quot;: [ # Partial matching images on the page.
346 # Those images are similar enough to share some key-point features. For
347 # example an original image will likely have partial matching for its
348 # crops.
349 { # Metadata for online images.
350 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
351 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
352 },
353 ],
354 &quot;url&quot;: &quot;A String&quot;, # The result web page URL.
355 &quot;pageTitle&quot;: &quot;A String&quot;, # Title for the web page, may contain HTML markups.
356 &quot;fullMatchingImages&quot;: [ # Fully matching images on the page.
357 # Can include resized copies of the query image.
358 { # Metadata for online images.
359 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
360 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
361 },
362 ],
363 },
364 ],
365 &quot;partialMatchingImages&quot;: [ # Partial matching images from the Internet.
366 # Those images are similar enough to share some key-point features. For
367 # example an original image will likely have partial matching for its crops.
368 { # Metadata for online images.
369 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
370 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
371 },
372 ],
373 &quot;visuallySimilarImages&quot;: [ # The visually similar image results.
374 { # Metadata for online images.
375 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
376 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
377 },
378 ],
379 &quot;bestGuessLabels&quot;: [ # The service&#x27;s best guess as to the topic of the request image.
380 # Inferred from similar images on the open web.
381 { # Label to provide extra metadata for the web detection.
382 &quot;label&quot;: &quot;A String&quot;, # Label for extra metadata.
383 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code for `label`, such as &quot;en-US&quot; or &quot;sr-Latn&quot;.
384 # For more information, see
385 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
386 },
387 ],
388 &quot;fullMatchingImages&quot;: [ # Fully matching images from the Internet.
389 # Can include resized copies of the query image.
390 { # Metadata for online images.
391 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
392 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
393 },
394 ],
395 },
396 &quot;safeSearchAnnotation&quot;: { # Set of features pertaining to the image, computed by computer vision # If present, safe-search annotation has completed successfully.
397 # methods over safe-search verticals (for example, adult, spoof, medical,
398 # violence).
399 &quot;racy&quot;: &quot;A String&quot;, # Likelihood that the request image contains racy content. Racy content may
400 # include (but is not limited to) skimpy or sheer clothing, strategically
401 # covered nudity, lewd or provocative poses, or close-ups of sensitive
402 # body areas.
403 &quot;violence&quot;: &quot;A String&quot;, # Likelihood that this image contains violent content.
404 &quot;adult&quot;: &quot;A String&quot;, # Represents the adult content likelihood for the image. Adult content may
405 # contain elements such as nudity, pornographic images or cartoons, or
406 # sexual activities.
407 &quot;spoof&quot;: &quot;A String&quot;, # Spoof likelihood. The likelihood that an modification
408 # was made to the image&#x27;s canonical version to make it appear
409 # funny or offensive.
410 &quot;medical&quot;: &quot;A String&quot;, # Likelihood that this is a medical image.
411 },
412 &quot;landmarkAnnotations&quot;: [ # If present, landmark detection has completed successfully.
413 { # Set of detected entity features.
414 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
415 # fields, such a score or string that qualifies the entity.
416 { # A `Property` consists of a user-supplied name/value pair.
417 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
418 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
419 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
420 },
421 ],
422 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
423 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
424 # `LocationInfo` elements can be present because one location may
425 # indicate the location of the scene in the image, and another location
426 # may indicate the location of the place where the image was taken.
427 # Location information is usually present for landmarks.
428 { # Detected entity location information.
429 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
430 # of doubles representing degrees latitude and degrees longitude. Unless
431 # specified otherwise, this must conform to the
432 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
433 # standard&lt;/a&gt;. Values must be within normalized ranges.
434 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
435 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
436 },
437 },
438 ],
439 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
440 # [Google Knowledge Graph Search
441 # API](https://developers.google.com/knowledge-graph/).
442 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
443 # The accuracy of the entity detection in an image.
444 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
445 # this field represents the confidence that there is a tower in the query
446 # image. Range [0, 1].
447 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
448 # `description` is expressed.
449 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
450 # for `LABEL_DETECTION` features.
451 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
452 { # A vertex represents a 2D point in the image.
453 # NOTE: the normalized vertex coordinates are relative to the original image
454 # and range from 0 to 1.
455 &quot;y&quot;: 3.14, # Y coordinate.
456 &quot;x&quot;: 3.14, # X coordinate.
457 },
458 ],
459 &quot;vertices&quot;: [ # The bounding polygon vertices.
460 { # A vertex represents a 2D point in the image.
461 # NOTE: the vertex coordinates are in the same scale as the original image.
462 &quot;y&quot;: 42, # Y coordinate.
463 &quot;x&quot;: 42, # X coordinate.
464 },
465 ],
466 },
467 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
468 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
469 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
470 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
471 # detected distant towering building, even though the confidence that
472 # there is a tower in each image may be the same. Range [0, 1].
473 },
474 ],
475 &quot;faceAnnotations&quot;: [ # If present, face detection has completed successfully.
476 { # A face annotation object contains the results of face detection.
477 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the face. The coordinates of the bounding box
478 # are in the original image&#x27;s scale.
479 # The bounding box is computed to &quot;frame&quot; the face in accordance with human
480 # expectations. It is based on the landmarker results.
481 # Note that one or more x and/or y coordinates may not be generated in the
482 # `BoundingPoly` (the polygon will be unbounded) if only a partial face
483 # appears in the image to be annotated.
484 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
485 { # A vertex represents a 2D point in the image.
486 # NOTE: the normalized vertex coordinates are relative to the original image
487 # and range from 0 to 1.
488 &quot;y&quot;: 3.14, # Y coordinate.
489 &quot;x&quot;: 3.14, # X coordinate.
490 },
491 ],
492 &quot;vertices&quot;: [ # The bounding polygon vertices.
493 { # A vertex represents a 2D point in the image.
494 # NOTE: the vertex coordinates are in the same scale as the original image.
495 &quot;y&quot;: 42, # Y coordinate.
496 &quot;x&quot;: 42, # X coordinate.
497 },
498 ],
499 },
500 &quot;rollAngle&quot;: 3.14, # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
501 # of the face relative to the image vertical about the axis perpendicular to
502 # the face. Range [-180,180].
503 &quot;sorrowLikelihood&quot;: &quot;A String&quot;, # Sorrow likelihood.
504 &quot;tiltAngle&quot;: 3.14, # Pitch angle, which indicates the upwards/downwards angle that the face is
505 # pointing relative to the image&#x27;s horizontal plane. Range [-180,180].
506 &quot;fdBoundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The `fd_bounding_poly` bounding polygon is tighter than the
507 # `boundingPoly`, and encloses only the skin part of the face. Typically, it
508 # is used to eliminate the face from any image analysis that detects the
509 # &quot;amount of skin&quot; visible in an image. It is not based on the
510 # landmarker results, only on the initial face detection, hence
511 # the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
512 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
513 { # A vertex represents a 2D point in the image.
514 # NOTE: the normalized vertex coordinates are relative to the original image
515 # and range from 0 to 1.
516 &quot;y&quot;: 3.14, # Y coordinate.
517 &quot;x&quot;: 3.14, # X coordinate.
518 },
519 ],
520 &quot;vertices&quot;: [ # The bounding polygon vertices.
521 { # A vertex represents a 2D point in the image.
522 # NOTE: the vertex coordinates are in the same scale as the original image.
523 &quot;y&quot;: 42, # Y coordinate.
524 &quot;x&quot;: 42, # X coordinate.
525 },
526 ],
527 },
528 &quot;angerLikelihood&quot;: &quot;A String&quot;, # Anger likelihood.
529 &quot;landmarks&quot;: [ # Detected face landmarks.
530 { # A face-specific landmark (for example, a face feature).
531 &quot;position&quot;: { # A 3D position in the image, used primarily for Face detection landmarks. # Face landmark position.
532 # A valid Position must have both x and y coordinates.
533 # The position coordinates are in the same scale as the original image.
534 &quot;y&quot;: 3.14, # Y coordinate.
535 &quot;x&quot;: 3.14, # X coordinate.
536 &quot;z&quot;: 3.14, # Z coordinate (or depth).
537 },
538 &quot;type&quot;: &quot;A String&quot;, # Face landmark type.
539 },
540 ],
541 &quot;surpriseLikelihood&quot;: &quot;A String&quot;, # Surprise likelihood.
542 &quot;landmarkingConfidence&quot;: 3.14, # Face landmarking confidence. Range [0, 1].
543 &quot;joyLikelihood&quot;: &quot;A String&quot;, # Joy likelihood.
544 &quot;underExposedLikelihood&quot;: &quot;A String&quot;, # Under-exposed likelihood.
545 &quot;panAngle&quot;: 3.14, # Yaw angle, which indicates the leftward/rightward angle that the face is
546 # pointing relative to the vertical plane perpendicular to the image. Range
547 # [-180,180].
548 &quot;detectionConfidence&quot;: 3.14, # Detection confidence. Range [0, 1].
549 &quot;blurredLikelihood&quot;: &quot;A String&quot;, # Blurred likelihood.
550 &quot;headwearLikelihood&quot;: &quot;A String&quot;, # Headwear likelihood.
551 },
552 ],
553 &quot;cropHintsAnnotation&quot;: { # Set of crop hints that are used to generate new crops when serving images. # If present, crop hints have completed successfully.
554 &quot;cropHints&quot;: [ # Crop hint results.
555 { # Single crop hint that is used to generate a new crop when serving an image.
556 &quot;confidence&quot;: 3.14, # Confidence of this being a salient region. Range [0, 1].
557 &quot;importanceFraction&quot;: 3.14, # Fraction of importance of this salient region with respect to the original
558 # image.
559 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the crop region. The coordinates of the bounding
560 # box are in the original image&#x27;s scale.
561 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
562 { # A vertex represents a 2D point in the image.
563 # NOTE: the normalized vertex coordinates are relative to the original image
564 # and range from 0 to 1.
565 &quot;y&quot;: 3.14, # Y coordinate.
566 &quot;x&quot;: 3.14, # X coordinate.
567 },
568 ],
569 &quot;vertices&quot;: [ # The bounding polygon vertices.
570 { # A vertex represents a 2D point in the image.
571 # NOTE: the vertex coordinates are in the same scale as the original image.
572 &quot;y&quot;: 42, # Y coordinate.
573 &quot;x&quot;: 42, # X coordinate.
574 },
575 ],
576 },
577 },
578 ],
579 },
580 &quot;labelAnnotations&quot;: [ # If present, label detection has completed successfully.
581 { # Set of detected entity features.
582 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
583 # fields, such a score or string that qualifies the entity.
584 { # A `Property` consists of a user-supplied name/value pair.
585 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
586 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
587 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
588 },
589 ],
590 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
591 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
592 # `LocationInfo` elements can be present because one location may
593 # indicate the location of the scene in the image, and another location
594 # may indicate the location of the place where the image was taken.
595 # Location information is usually present for landmarks.
596 { # Detected entity location information.
597 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
598 # of doubles representing degrees latitude and degrees longitude. Unless
599 # specified otherwise, this must conform to the
600 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
601 # standard&lt;/a&gt;. Values must be within normalized ranges.
602 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
603 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
604 },
605 },
606 ],
607 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
608 # [Google Knowledge Graph Search
609 # API](https://developers.google.com/knowledge-graph/).
610 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
611 # The accuracy of the entity detection in an image.
612 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
613 # this field represents the confidence that there is a tower in the query
614 # image. Range [0, 1].
615 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
616 # `description` is expressed.
617 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
618 # for `LABEL_DETECTION` features.
619 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
620 { # A vertex represents a 2D point in the image.
621 # NOTE: the normalized vertex coordinates are relative to the original image
622 # and range from 0 to 1.
623 &quot;y&quot;: 3.14, # Y coordinate.
624 &quot;x&quot;: 3.14, # X coordinate.
625 },
626 ],
627 &quot;vertices&quot;: [ # The bounding polygon vertices.
628 { # A vertex represents a 2D point in the image.
629 # NOTE: the vertex coordinates are in the same scale as the original image.
630 &quot;y&quot;: 42, # Y coordinate.
631 &quot;x&quot;: 42, # X coordinate.
632 },
633 ],
634 },
635 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
636 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
637 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
638 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
639 # detected distant towering building, even though the confidence that
640 # there is a tower in each image may be the same. Range [0, 1].
641 },
642 ],
643 &quot;localizedObjectAnnotations&quot;: [ # If present, localized object detection has completed successfully.
644 # This will be sorted descending by confidence score.
645 { # Set of detected objects with bounding boxes.
646 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
647 # information, see
648 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
649 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
650 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
651 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this object belongs. This must be populated.
652 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
653 { # A vertex represents a 2D point in the image.
654 # NOTE: the normalized vertex coordinates are relative to the original image
655 # and range from 0 to 1.
656 &quot;y&quot;: 3.14, # Y coordinate.
657 &quot;x&quot;: 3.14, # X coordinate.
658 },
659 ],
660 &quot;vertices&quot;: [ # The bounding polygon vertices.
661 { # A vertex represents a 2D point in the image.
662 # NOTE: the vertex coordinates are in the same scale as the original image.
663 &quot;y&quot;: 42, # Y coordinate.
664 &quot;x&quot;: 42, # X coordinate.
665 },
666 ],
667 },
668 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
669 },
670 ],
671 &quot;productSearchResults&quot;: { # Results for a product search request. # If present, product search has completed successfully.
672 &quot;indexTime&quot;: &quot;A String&quot;, # Timestamp of the index which provided these results. Products added to the
673 # product set and products removed from the product set after this time are
674 # not reflected in the current results.
675 &quot;productGroupedResults&quot;: [ # List of results grouped by products detected in the query image. Each entry
676 # corresponds to one bounding polygon in the query image, and contains the
677 # matching products specific to that region. There may be duplicate product
678 # matches in the union of all the per-product results.
679 { # Information about the products similar to a single product in a query
680 # image.
681 &quot;objectAnnotations&quot;: [ # List of generic predictions for the object in the bounding box.
682 { # Prediction for what the object in the bounding box is.
683 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
684 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
685 # information, see
686 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
687 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
688 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
689 },
690 ],
691 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the product detected in the query image.
692 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
693 { # A vertex represents a 2D point in the image.
694 # NOTE: the normalized vertex coordinates are relative to the original image
695 # and range from 0 to 1.
696 &quot;y&quot;: 3.14, # Y coordinate.
697 &quot;x&quot;: 3.14, # X coordinate.
698 },
699 ],
700 &quot;vertices&quot;: [ # The bounding polygon vertices.
701 { # A vertex represents a 2D point in the image.
702 # NOTE: the vertex coordinates are in the same scale as the original image.
703 &quot;y&quot;: 42, # Y coordinate.
704 &quot;x&quot;: 42, # X coordinate.
705 },
706 ],
707 },
708 &quot;results&quot;: [ # List of results, one for each product match.
709 { # Information about a product.
710 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
711 # to the query.
712 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
713 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
714 #
715 # Format is:
716 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
717 #
718 # This field is ignored when creating a product.
719 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
720 # 4096 characters long.
721 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
722 # characters long.
723 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
724 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
725 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
726 # not be used for new products.
727 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
728 # constraints can be specified based on the product_labels.
729 #
730 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
731 # strings with integer values can match a range-based restriction which is
732 # to be supported soon.
733 #
734 # Multiple values can be assigned to the same key. One product may have up to
735 # 500 product_labels.
736 #
737 # Notice that the total number of distinct product_labels over all products
738 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
739 # will refuse to work for that ProductSet.
740 { # A product label represented as a key-value pair.
741 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
742 # cannot exceed 128 bytes.
743 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
744 # exceed 128 bytes.
745 },
746 ],
747 },
748 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
749 # 1 (full confidence).
750 },
751 ],
752 },
753 ],
754 &quot;results&quot;: [ # List of results, one for each product match.
755 { # Information about a product.
756 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
757 # to the query.
758 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
759 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
760 #
761 # Format is:
762 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
763 #
764 # This field is ignored when creating a product.
765 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
766 # 4096 characters long.
767 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
768 # characters long.
769 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
770 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
771 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
772 # not be used for new products.
773 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
774 # constraints can be specified based on the product_labels.
775 #
776 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
777 # strings with integer values can match a range-based restriction which is
778 # to be supported soon.
779 #
780 # Multiple values can be assigned to the same key. One product may have up to
781 # 500 product_labels.
782 #
783 # Notice that the total number of distinct product_labels over all products
784 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
785 # will refuse to work for that ProductSet.
786 { # A product label represented as a key-value pair.
787 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
788 # cannot exceed 128 bytes.
789 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
790 # exceed 128 bytes.
791 },
792 ],
793 },
794 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
795 # 1 (full confidence).
796 },
797 ],
798 },
799 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # If set, represents the error message for the operation.
800 # Note that filled-in image annotations are guaranteed to be
801 # correct, even when `error` is set.
802 # different programming environments, including REST APIs and RPC APIs. It is
803 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
804 # three pieces of data: error code, error message, and error details.
805 #
806 # You can find out more about this error model and how to work with it in the
807 # [API Design Guide](https://cloud.google.com/apis/design/errors).
808 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
809 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
810 # user-facing error message should be localized and sent in the
811 # google.rpc.Status.details field, or localized by the client.
812 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
813 # message types for APIs to use.
814 {
815 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
816 },
817 ],
818 },
819 &quot;fullTextAnnotation&quot;: { # TextAnnotation contains a structured representation of OCR extracted text. # If present, text (OCR) detection or document (OCR) text detection has
820 # completed successfully.
821 # This annotation provides the structural hierarchy for the OCR detected
822 # text.
823 # The hierarchy of an OCR extracted text structure is like this:
824 # TextAnnotation -&gt; Page -&gt; Block -&gt; Paragraph -&gt; Word -&gt; Symbol
825 # Each structural component, starting from Page, may further have their own
826 # properties. Properties describe detected languages, breaks etc.. Please refer
827 # to the TextAnnotation.TextProperty message definition below for more
828 # detail.
829 &quot;pages&quot;: [ # List of pages detected by OCR.
830 { # Detected page from OCR.
831 &quot;width&quot;: 42, # Page width. For PDFs the unit is points. For images (including
832 # TIFFs) the unit is pixels.
833 &quot;blocks&quot;: [ # List of blocks of text, images etc on this page.
834 { # Logical element on the page.
835 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the block.
836 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
837 { # Detected language for a structural component.
838 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
839 # information, see
840 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
841 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
842 },
843 ],
844 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
845 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
846 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
847 },
848 },
849 &quot;blockType&quot;: &quot;A String&quot;, # Detected block type (text, image etc) for this block.
850 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the block.
851 # The vertices are in the order of top-left, top-right, bottom-right,
852 # bottom-left. When a rotation of the bounding box is detected the rotation
853 # is represented as around the top-left corner as defined when the text is
854 # read in the &#x27;natural&#x27; orientation.
855 # For example:
856 #
857 # * when the text is horizontal it might look like:
858 #
859 # 0----1
860 # | |
861 # 3----2
862 #
863 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
864 #
865 # 2----3
866 # | |
867 # 1----0
868 #
869 # and the vertex order will still be (0, 1, 2, 3).
870 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
871 { # A vertex represents a 2D point in the image.
872 # NOTE: the normalized vertex coordinates are relative to the original image
873 # and range from 0 to 1.
874 &quot;y&quot;: 3.14, # Y coordinate.
875 &quot;x&quot;: 3.14, # X coordinate.
876 },
877 ],
878 &quot;vertices&quot;: [ # The bounding polygon vertices.
879 { # A vertex represents a 2D point in the image.
880 # NOTE: the vertex coordinates are in the same scale as the original image.
881 &quot;y&quot;: 42, # Y coordinate.
882 &quot;x&quot;: 42, # X coordinate.
883 },
884 ],
885 },
886 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the block. Range [0, 1].
887 &quot;paragraphs&quot;: [ # List of paragraphs in this block (if this blocks is of type text).
888 { # Structural unit of text representing a number of words in certain order.
889 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the paragraph.
890 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
891 { # Detected language for a structural component.
892 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
893 # information, see
894 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
895 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
896 },
897 ],
898 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
899 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
900 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
901 },
902 },
903 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the paragraph.
904 # The vertices are in the order of top-left, top-right, bottom-right,
905 # bottom-left. When a rotation of the bounding box is detected the rotation
906 # is represented as around the top-left corner as defined when the text is
907 # read in the &#x27;natural&#x27; orientation.
908 # For example:
909 # * when the text is horizontal it might look like:
910 # 0----1
911 # | |
912 # 3----2
913 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
914 # 2----3
915 # | |
916 # 1----0
917 # and the vertex order will still be (0, 1, 2, 3).
918 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
919 { # A vertex represents a 2D point in the image.
920 # NOTE: the normalized vertex coordinates are relative to the original image
921 # and range from 0 to 1.
922 &quot;y&quot;: 3.14, # Y coordinate.
923 &quot;x&quot;: 3.14, # X coordinate.
924 },
925 ],
926 &quot;vertices&quot;: [ # The bounding polygon vertices.
927 { # A vertex represents a 2D point in the image.
928 # NOTE: the vertex coordinates are in the same scale as the original image.
929 &quot;y&quot;: 42, # Y coordinate.
930 &quot;x&quot;: 42, # X coordinate.
931 },
932 ],
933 },
934 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the paragraph. Range [0, 1].
935 &quot;words&quot;: [ # List of all words in this paragraph.
936 { # A word representation.
937 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the word.
938 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
939 { # Detected language for a structural component.
940 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
941 # information, see
942 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
943 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
944 },
945 ],
946 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
947 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
948 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
949 },
950 },
951 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the word.
952 # The vertices are in the order of top-left, top-right, bottom-right,
953 # bottom-left. When a rotation of the bounding box is detected the rotation
954 # is represented as around the top-left corner as defined when the text is
955 # read in the &#x27;natural&#x27; orientation.
956 # For example:
957 # * when the text is horizontal it might look like:
958 # 0----1
959 # | |
960 # 3----2
961 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
962 # 2----3
963 # | |
964 # 1----0
965 # and the vertex order will still be (0, 1, 2, 3).
966 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
967 { # A vertex represents a 2D point in the image.
968 # NOTE: the normalized vertex coordinates are relative to the original image
969 # and range from 0 to 1.
970 &quot;y&quot;: 3.14, # Y coordinate.
971 &quot;x&quot;: 3.14, # X coordinate.
972 },
973 ],
974 &quot;vertices&quot;: [ # The bounding polygon vertices.
975 { # A vertex represents a 2D point in the image.
976 # NOTE: the vertex coordinates are in the same scale as the original image.
977 &quot;y&quot;: 42, # Y coordinate.
978 &quot;x&quot;: 42, # X coordinate.
979 },
980 ],
981 },
982 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the word. Range [0, 1].
983 &quot;symbols&quot;: [ # List of symbols in the word.
984 # The order of the symbols follows the natural reading order.
985 { # A single symbol representation.
986 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the symbol.
987 # The vertices are in the order of top-left, top-right, bottom-right,
988 # bottom-left. When a rotation of the bounding box is detected the rotation
989 # is represented as around the top-left corner as defined when the text is
990 # read in the &#x27;natural&#x27; orientation.
991 # For example:
992 # * when the text is horizontal it might look like:
993 # 0----1
994 # | |
995 # 3----2
996 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
997 # 2----3
998 # | |
999 # 1----0
1000 # and the vertex order will still be (0, 1, 2, 3).
1001 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1002 { # A vertex represents a 2D point in the image.
1003 # NOTE: the normalized vertex coordinates are relative to the original image
1004 # and range from 0 to 1.
1005 &quot;y&quot;: 3.14, # Y coordinate.
1006 &quot;x&quot;: 3.14, # X coordinate.
1007 },
1008 ],
1009 &quot;vertices&quot;: [ # The bounding polygon vertices.
1010 { # A vertex represents a 2D point in the image.
1011 # NOTE: the vertex coordinates are in the same scale as the original image.
1012 &quot;y&quot;: 42, # Y coordinate.
1013 &quot;x&quot;: 42, # X coordinate.
1014 },
1015 ],
1016 },
1017 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the symbol. Range [0, 1].
1018 &quot;text&quot;: &quot;A String&quot;, # The actual UTF-8 representation of the symbol.
1019 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the symbol.
1020 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1021 { # Detected language for a structural component.
1022 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
1023 # information, see
1024 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1025 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
1026 },
1027 ],
1028 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
1029 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
1030 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
1031 },
1032 },
1033 },
1034 ],
1035 },
1036 ],
1037 },
1038 ],
1039 },
1040 ],
1041 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected on the page.
1042 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1043 { # Detected language for a structural component.
1044 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
1045 # information, see
1046 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1047 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
1048 },
1049 ],
1050 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
1051 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
1052 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
1053 },
1054 },
1055 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the page. Range [0, 1].
1056 &quot;height&quot;: 42, # Page height. For PDFs the unit is points. For images (including
1057 # TIFFs) the unit is pixels.
1058 },
1059 ],
1060 &quot;text&quot;: &quot;A String&quot;, # UTF-8 text detected on the pages.
1061 },
1062 &quot;textAnnotations&quot;: [ # If present, text (OCR) detection has completed successfully.
1063 { # Set of detected entity features.
1064 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
1065 # fields, such a score or string that qualifies the entity.
1066 { # A `Property` consists of a user-supplied name/value pair.
1067 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1068 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
1069 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1070 },
1071 ],
1072 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1073 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
1074 # `LocationInfo` elements can be present because one location may
1075 # indicate the location of the scene in the image, and another location
1076 # may indicate the location of the place where the image was taken.
1077 # Location information is usually present for landmarks.
1078 { # Detected entity location information.
1079 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
1080 # of doubles representing degrees latitude and degrees longitude. Unless
1081 # specified otherwise, this must conform to the
1082 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1083 # standard&lt;/a&gt;. Values must be within normalized ranges.
1084 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1085 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1086 },
1087 },
1088 ],
1089 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1090 # [Google Knowledge Graph Search
1091 # API](https://developers.google.com/knowledge-graph/).
1092 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
1093 # The accuracy of the entity detection in an image.
1094 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
1095 # this field represents the confidence that there is a tower in the query
1096 # image. Range [0, 1].
1097 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1098 # `description` is expressed.
1099 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
1100 # for `LABEL_DETECTION` features.
1101 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1102 { # A vertex represents a 2D point in the image.
1103 # NOTE: the normalized vertex coordinates are relative to the original image
1104 # and range from 0 to 1.
1105 &quot;y&quot;: 3.14, # Y coordinate.
1106 &quot;x&quot;: 3.14, # X coordinate.
1107 },
1108 ],
1109 &quot;vertices&quot;: [ # The bounding polygon vertices.
1110 { # A vertex represents a 2D point in the image.
1111 # NOTE: the vertex coordinates are in the same scale as the original image.
1112 &quot;y&quot;: 42, # Y coordinate.
1113 &quot;x&quot;: 42, # X coordinate.
1114 },
1115 ],
1116 },
1117 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1118 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1119 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1120 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1121 # detected distant towering building, even though the confidence that
1122 # there is a tower in each image may be the same. Range [0, 1].
1123 },
1124 ],
1125 &quot;imagePropertiesAnnotation&quot;: { # Stores image properties, such as dominant colors. # If present, image properties were extracted successfully.
1126 &quot;dominantColors&quot;: { # Set of dominant colors and their corresponding scores. # If present, dominant colors completed successfully.
1127 &quot;colors&quot;: [ # RGB color values with their score and pixel fraction.
1128 { # Color information consists of RGB channels, score, and the fraction of
1129 # the image that the color occupies in the image.
1130 &quot;pixelFraction&quot;: 3.14, # The fraction of pixels the color occupies in the image.
1131 # Value in range [0, 1].
1132 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed # RGB components of the color.
1133 # for simplicity of conversion to/from color representations in various
1134 # languages over compactness; for example, the fields of this representation
1135 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
1136 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
1137 # method in iOS; and, with just a little work, it can be easily formatted into
1138 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
1139 #
1140 # Note: this proto does not carry information about the absolute color space
1141 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
1142 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
1143 # space.
1144 #
1145 # Example (Java):
1146 #
1147 # import com.google.type.Color;
1148 #
1149 # // ...
1150 # public static java.awt.Color fromProto(Color protocolor) {
1151 # float alpha = protocolor.hasAlpha()
1152 # ? protocolor.getAlpha().getValue()
1153 # : 1.0;
1154 #
1155 # return new java.awt.Color(
1156 # protocolor.getRed(),
1157 # protocolor.getGreen(),
1158 # protocolor.getBlue(),
1159 # alpha);
1160 # }
1161 #
1162 # public static Color toProto(java.awt.Color color) {
1163 # float red = (float) color.getRed();
1164 # float green = (float) color.getGreen();
1165 # float blue = (float) color.getBlue();
1166 # float denominator = 255.0;
1167 # Color.Builder resultBuilder =
1168 # Color
1169 # .newBuilder()
1170 # .setRed(red / denominator)
1171 # .setGreen(green / denominator)
1172 # .setBlue(blue / denominator);
1173 # int alpha = color.getAlpha();
1174 # if (alpha != 255) {
1175 # result.setAlpha(
1176 # FloatValue
1177 # .newBuilder()
1178 # .setValue(((float) alpha) / denominator)
1179 # .build());
1180 # }
1181 # return resultBuilder.build();
1182 # }
1183 # // ...
1184 #
1185 # Example (iOS / Obj-C):
1186 #
1187 # // ...
1188 # static UIColor* fromProto(Color* protocolor) {
1189 # float red = [protocolor red];
1190 # float green = [protocolor green];
1191 # float blue = [protocolor blue];
1192 # FloatValue* alpha_wrapper = [protocolor alpha];
1193 # float alpha = 1.0;
1194 # if (alpha_wrapper != nil) {
1195 # alpha = [alpha_wrapper value];
1196 # }
1197 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1198 # }
1199 #
1200 # static Color* toProto(UIColor* color) {
1201 # CGFloat red, green, blue, alpha;
1202 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
1203 # return nil;
1204 # }
1205 # Color* result = [[Color alloc] init];
1206 # [result setRed:red];
1207 # [result setGreen:green];
1208 # [result setBlue:blue];
1209 # if (alpha &lt;= 0.9999) {
1210 # [result setAlpha:floatWrapperWithValue(alpha)];
1211 # }
1212 # [result autorelease];
1213 # return result;
1214 # }
1215 # // ...
1216 #
1217 # Example (JavaScript):
1218 #
1219 # // ...
1220 #
1221 # var protoToCssColor = function(rgb_color) {
1222 # var redFrac = rgb_color.red || 0.0;
1223 # var greenFrac = rgb_color.green || 0.0;
1224 # var blueFrac = rgb_color.blue || 0.0;
1225 # var red = Math.floor(redFrac * 255);
1226 # var green = Math.floor(greenFrac * 255);
1227 # var blue = Math.floor(blueFrac * 255);
1228 #
1229 # if (!(&#x27;alpha&#x27; in rgb_color)) {
1230 # return rgbToCssColor_(red, green, blue);
1231 # }
1232 #
1233 # var alphaFrac = rgb_color.alpha.value || 0.0;
1234 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
1235 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
1236 # };
1237 #
1238 # var rgbToCssColor_ = function(red, green, blue) {
1239 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
1240 # var hexString = rgbNumber.toString(16);
1241 # var missingZeros = 6 - hexString.length;
1242 # var resultBuilder = [&#x27;#&#x27;];
1243 # for (var i = 0; i &lt; missingZeros; i++) {
1244 # resultBuilder.push(&#x27;0&#x27;);
1245 # }
1246 # resultBuilder.push(hexString);
1247 # return resultBuilder.join(&#x27;&#x27;);
1248 # };
1249 #
1250 # // ...
1251 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
1252 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
1253 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1254 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is,
1255 # the final pixel color is defined by the equation:
1256 #
1257 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1258 #
1259 # This means that a value of 1.0 corresponds to a solid color, whereas
1260 # a value of 0.0 corresponds to a completely transparent color. This
1261 # uses a wrapper message rather than a simple float scalar so that it is
1262 # possible to distinguish between a default value and the value being unset.
1263 # If omitted, this color object is to be rendered as a solid color
1264 # (as if the alpha value had been explicitly given with a value of 1.0).
1265 },
1266 &quot;score&quot;: 3.14, # Image-specific score for this color. Value in range [0, 1].
1267 },
1268 ],
1269 },
1270 },
1271 },
1272 ],
1273 }</pre>
1274</div>
1275
1276<div class="method">
1277 <code class="details" id="asyncBatchAnnotate">asyncBatchAnnotate(parent, body=None, x__xgafv=None)</code>
1278 <pre>Run asynchronous image detection and annotation for a list of images.
1279
1280Progress and results can be retrieved through the
1281`google.longrunning.Operations` interface.
1282`Operation.metadata` contains `OperationMetadata` (metadata).
1283`Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
1284
1285This service will write image annotation outputs to json files in customer
1286GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
1287
1288Args:
1289 parent: string, Optional. Target project and location to make a call.
1290
1291Format: `projects/{project-id}/locations/{location-id}`.
1292
1293If no parent is specified, a region will be chosen automatically.
1294
1295Supported location-ids:
1296 `us`: USA country only,
1297 `asia`: East asia areas, like Japan, Taiwan,
1298 `eu`: The European Union.
1299
1300Example: `projects/project-A/locations/eu`. (required)
1301 body: object, The request body.
1302 The object takes the form of:
1303
1304{ # Request for async image annotation for a list of images.
1305 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
1306 #
1307 # Format: `projects/{project-id}/locations/{location-id}`.
1308 #
1309 # If no parent is specified, a region will be chosen automatically.
1310 #
1311 # Supported location-ids:
1312 # `us`: USA country only,
1313 # `asia`: East asia areas, like Japan, Taiwan,
1314 # `eu`: The European Union.
1315 #
1316 # Example: `projects/project-A/locations/eu`.
1317 &quot;outputConfig&quot;: { # The desired output location and metadata. # Required. The desired output location and metadata (e.g. format).
1318 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output will be written to. # The Google Cloud Storage location to write the output(s) to.
1319 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI prefix where the results will be stored. Results
1320 # will be in JSON format and preceded by its corresponding input URI prefix.
1321 # This field can either represent a gcs file prefix or gcs directory. In
1322 # either case, the uri should be unique because in order to get all of the
1323 # output files, you will need to do a wildcard gcs search on the uri prefix
1324 # you provide.
1325 #
1326 # Examples:
1327 #
1328 # * File Prefix: gs://bucket-name/here/filenameprefix The output files
1329 # will be created in gs://bucket-name/here/ and the names of the
1330 # output files will begin with &quot;filenameprefix&quot;.
1331 #
1332 # * Directory Prefix: gs://bucket-name/some/location/ The output files
1333 # will be created in gs://bucket-name/some/location/ and the names of the
1334 # output files could be anything because there was no filename prefix
1335 # specified.
1336 #
1337 # If multiple outputs, each response is still AnnotateFileResponse, each of
1338 # which contains some subset of the full list of AnnotateImageResponse.
1339 # Multiple outputs can happen if, for example, the output JSON is too large
1340 # and overflows into multiple sharded files.
1341 },
1342 &quot;batchSize&quot;: 42, # The max number of response protos to put into each output JSON file on
1343 # Google Cloud Storage.
1344 # The valid range is [1, 100]. If not specified, the default value is 20.
1345 #
1346 # For example, for one pdf file with 100 pages, 100 response protos will
1347 # be generated. If `batch_size` = 20, then 5 json files each
1348 # containing 20 response protos will be written under the prefix
1349 # `gcs_destination`.`uri`.
1350 #
1351 # Currently, batch_size only applies to GcsDestination, with potential future
1352 # support for other output configurations.
1353 },
1354 &quot;requests&quot;: [ # Required. Individual image annotation requests for this batch.
1355 { # Request for performing Google Cloud Vision API tasks over a user-provided
1356 # image, with user-requested features, and with context information.
1357 &quot;image&quot;: { # Client image to perform Google Cloud Vision API tasks over. # The image to be processed.
1358 &quot;content&quot;: &quot;A String&quot;, # Image content, represented as a stream of bytes.
1359 # Note: As with all `bytes` fields, protobuffers use a pure binary
1360 # representation, whereas JSON representations use base64.
1361 &quot;source&quot;: { # External image source (Google Cloud Storage or web URL image location). # Google Cloud Storage image location, or publicly-accessible image
1362 # URL. If both `content` and `source` are provided for an image, `content`
1363 # takes precedence and is used to perform the image annotation request.
1364 &quot;imageUri&quot;: &quot;A String&quot;, # The URI of the source image. Can be either:
1365 #
1366 # 1. A Google Cloud Storage URI of the form
1367 # `gs://bucket_name/object_name`. Object versioning is not supported. See
1368 # [Google Cloud Storage Request
1369 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
1370 # info.
1371 #
1372 # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
1373 # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
1374 # completed. Your request may fail if the specified host denies the
1375 # request (e.g. due to request throttling or DOS prevention), or if Google
1376 # throttles requests to the site for abuse prevention. You should not
1377 # depend on externally-hosted images for production applications.
1378 #
1379 # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
1380 # precedence.
1381 &quot;gcsImageUri&quot;: &quot;A String&quot;, # **Use `image_uri` instead.**
1382 #
1383 # The Google Cloud Storage URI of the form
1384 # `gs://bucket_name/object_name`. Object versioning is not supported. See
1385 # [Google Cloud Storage Request
1386 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
1387 },
1388 },
1389 &quot;features&quot;: [ # Requested features.
1390 { # The type of Google Cloud Vision API detection to perform, and the maximum
1391 # number of results to return for that type. Multiple `Feature` objects can
1392 # be specified in the `features` list.
1393 &quot;type&quot;: &quot;A String&quot;, # The feature type.
1394 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
1395 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
1396 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
1397 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
1398 # &quot;builtin/latest&quot;.
1399 },
1400 ],
1401 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image.
1402 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
1403 # yields the best results since it enables automatic language detection. For
1404 # languages based on the Latin alphabet, setting `language_hints` is not
1405 # needed. In rare cases, when the language of the text in the image is known,
1406 # setting a hint will help get better results (although it will be a
1407 # significant hindrance if the hint is wrong). Text detection returns an
1408 # error if one or more of the specified languages is not one of the
1409 # [supported languages](https://cloud.google.com/vision/docs/languages).
1410 &quot;A String&quot;,
1411 ],
1412 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
1413 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
1414 },
1415 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
1416 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
1417 # of doubles representing degrees latitude and degrees longitude. Unless
1418 # specified otherwise, this must conform to the
1419 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1420 # standard&lt;/a&gt;. Values must be within normalized ranges.
1421 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1422 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1423 },
1424 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
1425 # of doubles representing degrees latitude and degrees longitude. Unless
1426 # specified otherwise, this must conform to the
1427 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1428 # standard&lt;/a&gt;. Values must be within normalized ranges.
1429 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1430 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1431 },
1432 },
1433 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
1434 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
1435 # of the image. For example, if the desired aspect ratio is 4/3, the
1436 # corresponding float value should be 1.33333. If not specified, the
1437 # best possible crop is returned. The number of provided aspect ratios is
1438 # limited to a maximum of 16; any aspect ratios provided after the 16th are
1439 # ignored.
1440 3.14,
1441 ],
1442 },
1443 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
1444 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
1445 #
1446 # Format is:
1447 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
1448 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
1449 # If it is not specified, system discretion will be applied.
1450 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1451 { # A vertex represents a 2D point in the image.
1452 # NOTE: the normalized vertex coordinates are relative to the original image
1453 # and range from 0 to 1.
1454 &quot;y&quot;: 3.14, # Y coordinate.
1455 &quot;x&quot;: 3.14, # X coordinate.
1456 },
1457 ],
1458 &quot;vertices&quot;: [ # The bounding polygon vertices.
1459 { # A vertex represents a 2D point in the image.
1460 # NOTE: the vertex coordinates are in the same scale as the original image.
1461 &quot;y&quot;: 42, # Y coordinate.
1462 &quot;x&quot;: 42, # X coordinate.
1463 },
1464 ],
1465 },
1466 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
1467 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
1468 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
1469 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
1470 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
1471 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
1472 # migrate existing products to these categories as well.
1473 &quot;A String&quot;,
1474 ],
1475 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
1476 # on Product labels. We currently support an AND of OR of key-value
1477 # expressions, where each expression within an OR must have the same key. An
1478 # &#x27;=&#x27; should be used to connect the key and value.
1479 #
1480 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
1481 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
1482 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
1483 },
1484 },
1485 },
1486 ],
1487 }
1488
1489 x__xgafv: string, V1 error format.
1490 Allowed values
1491 1 - v1 error format
1492 2 - v2 error format
1493
1494Returns:
1495 An object of the form:
1496
1497 { # This resource represents a long-running operation that is the result of a
1498 # network API call.
1499 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1500 # different programming environments, including REST APIs and RPC APIs. It is
1501 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1502 # three pieces of data: error code, error message, and error details.
1503 #
1504 # You can find out more about this error model and how to work with it in the
1505 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1506 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1507 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1508 # user-facing error message should be localized and sent in the
1509 # google.rpc.Status.details field, or localized by the client.
1510 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1511 # message types for APIs to use.
1512 {
1513 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1514 },
1515 ],
1516 },
1517 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1518 # contains progress information and common metadata such as create time.
1519 # Some services might not provide such metadata. Any method that returns a
1520 # long-running operation should document the metadata type, if any.
1521 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1522 },
1523 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1524 # If `true`, the operation is completed, and either `error` or `response` is
1525 # available.
1526 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
1527 # method returns no data on success, such as `Delete`, the response is
1528 # `google.protobuf.Empty`. If the original method is standard
1529 # `Get`/`Create`/`Update`, the response should be the resource. For other
1530 # methods, the response should have the type `XxxResponse`, where `Xxx`
1531 # is the original method name. For example, if the original method name
1532 # is `TakeSnapshot()`, the inferred response type is
1533 # `TakeSnapshotResponse`.
1534 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1535 },
1536 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
1537 # originally returns it. If you use the default HTTP mapping, the
1538 # `name` should be a resource name ending with `operations/{unique_id}`.
1539 }</pre>
1540</div>
1541
1542</body></html>