blob: 0b67a5d79642cd09f6dc1e9228d89eac2ba9183a [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="vision_v1.html">Cloud Vision API</a> . <a href="vision_v1.images.html">images</a></h1>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#annotate">annotate(body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070079<p class="firstline">Run image detection and annotation for a batch of images.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#asyncBatchAnnotate">asyncBatchAnnotate(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Run asynchronous image detection and annotation for a list of images.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070083<h3>Method Details</h3>
84<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070085 <code class="details" id="annotate">annotate(body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070086 <pre>Run image detection and annotation for a batch of images.
87
88Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070089 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070090 The object takes the form of:
91
92{ # Multiple image annotation requests are batched into a single service call.
Bu Sun Kim65020912020-05-20 12:08:20 -070093 &quot;requests&quot;: [ # Required. Individual image annotation requests for this batch.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070094 { # Request for performing Google Cloud Vision API tasks over a user-provided
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070095 # image, with user-requested features, and with context information.
Bu Sun Kim65020912020-05-20 12:08:20 -070096 &quot;image&quot;: { # Client image to perform Google Cloud Vision API tasks over. # The image to be processed.
97 &quot;content&quot;: &quot;A String&quot;, # Image content, represented as a stream of bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 # Note: As with all `bytes` fields, protobuffers use a pure binary
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070099 # representation, whereas JSON representations use base64.
Bu Sun Kim65020912020-05-20 12:08:20 -0700100 &quot;source&quot;: { # External image source (Google Cloud Storage or web URL image location). # Google Cloud Storage image location, or publicly-accessible image
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101 # URL. If both `content` and `source` are provided for an image, `content`
102 # takes precedence and is used to perform the image annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700103 &quot;gcsImageUri&quot;: &quot;A String&quot;, # **Use `image_uri` instead.**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104 #
105 # The Google Cloud Storage URI of the form
106 # `gs://bucket_name/object_name`. Object versioning is not supported. See
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400107 # [Google Cloud Storage Request
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 &quot;imageUri&quot;: &quot;A String&quot;, # The URI of the source image. Can be either:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 #
111 # 1. A Google Cloud Storage URI of the form
112 # `gs://bucket_name/object_name`. Object versioning is not supported. See
113 # [Google Cloud Storage Request
114 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
115 # info.
116 #
117 # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
118 # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
119 # completed. Your request may fail if the specified host denies the
120 # request (e.g. due to request throttling or DOS prevention), or if Google
121 # throttles requests to the site for abuse prevention. You should not
122 # depend on externally-hosted images for production applications.
123 #
124 # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400125 # precedence.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700126 },
127 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700128 &quot;features&quot;: [ # Requested features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 { # The type of Google Cloud Vision API detection to perform, and the maximum
130 # number of results to return for that type. Multiple `Feature` objects can
131 # be specified in the `features` list.
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 &quot;type&quot;: &quot;A String&quot;, # The feature type.
133 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700135 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
136 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
137 # &quot;builtin/latest&quot;.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700138 },
139 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image.
141 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
142 # yields the best results since it enables automatic language detection. For
143 # languages based on the Latin alphabet, setting `language_hints` is not
144 # needed. In rare cases, when the language of the text in the image is known,
145 # setting a hint will help get better results (although it will be a
146 # significant hindrance if the hint is wrong). Text detection returns an
147 # error if one or more of the specified languages is not one of the
148 # [supported languages](https://cloud.google.com/vision/docs/languages).
149 &quot;A String&quot;,
150 ],
151 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
152 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
153 },
154 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
155 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
156 # of doubles representing degrees latitude and degrees longitude. Unless
157 # specified otherwise, this must conform to the
158 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
159 # standard&lt;/a&gt;. Values must be within normalized ranges.
160 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
161 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
162 },
163 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
164 # of doubles representing degrees latitude and degrees longitude. Unless
165 # specified otherwise, this must conform to the
166 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
167 # standard&lt;/a&gt;. Values must be within normalized ranges.
168 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
169 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
170 },
171 },
172 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
173 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
174 # of the image. For example, if the desired aspect ratio is 4/3, the
175 # corresponding float value should be 1.33333. If not specified, the
176 # best possible crop is returned. The number of provided aspect ratios is
177 # limited to a maximum of 16; any aspect ratios provided after the 16th are
178 # ignored.
179 3.14,
180 ],
181 },
182 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
184 # on Product labels. We currently support an AND of OR of key-value
185 # expressions, where each expression within an OR must have the same key. An
186 # &#x27;=&#x27; should be used to connect the key and value.
187 #
188 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
189 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
190 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
191 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
192 #
193 # Format is:
194 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
195 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
196 # If it is not specified, system discretion will be applied.
197 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
198 { # A vertex represents a 2D point in the image.
199 # NOTE: the normalized vertex coordinates are relative to the original image
200 # and range from 0 to 1.
201 &quot;y&quot;: 3.14, # Y coordinate.
202 &quot;x&quot;: 3.14, # X coordinate.
203 },
204 ],
205 &quot;vertices&quot;: [ # The bounding polygon vertices.
206 { # A vertex represents a 2D point in the image.
207 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700209 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 },
211 ],
212 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700213 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
214 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
215 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
216 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
217 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
218 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
219 # migrate existing products to these categories as well.
220 &quot;A String&quot;,
221 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 },
223 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700224 },
225 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700226 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
227 #
228 # Format: `projects/{project-id}/locations/{location-id}`.
229 #
230 # If no parent is specified, a region will be chosen automatically.
231 #
232 # Supported location-ids:
233 # `us`: USA country only,
234 # `asia`: East asia areas, like Japan, Taiwan,
235 # `eu`: The European Union.
236 #
237 # Example: `projects/project-A/locations/eu`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700238 }
239
240 x__xgafv: string, V1 error format.
241 Allowed values
242 1 - v1 error format
243 2 - v2 error format
244
245Returns:
246 An object of the form:
247
248 { # Response to a batch image annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 &quot;responses&quot;: [ # Individual responses to image annotation requests within the batch.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700250 { # Response to an image annotation request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700251 &quot;landmarkAnnotations&quot;: [ # If present, landmark detection has completed successfully.
252 { # Set of detected entity features.
253 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
254 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
255 # `LocationInfo` elements can be present because one location may
256 # indicate the location of the scene in the image, and another location
257 # may indicate the location of the place where the image was taken.
258 # Location information is usually present for landmarks.
259 { # Detected entity location information.
260 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
261 # of doubles representing degrees latitude and degrees longitude. Unless
262 # specified otherwise, this must conform to the
263 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
264 # standard&lt;/a&gt;. Values must be within normalized ranges.
265 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
266 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
267 },
268 },
269 ],
270 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
271 # [Google Knowledge Graph Search
272 # API](https://developers.google.com/knowledge-graph/).
273 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
274 # The accuracy of the entity detection in an image.
275 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
276 # this field represents the confidence that there is a tower in the query
277 # image. Range [0, 1].
278 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
279 # `description` is expressed.
280 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
281 # for `LABEL_DETECTION` features.
282 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
283 { # A vertex represents a 2D point in the image.
284 # NOTE: the normalized vertex coordinates are relative to the original image
285 # and range from 0 to 1.
286 &quot;y&quot;: 3.14, # Y coordinate.
287 &quot;x&quot;: 3.14, # X coordinate.
288 },
289 ],
290 &quot;vertices&quot;: [ # The bounding polygon vertices.
291 { # A vertex represents a 2D point in the image.
292 # NOTE: the vertex coordinates are in the same scale as the original image.
293 &quot;x&quot;: 42, # X coordinate.
294 &quot;y&quot;: 42, # Y coordinate.
295 },
296 ],
297 },
298 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
299 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
300 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
301 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
302 # detected distant towering building, even though the confidence that
303 # there is a tower in each image may be the same. Range [0, 1].
304 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
305 # fields, such a score or string that qualifies the entity.
306 { # A `Property` consists of a user-supplied name/value pair.
307 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
308 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
309 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
310 },
311 ],
312 },
313 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700314 &quot;faceAnnotations&quot;: [ # If present, face detection has completed successfully.
315 { # A face annotation object contains the results of face detection.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700316 &quot;sorrowLikelihood&quot;: &quot;A String&quot;, # Sorrow likelihood.
Bu Sun Kim65020912020-05-20 12:08:20 -0700317 &quot;tiltAngle&quot;: 3.14, # Pitch angle, which indicates the upwards/downwards angle that the face is
318 # pointing relative to the image&#x27;s horizontal plane. Range [-180,180].
319 &quot;fdBoundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The `fd_bounding_poly` bounding polygon is tighter than the
320 # `boundingPoly`, and encloses only the skin part of the face. Typically, it
321 # is used to eliminate the face from any image analysis that detects the
322 # &quot;amount of skin&quot; visible in an image. It is not based on the
323 # landmarker results, only on the initial face detection, hence
324 # the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
325 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
326 { # A vertex represents a 2D point in the image.
327 # NOTE: the normalized vertex coordinates are relative to the original image
328 # and range from 0 to 1.
329 &quot;y&quot;: 3.14, # Y coordinate.
330 &quot;x&quot;: 3.14, # X coordinate.
331 },
332 ],
333 &quot;vertices&quot;: [ # The bounding polygon vertices.
334 { # A vertex represents a 2D point in the image.
335 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700336 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700337 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 },
339 ],
340 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700341 &quot;landmarks&quot;: [ # Detected face landmarks.
342 { # A face-specific landmark (for example, a face feature).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700343 &quot;type&quot;: &quot;A String&quot;, # Face landmark type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700344 &quot;position&quot;: { # A 3D position in the image, used primarily for Face detection landmarks. # Face landmark position.
345 # A valid Position must have both x and y coordinates.
346 # The position coordinates are in the same scale as the original image.
347 &quot;y&quot;: 3.14, # Y coordinate.
348 &quot;x&quot;: 3.14, # X coordinate.
349 &quot;z&quot;: 3.14, # Z coordinate (or depth).
350 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 },
352 ],
353 &quot;surpriseLikelihood&quot;: &quot;A String&quot;, # Surprise likelihood.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700354 &quot;angerLikelihood&quot;: &quot;A String&quot;, # Anger likelihood.
Bu Sun Kim65020912020-05-20 12:08:20 -0700355 &quot;landmarkingConfidence&quot;: 3.14, # Face landmarking confidence. Range [0, 1].
356 &quot;joyLikelihood&quot;: &quot;A String&quot;, # Joy likelihood.
357 &quot;underExposedLikelihood&quot;: &quot;A String&quot;, # Under-exposed likelihood.
358 &quot;panAngle&quot;: 3.14, # Yaw angle, which indicates the leftward/rightward angle that the face is
359 # pointing relative to the vertical plane perpendicular to the image. Range
360 # [-180,180].
361 &quot;detectionConfidence&quot;: 3.14, # Detection confidence. Range [0, 1].
362 &quot;blurredLikelihood&quot;: &quot;A String&quot;, # Blurred likelihood.
363 &quot;headwearLikelihood&quot;: &quot;A String&quot;, # Headwear likelihood.
364 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the face. The coordinates of the bounding box
365 # are in the original image&#x27;s scale.
366 # The bounding box is computed to &quot;frame&quot; the face in accordance with human
367 # expectations. It is based on the landmarker results.
368 # Note that one or more x and/or y coordinates may not be generated in the
369 # `BoundingPoly` (the polygon will be unbounded) if only a partial face
370 # appears in the image to be annotated.
371 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
372 { # A vertex represents a 2D point in the image.
373 # NOTE: the normalized vertex coordinates are relative to the original image
374 # and range from 0 to 1.
375 &quot;y&quot;: 3.14, # Y coordinate.
376 &quot;x&quot;: 3.14, # X coordinate.
377 },
378 ],
379 &quot;vertices&quot;: [ # The bounding polygon vertices.
380 { # A vertex represents a 2D point in the image.
381 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700383 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 },
385 ],
386 },
387 &quot;rollAngle&quot;: 3.14, # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
388 # of the face relative to the image vertical about the axis perpendicular to
389 # the face. Range [-180,180].
Bu Sun Kim65020912020-05-20 12:08:20 -0700390 },
391 ],
392 &quot;cropHintsAnnotation&quot;: { # Set of crop hints that are used to generate new crops when serving images. # If present, crop hints have completed successfully.
393 &quot;cropHints&quot;: [ # Crop hint results.
394 { # Single crop hint that is used to generate a new crop when serving an image.
395 &quot;confidence&quot;: 3.14, # Confidence of this being a salient region. Range [0, 1].
396 &quot;importanceFraction&quot;: 3.14, # Fraction of importance of this salient region with respect to the original
397 # image.
398 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the crop region. The coordinates of the bounding
399 # box are in the original image&#x27;s scale.
400 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
401 { # A vertex represents a 2D point in the image.
402 # NOTE: the normalized vertex coordinates are relative to the original image
403 # and range from 0 to 1.
404 &quot;y&quot;: 3.14, # Y coordinate.
405 &quot;x&quot;: 3.14, # X coordinate.
406 },
407 ],
408 &quot;vertices&quot;: [ # The bounding polygon vertices.
409 { # A vertex represents a 2D point in the image.
410 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700411 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700412 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700413 },
414 ],
415 },
416 },
417 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700418 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700419 &quot;labelAnnotations&quot;: [ # If present, label detection has completed successfully.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700420 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700421 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
422 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800423 # `LocationInfo` elements can be present because one location may
424 # indicate the location of the scene in the image, and another location
425 # may indicate the location of the place where the image was taken.
426 # Location information is usually present for landmarks.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700427 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700429 # of doubles representing degrees latitude and degrees longitude. Unless
430 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -0700431 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -0700432 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700433 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
434 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700435 },
436 },
437 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700438 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 # [Google Knowledge Graph Search
440 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700441 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
442 # The accuracy of the entity detection in an image.
443 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
444 # this field represents the confidence that there is a tower in the query
445 # image. Range [0, 1].
446 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
447 # `description` is expressed.
448 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700450 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700451 { # A vertex represents a 2D point in the image.
452 # NOTE: the normalized vertex coordinates are relative to the original image
453 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 &quot;y&quot;: 3.14, # Y coordinate.
455 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456 },
457 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700458 &quot;vertices&quot;: [ # The bounding polygon vertices.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700459 { # A vertex represents a 2D point in the image.
460 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700462 &quot;y&quot;: 42, # Y coordinate.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700463 },
464 ],
465 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700466 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
467 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
468 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
469 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
470 # detected distant towering building, even though the confidence that
471 # there is a tower in each image may be the same. Range [0, 1].
472 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800473 # fields, such a score or string that qualifies the entity.
474 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
476 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
477 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700478 },
479 ],
480 },
481 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700482 &quot;productSearchResults&quot;: { # Results for a product search request. # If present, product search has completed successfully.
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &quot;productGroupedResults&quot;: [ # List of results grouped by products detected in the query image. Each entry
484 # corresponds to one bounding polygon in the query image, and contains the
485 # matching products specific to that region. There may be duplicate product
486 # matches in the union of all the per-product results.
487 { # Information about the products similar to a single product in a query
488 # image.
489 &quot;objectAnnotations&quot;: [ # List of generic predictions for the object in the bounding box.
490 { # Prediction for what the object in the bounding box is.
Bu Sun Kim65020912020-05-20 12:08:20 -0700491 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
492 &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
493 # information, see
494 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
495 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700496 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 },
498 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the product detected in the query image.
500 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
501 { # A vertex represents a 2D point in the image.
502 # NOTE: the normalized vertex coordinates are relative to the original image
503 # and range from 0 to 1.
504 &quot;y&quot;: 3.14, # Y coordinate.
505 &quot;x&quot;: 3.14, # X coordinate.
506 },
507 ],
508 &quot;vertices&quot;: [ # The bounding polygon vertices.
509 { # A vertex represents a 2D point in the image.
510 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700512 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700513 },
514 ],
515 },
516 &quot;results&quot;: [ # List of results, one for each product match.
517 { # Information about a product.
518 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
519 # to the query.
520 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
521 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
522 #
523 # Format is:
524 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
525 #
526 # This field is ignored when creating a product.
527 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
528 # 4096 characters long.
529 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
530 # characters long.
531 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
532 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
533 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
534 # not be used for new products.
535 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
536 # constraints can be specified based on the product_labels.
537 #
538 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
539 # strings with integer values can match a range-based restriction which is
540 # to be supported soon.
541 #
542 # Multiple values can be assigned to the same key. One product may have up to
543 # 500 product_labels.
544 #
545 # Notice that the total number of distinct product_labels over all products
546 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
547 # will refuse to work for that ProductSet.
548 { # A product label represented as a key-value pair.
549 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
550 # cannot exceed 128 bytes.
551 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
552 # exceed 128 bytes.
553 },
554 ],
555 },
556 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
557 # 1 (full confidence).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 },
559 ],
560 },
561 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700562 &quot;results&quot;: [ # List of results, one for each product match.
563 { # Information about a product.
564 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
565 # to the query.
566 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
567 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
568 #
569 # Format is:
570 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
571 #
572 # This field is ignored when creating a product.
573 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
574 # 4096 characters long.
575 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
576 # characters long.
577 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
578 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
579 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
580 # not be used for new products.
581 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
582 # constraints can be specified based on the product_labels.
583 #
584 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
585 # strings with integer values can match a range-based restriction which is
586 # to be supported soon.
587 #
588 # Multiple values can be assigned to the same key. One product may have up to
589 # 500 product_labels.
590 #
591 # Notice that the total number of distinct product_labels over all products
592 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
593 # will refuse to work for that ProductSet.
594 { # A product label represented as a key-value pair.
595 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
596 # cannot exceed 128 bytes.
597 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
598 # exceed 128 bytes.
599 },
600 ],
601 },
602 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
603 # 1 (full confidence).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400604 },
605 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700606 &quot;indexTime&quot;: &quot;A String&quot;, # Timestamp of the index which provided these results. Products added to the
607 # product set and products removed from the product set after this time are
608 # not reflected in the current results.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400609 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 &quot;localizedObjectAnnotations&quot;: [ # If present, localized object detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 # This will be sorted descending by confidence score.
612 { # Set of detected objects with bounding boxes.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700613 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
614 &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
615 # information, see
616 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
617 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
619 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this object belongs. This must be populated.
620 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700621 { # A vertex represents a 2D point in the image.
622 # NOTE: the normalized vertex coordinates are relative to the original image
623 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 &quot;y&quot;: 3.14, # Y coordinate.
625 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700626 },
627 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700628 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 { # A vertex represents a 2D point in the image.
630 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700632 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700633 },
634 ],
635 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636 },
637 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700638 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # If set, represents the error message for the operation.
639 # Note that filled-in image annotations are guaranteed to be
640 # correct, even when `error` is set.
641 # different programming environments, including REST APIs and RPC APIs. It is
642 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
643 # three pieces of data: error code, error message, and error details.
644 #
645 # You can find out more about this error model and how to work with it in the
646 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700647 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
648 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
649 # user-facing error message should be localized and sent in the
650 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700651 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
652 # message types for APIs to use.
653 {
654 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
655 },
656 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 },
658 &quot;fullTextAnnotation&quot;: { # TextAnnotation contains a structured representation of OCR extracted text. # If present, text (OCR) detection or document (OCR) text detection has
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400659 # completed successfully.
660 # This annotation provides the structural hierarchy for the OCR detected
661 # text.
662 # The hierarchy of an OCR extracted text structure is like this:
Dan O'Mearadd494642020-05-01 07:42:23 -0700663 # TextAnnotation -&gt; Page -&gt; Block -&gt; Paragraph -&gt; Word -&gt; Symbol
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400664 # Each structural component, starting from Page, may further have their own
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665 # properties. Properties describe detected languages, breaks etc.. Please refer
666 # to the TextAnnotation.TextProperty message definition below for more
667 # detail.
Bu Sun Kim65020912020-05-20 12:08:20 -0700668 &quot;pages&quot;: [ # List of pages detected by OCR.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400669 { # Detected page from OCR.
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 &quot;blocks&quot;: [ # List of blocks of text, images etc on this page.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400671 { # Logical element on the page.
Bu Sun Kim65020912020-05-20 12:08:20 -0700672 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the block.
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
674 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
675 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
676 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700677 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
678 { # Detected language for a structural component.
679 &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
680 # information, see
681 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
682 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
683 },
684 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 },
686 &quot;blockType&quot;: &quot;A String&quot;, # Detected block type (text, image etc) for this block.
687 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the block.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400688 # The vertices are in the order of top-left, top-right, bottom-right,
689 # bottom-left. When a rotation of the bounding box is detected the rotation
690 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700691 # read in the &#x27;natural&#x27; orientation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400692 # For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700693 #
694 # * when the text is horizontal it might look like:
695 #
696 # 0----1
697 # | |
698 # 3----2
699 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700700 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 #
702 # 2----3
703 # | |
704 # 1----0
705 #
706 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700707 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700708 { # A vertex represents a 2D point in the image.
709 # NOTE: the normalized vertex coordinates are relative to the original image
710 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 &quot;y&quot;: 3.14, # Y coordinate.
712 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 },
714 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 &quot;vertices&quot;: [ # The bounding polygon vertices.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400716 { # A vertex represents a 2D point in the image.
717 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700719 &quot;y&quot;: 42, # Y coordinate.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400720 },
721 ],
722 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the block. Range [0, 1].
724 &quot;paragraphs&quot;: [ # List of paragraphs in this block (if this blocks is of type text).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400725 { # Structural unit of text representing a number of words in certain order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the paragraph.
Bu Sun Kim65020912020-05-20 12:08:20 -0700727 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
728 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
729 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
730 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700731 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
732 { # Detected language for a structural component.
733 &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
734 # information, see
735 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
736 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
737 },
738 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 },
740 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the paragraph.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400741 # The vertices are in the order of top-left, top-right, bottom-right,
742 # bottom-left. When a rotation of the bounding box is detected the rotation
743 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700744 # read in the &#x27;natural&#x27; orientation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400745 # For example:
746 # * when the text is horizontal it might look like:
747 # 0----1
748 # | |
749 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700750 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400751 # 2----3
752 # | |
753 # 1----0
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700754 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700755 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700756 { # A vertex represents a 2D point in the image.
757 # NOTE: the normalized vertex coordinates are relative to the original image
758 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 &quot;y&quot;: 3.14, # Y coordinate.
760 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700761 },
762 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700763 &quot;vertices&quot;: [ # The bounding polygon vertices.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400764 { # A vertex represents a 2D point in the image.
765 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700767 &quot;y&quot;: 42, # Y coordinate.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400768 },
769 ],
770 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700771 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the paragraph. Range [0, 1].
772 &quot;words&quot;: [ # List of all words in this paragraph.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400773 { # A word representation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700774 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the word.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400775 # The vertices are in the order of top-left, top-right, bottom-right,
776 # bottom-left. When a rotation of the bounding box is detected the rotation
777 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 # read in the &#x27;natural&#x27; orientation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400779 # For example:
780 # * when the text is horizontal it might look like:
781 # 0----1
782 # | |
783 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400785 # 2----3
786 # | |
787 # 1----0
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700788 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700789 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700790 { # A vertex represents a 2D point in the image.
791 # NOTE: the normalized vertex coordinates are relative to the original image
792 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700793 &quot;y&quot;: 3.14, # Y coordinate.
794 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700795 },
796 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 &quot;vertices&quot;: [ # The bounding polygon vertices.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400798 { # A vertex represents a 2D point in the image.
799 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700800 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700801 &quot;y&quot;: 42, # Y coordinate.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400802 },
803 ],
804 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700805 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the word. Range [0, 1].
806 &quot;symbols&quot;: [ # List of symbols in the word.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400807 # The order of the symbols follows the natural reading order.
808 { # A single symbol representation.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700809 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the symbol.
810 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
811 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
812 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
813 },
814 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
815 { # Detected language for a structural component.
816 &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
817 # information, see
818 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
819 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
820 },
821 ],
822 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700823 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the symbol.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400824 # The vertices are in the order of top-left, top-right, bottom-right,
825 # bottom-left. When a rotation of the bounding box is detected the rotation
826 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700827 # read in the &#x27;natural&#x27; orientation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400828 # For example:
829 # * when the text is horizontal it might look like:
830 # 0----1
831 # | |
832 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400834 # 2----3
835 # | |
836 # 1----0
Dan O'Mearadd494642020-05-01 07:42:23 -0700837 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700838 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 { # A vertex represents a 2D point in the image.
840 # NOTE: the normalized vertex coordinates are relative to the original image
841 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700842 &quot;y&quot;: 3.14, # Y coordinate.
843 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700844 },
845 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700846 &quot;vertices&quot;: [ # The bounding polygon vertices.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400847 { # A vertex represents a 2D point in the image.
848 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700849 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700850 &quot;y&quot;: 42, # Y coordinate.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400851 },
852 ],
853 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the symbol. Range [0, 1].
855 &quot;text&quot;: &quot;A String&quot;, # The actual UTF-8 representation of the symbol.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400856 },
857 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700858 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the word.
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
860 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
861 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
862 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700863 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
864 { # Detected language for a structural component.
865 &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
866 # information, see
867 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
868 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
869 },
870 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400871 },
872 },
873 ],
874 },
875 ],
876 },
877 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700878 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected on the page.
Bu Sun Kim65020912020-05-20 12:08:20 -0700879 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
880 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
881 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
882 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700883 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
884 { # Detected language for a structural component.
885 &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
886 # information, see
887 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
888 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
889 },
890 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700891 },
892 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the page. Range [0, 1].
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700893 &quot;height&quot;: 42, # Page height. For PDFs the unit is points. For images (including
894 # TIFFs) the unit is pixels.
895 &quot;width&quot;: 42, # Page width. For PDFs the unit is points. For images (including
896 # TIFFs) the unit is pixels.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400897 },
898 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700899 &quot;text&quot;: &quot;A String&quot;, # UTF-8 text detected on the pages.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400900 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700901 &quot;textAnnotations&quot;: [ # If present, text (OCR) detection has completed successfully.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700902 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
904 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800905 # `LocationInfo` elements can be present because one location may
906 # indicate the location of the scene in the image, and another location
907 # may indicate the location of the place where the image was taken.
908 # Location information is usually present for landmarks.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700909 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700910 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700911 # of doubles representing degrees latitude and degrees longitude. Unless
912 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -0700913 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -0700914 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700915 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
916 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700917 },
918 },
919 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700920 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700921 # [Google Knowledge Graph Search
922 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700923 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
924 # The accuracy of the entity detection in an image.
925 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
926 # this field represents the confidence that there is a tower in the query
927 # image. Range [0, 1].
928 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
929 # `description` is expressed.
930 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700932 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700933 { # A vertex represents a 2D point in the image.
934 # NOTE: the normalized vertex coordinates are relative to the original image
935 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700936 &quot;y&quot;: 3.14, # Y coordinate.
937 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700938 },
939 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700940 &quot;vertices&quot;: [ # The bounding polygon vertices.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700941 { # A vertex represents a 2D point in the image.
942 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700944 &quot;y&quot;: 42, # Y coordinate.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700945 },
946 ],
947 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
949 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
950 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
951 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
952 # detected distant towering building, even though the confidence that
953 # there is a tower in each image may be the same. Range [0, 1].
954 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800955 # fields, such a score or string that qualifies the entity.
956 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -0700957 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
958 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
959 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700960 },
961 ],
962 },
963 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700964 &quot;imagePropertiesAnnotation&quot;: { # Stores image properties, such as dominant colors. # If present, image properties were extracted successfully.
965 &quot;dominantColors&quot;: { # Set of dominant colors and their corresponding scores. # If present, dominant colors completed successfully.
966 &quot;colors&quot;: [ # RGB color values with their score and pixel fraction.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800967 { # Color information consists of RGB channels, score, and the fraction of
968 # the image that the color occupies in the image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700969 &quot;score&quot;: 3.14, # Image-specific score for this color. Value in range [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -0700970 &quot;pixelFraction&quot;: 3.14, # The fraction of pixels the color occupies in the image.
971 # Value in range [0, 1].
972 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed # RGB components of the color.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700973 # for simplicity of conversion to/from color representations in various
974 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
976 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700977 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -0700978 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 #
980 # Note: this proto does not carry information about the absolute color space
981 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
982 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
983 # space.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700984 #
985 # Example (Java):
986 #
987 # import com.google.type.Color;
988 #
989 # // ...
990 # public static java.awt.Color fromProto(Color protocolor) {
991 # float alpha = protocolor.hasAlpha()
992 # ? protocolor.getAlpha().getValue()
993 # : 1.0;
994 #
995 # return new java.awt.Color(
996 # protocolor.getRed(),
997 # protocolor.getGreen(),
998 # protocolor.getBlue(),
999 # alpha);
1000 # }
1001 #
1002 # public static Color toProto(java.awt.Color color) {
1003 # float red = (float) color.getRed();
1004 # float green = (float) color.getGreen();
1005 # float blue = (float) color.getBlue();
1006 # float denominator = 255.0;
1007 # Color.Builder resultBuilder =
1008 # Color
1009 # .newBuilder()
1010 # .setRed(red / denominator)
1011 # .setGreen(green / denominator)
1012 # .setBlue(blue / denominator);
1013 # int alpha = color.getAlpha();
1014 # if (alpha != 255) {
1015 # result.setAlpha(
1016 # FloatValue
1017 # .newBuilder()
1018 # .setValue(((float) alpha) / denominator)
1019 # .build());
1020 # }
1021 # return resultBuilder.build();
1022 # }
1023 # // ...
1024 #
1025 # Example (iOS / Obj-C):
1026 #
1027 # // ...
1028 # static UIColor* fromProto(Color* protocolor) {
1029 # float red = [protocolor red];
1030 # float green = [protocolor green];
1031 # float blue = [protocolor blue];
1032 # FloatValue* alpha_wrapper = [protocolor alpha];
1033 # float alpha = 1.0;
1034 # if (alpha_wrapper != nil) {
1035 # alpha = [alpha_wrapper value];
1036 # }
1037 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1038 # }
1039 #
1040 # static Color* toProto(UIColor* color) {
1041 # CGFloat red, green, blue, alpha;
Dan O'Mearadd494642020-05-01 07:42:23 -07001042 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001043 # return nil;
1044 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001045 # Color* result = [[Color alloc] init];
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001046 # [result setRed:red];
1047 # [result setGreen:green];
1048 # [result setBlue:blue];
Dan O'Mearadd494642020-05-01 07:42:23 -07001049 # if (alpha &lt;= 0.9999) {
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001050 # [result setAlpha:floatWrapperWithValue(alpha)];
1051 # }
1052 # [result autorelease];
1053 # return result;
1054 # }
1055 # // ...
1056 #
1057 # Example (JavaScript):
1058 #
1059 # // ...
1060 #
1061 # var protoToCssColor = function(rgb_color) {
1062 # var redFrac = rgb_color.red || 0.0;
1063 # var greenFrac = rgb_color.green || 0.0;
1064 # var blueFrac = rgb_color.blue || 0.0;
1065 # var red = Math.floor(redFrac * 255);
1066 # var green = Math.floor(greenFrac * 255);
1067 # var blue = Math.floor(blueFrac * 255);
1068 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001070 # return rgbToCssColor_(red, green, blue);
1071 # }
1072 #
1073 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -07001074 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
1075 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001076 # };
1077 #
1078 # var rgbToCssColor_ = function(red, green, blue) {
Dan O'Mearadd494642020-05-01 07:42:23 -07001079 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001080 # var hexString = rgbNumber.toString(16);
1081 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -07001082 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -07001083 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -07001084 # resultBuilder.push(&#x27;0&#x27;);
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001085 # }
1086 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -07001087 # return resultBuilder.join(&#x27;&#x27;);
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001088 # };
1089 #
1090 # // ...
Bu Sun Kim65020912020-05-20 12:08:20 -07001091 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
1092 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
1093 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1094 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001095 # the final pixel color is defined by the equation:
1096 #
1097 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1098 #
1099 # This means that a value of 1.0 corresponds to a solid color, whereas
1100 # a value of 0.0 corresponds to a completely transparent color. This
1101 # uses a wrapper message rather than a simple float scalar so that it is
1102 # possible to distinguish between a default value and the value being unset.
1103 # If omitted, this color object is to be rendered as a solid color
1104 # (as if the alpha value had been explicitly given with a value of 1.0).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001105 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001106 },
1107 ],
1108 },
1109 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001110 &quot;logoAnnotations&quot;: [ # If present, logo detection has completed successfully.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001111 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001112 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1113 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001114 # `LocationInfo` elements can be present because one location may
1115 # indicate the location of the scene in the image, and another location
1116 # may indicate the location of the place where the image was taken.
1117 # Location information is usually present for landmarks.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001118 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001119 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001120 # of doubles representing degrees latitude and degrees longitude. Unless
1121 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -07001122 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -07001123 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -07001124 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1125 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001126 },
1127 },
1128 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001129 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001130 # [Google Knowledge Graph Search
1131 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001132 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001133 # The accuracy of the entity detection in an image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001135 # this field represents the confidence that there is a tower in the query
1136 # image. Range [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -07001137 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001138 # `description` is expressed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001139 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001140 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001141 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001142 { # A vertex represents a 2D point in the image.
1143 # NOTE: the normalized vertex coordinates are relative to the original image
1144 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 &quot;y&quot;: 3.14, # Y coordinate.
1146 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001147 },
1148 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001149 &quot;vertices&quot;: [ # The bounding polygon vertices.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001150 { # A vertex represents a 2D point in the image.
1151 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001152 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001153 &quot;y&quot;: 42, # Y coordinate.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001154 },
1155 ],
1156 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1158 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1159 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1160 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1161 # detected distant towering building, even though the confidence that
1162 # there is a tower in each image may be the same. Range [0, 1].
1163 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001164 # fields, such a score or string that qualifies the entity.
1165 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -07001166 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1167 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1168 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001169 },
1170 ],
1171 },
1172 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001173 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001174 # comes from.
1175 # information about the source of that image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001176 &quot;uri&quot;: &quot;A String&quot;, # The URI of the file used to produce the image.
1177 &quot;pageNumber&quot;: 42, # If the file was a PDF or TIFF, this field gives the page number within
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001178 # the file used to produce the image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001179 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001180 &quot;webDetection&quot;: { # Relevant information for the image from the Internet. # If present, web detection has completed successfully.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001181 &quot;visuallySimilarImages&quot;: [ # The visually similar image results.
1182 { # Metadata for online images.
1183 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1184 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1185 },
1186 ],
1187 &quot;bestGuessLabels&quot;: [ # The service&#x27;s best guess as to the topic of the request image.
1188 # Inferred from similar images on the open web.
1189 { # Label to provide extra metadata for the web detection.
1190 &quot;label&quot;: &quot;A String&quot;, # Label for extra metadata.
1191 &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;.
1192 # For more information, see
1193 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1194 },
1195 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001196 &quot;fullMatchingImages&quot;: [ # Fully matching images from the Internet.
1197 # Can include resized copies of the query image.
1198 { # Metadata for online images.
Bu Sun Kim65020912020-05-20 12:08:20 -07001199 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001200 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001201 },
1202 ],
1203 &quot;webEntities&quot;: [ # Deduced entities from similar images on the Internet.
1204 { # Entity deduced from similar images on the Internet.
Bu Sun Kim65020912020-05-20 12:08:20 -07001205 &quot;entityId&quot;: &quot;A String&quot;, # Opaque entity ID.
1206 &quot;description&quot;: &quot;A String&quot;, # Canonical description of the entity, in English.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001207 &quot;score&quot;: 3.14, # Overall relevancy score for the entity.
1208 # Not normalized and not comparable across different image queries.
Bu Sun Kim65020912020-05-20 12:08:20 -07001209 },
1210 ],
1211 &quot;pagesWithMatchingImages&quot;: [ # Web pages containing the matching images from the Internet.
1212 { # Metadata for web pages.
1213 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the web page.
1214 &quot;partialMatchingImages&quot;: [ # Partial matching images on the page.
1215 # Those images are similar enough to share some key-point features. For
1216 # example an original image will likely have partial matching for its
1217 # crops.
1218 { # Metadata for online images.
Bu Sun Kim65020912020-05-20 12:08:20 -07001219 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001220 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 },
1222 ],
1223 &quot;url&quot;: &quot;A String&quot;, # The result web page URL.
1224 &quot;pageTitle&quot;: &quot;A String&quot;, # Title for the web page, may contain HTML markups.
1225 &quot;fullMatchingImages&quot;: [ # Fully matching images on the page.
1226 # Can include resized copies of the query image.
1227 { # Metadata for online images.
Bu Sun Kim65020912020-05-20 12:08:20 -07001228 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001229 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001230 },
1231 ],
1232 },
1233 ],
1234 &quot;partialMatchingImages&quot;: [ # Partial matching images from the Internet.
1235 # Those images are similar enough to share some key-point features. For
1236 # example an original image will likely have partial matching for its crops.
1237 { # Metadata for online images.
Bu Sun Kim65020912020-05-20 12:08:20 -07001238 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001239 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001240 },
1241 ],
1242 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001243 &quot;safeSearchAnnotation&quot;: { # Set of features pertaining to the image, computed by computer vision # If present, safe-search annotation has completed successfully.
1244 # methods over safe-search verticals (for example, adult, spoof, medical,
1245 # violence).
1246 &quot;adult&quot;: &quot;A String&quot;, # Represents the adult content likelihood for the image. Adult content may
1247 # contain elements such as nudity, pornographic images or cartoons, or
1248 # sexual activities.
1249 &quot;spoof&quot;: &quot;A String&quot;, # Spoof likelihood. The likelihood that an modification
1250 # was made to the image&#x27;s canonical version to make it appear
1251 # funny or offensive.
1252 &quot;medical&quot;: &quot;A String&quot;, # Likelihood that this is a medical image.
1253 &quot;racy&quot;: &quot;A String&quot;, # Likelihood that the request image contains racy content. Racy content may
1254 # include (but is not limited to) skimpy or sheer clothing, strategically
1255 # covered nudity, lewd or provocative poses, or close-ups of sensitive
1256 # body areas.
1257 &quot;violence&quot;: &quot;A String&quot;, # Likelihood that this image contains violent content.
1258 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001259 },
1260 ],
1261 }</pre>
1262</div>
1263
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001264<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001265 <code class="details" id="asyncBatchAnnotate">asyncBatchAnnotate(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001266 <pre>Run asynchronous image detection and annotation for a list of images.
1267
1268Progress and results can be retrieved through the
1269`google.longrunning.Operations` interface.
1270`Operation.metadata` contains `OperationMetadata` (metadata).
1271`Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
1272
1273This service will write image annotation outputs to json files in customer
1274GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
1275
1276Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001277 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001278 The object takes the form of:
1279
1280{ # Request for async image annotation for a list of images.
Bu Sun Kim65020912020-05-20 12:08:20 -07001281 &quot;requests&quot;: [ # Required. Individual image annotation requests for this batch.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001282 { # Request for performing Google Cloud Vision API tasks over a user-provided
1283 # image, with user-requested features, and with context information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001284 &quot;image&quot;: { # Client image to perform Google Cloud Vision API tasks over. # The image to be processed.
1285 &quot;content&quot;: &quot;A String&quot;, # Image content, represented as a stream of bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001286 # Note: As with all `bytes` fields, protobuffers use a pure binary
1287 # representation, whereas JSON representations use base64.
Bu Sun Kim65020912020-05-20 12:08:20 -07001288 &quot;source&quot;: { # External image source (Google Cloud Storage or web URL image location). # Google Cloud Storage image location, or publicly-accessible image
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001289 # URL. If both `content` and `source` are provided for an image, `content`
1290 # takes precedence and is used to perform the image annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001291 &quot;gcsImageUri&quot;: &quot;A String&quot;, # **Use `image_uri` instead.**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001292 #
1293 # The Google Cloud Storage URI of the form
1294 # `gs://bucket_name/object_name`. Object versioning is not supported. See
1295 # [Google Cloud Storage Request
1296 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 &quot;imageUri&quot;: &quot;A String&quot;, # The URI of the source image. Can be either:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001298 #
1299 # 1. A Google Cloud Storage URI of the form
1300 # `gs://bucket_name/object_name`. Object versioning is not supported. See
1301 # [Google Cloud Storage Request
1302 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
1303 # info.
1304 #
1305 # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
1306 # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
1307 # completed. Your request may fail if the specified host denies the
1308 # request (e.g. due to request throttling or DOS prevention), or if Google
1309 # throttles requests to the site for abuse prevention. You should not
1310 # depend on externally-hosted images for production applications.
1311 #
1312 # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
1313 # precedence.
1314 },
1315 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001316 &quot;features&quot;: [ # Requested features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001317 { # The type of Google Cloud Vision API detection to perform, and the maximum
1318 # number of results to return for that type. Multiple `Feature` objects can
1319 # be specified in the `features` list.
Bu Sun Kim65020912020-05-20 12:08:20 -07001320 &quot;type&quot;: &quot;A String&quot;, # The feature type.
1321 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001322 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001323 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
1324 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
1325 # &quot;builtin/latest&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001326 },
1327 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001328 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image.
1329 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
1330 # yields the best results since it enables automatic language detection. For
1331 # languages based on the Latin alphabet, setting `language_hints` is not
1332 # needed. In rare cases, when the language of the text in the image is known,
1333 # setting a hint will help get better results (although it will be a
1334 # significant hindrance if the hint is wrong). Text detection returns an
1335 # error if one or more of the specified languages is not one of the
1336 # [supported languages](https://cloud.google.com/vision/docs/languages).
1337 &quot;A String&quot;,
1338 ],
1339 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
1340 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
1341 },
1342 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
1343 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
1344 # of doubles representing degrees latitude and degrees longitude. Unless
1345 # specified otherwise, this must conform to the
1346 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1347 # standard&lt;/a&gt;. Values must be within normalized ranges.
1348 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1349 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1350 },
1351 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
1352 # of doubles representing degrees latitude and degrees longitude. Unless
1353 # specified otherwise, this must conform to the
1354 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1355 # standard&lt;/a&gt;. Values must be within normalized ranges.
1356 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1357 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1358 },
1359 },
1360 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
1361 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
1362 # of the image. For example, if the desired aspect ratio is 4/3, the
1363 # corresponding float value should be 1.33333. If not specified, the
1364 # best possible crop is returned. The number of provided aspect ratios is
1365 # limited to a maximum of 16; any aspect ratios provided after the 16th are
1366 # ignored.
1367 3.14,
1368 ],
1369 },
1370 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
Bu Sun Kim65020912020-05-20 12:08:20 -07001371 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
1372 # on Product labels. We currently support an AND of OR of key-value
1373 # expressions, where each expression within an OR must have the same key. An
1374 # &#x27;=&#x27; should be used to connect the key and value.
1375 #
1376 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
1377 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
1378 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
1379 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
1380 #
1381 # Format is:
1382 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
1383 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
1384 # If it is not specified, system discretion will be applied.
1385 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1386 { # A vertex represents a 2D point in the image.
1387 # NOTE: the normalized vertex coordinates are relative to the original image
1388 # and range from 0 to 1.
1389 &quot;y&quot;: 3.14, # Y coordinate.
1390 &quot;x&quot;: 3.14, # X coordinate.
1391 },
1392 ],
1393 &quot;vertices&quot;: [ # The bounding polygon vertices.
1394 { # A vertex represents a 2D point in the image.
1395 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001396 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001397 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -07001398 },
1399 ],
1400 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001401 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
1402 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
1403 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
1404 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
1405 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
1406 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
1407 # migrate existing products to these categories as well.
1408 &quot;A String&quot;,
1409 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 },
1411 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001412 },
1413 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001414 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
1415 #
1416 # Format: `projects/{project-id}/locations/{location-id}`.
1417 #
1418 # If no parent is specified, a region will be chosen automatically.
1419 #
1420 # Supported location-ids:
1421 # `us`: USA country only,
1422 # `asia`: East asia areas, like Japan, Taiwan,
1423 # `eu`: The European Union.
1424 #
1425 # Example: `projects/project-A/locations/eu`.
1426 &quot;outputConfig&quot;: { # The desired output location and metadata. # Required. The desired output location and metadata (e.g. format).
1427 &quot;batchSize&quot;: 42, # The max number of response protos to put into each output JSON file on
1428 # Google Cloud Storage.
1429 # The valid range is [1, 100]. If not specified, the default value is 20.
1430 #
1431 # For example, for one pdf file with 100 pages, 100 response protos will
1432 # be generated. If `batch_size` = 20, then 5 json files each
1433 # containing 20 response protos will be written under the prefix
1434 # `gcs_destination`.`uri`.
1435 #
1436 # Currently, batch_size only applies to GcsDestination, with potential future
1437 # support for other output configurations.
1438 &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.
1439 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI prefix where the results will be stored. Results
1440 # will be in JSON format and preceded by its corresponding input URI prefix.
1441 # This field can either represent a gcs file prefix or gcs directory. In
1442 # either case, the uri should be unique because in order to get all of the
1443 # output files, you will need to do a wildcard gcs search on the uri prefix
1444 # you provide.
1445 #
1446 # Examples:
1447 #
1448 # * File Prefix: gs://bucket-name/here/filenameprefix The output files
1449 # will be created in gs://bucket-name/here/ and the names of the
1450 # output files will begin with &quot;filenameprefix&quot;.
1451 #
1452 # * Directory Prefix: gs://bucket-name/some/location/ The output files
1453 # will be created in gs://bucket-name/some/location/ and the names of the
1454 # output files could be anything because there was no filename prefix
1455 # specified.
1456 #
1457 # If multiple outputs, each response is still AnnotateFileResponse, each of
1458 # which contains some subset of the full list of AnnotateImageResponse.
1459 # Multiple outputs can happen if, for example, the output JSON is too large
1460 # and overflows into multiple sharded files.
1461 },
1462 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001463 }
1464
1465 x__xgafv: string, V1 error format.
1466 Allowed values
1467 1 - v1 error format
1468 2 - v2 error format
1469
1470Returns:
1471 An object of the form:
1472
1473 { # This resource represents a long-running operation that is the result of a
1474 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001475 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1476 # If `true`, the operation is completed, and either `error` or `response` is
1477 # available.
1478 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001479 # method returns no data on success, such as `Delete`, the response is
1480 # `google.protobuf.Empty`. If the original method is standard
1481 # `Get`/`Create`/`Update`, the response should be the resource. For other
1482 # methods, the response should have the type `XxxResponse`, where `Xxx`
1483 # is the original method name. For example, if the original method name
1484 # is `TakeSnapshot()`, the inferred response type is
1485 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001486 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001487 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001488 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001489 # originally returns it. If you use the default HTTP mapping, the
1490 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001491 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 # different programming environments, including REST APIs and RPC APIs. It is
1493 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1494 # three pieces of data: error code, error message, and error details.
1495 #
1496 # You can find out more about this error model and how to work with it in the
1497 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001498 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1499 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1500 # user-facing error message should be localized and sent in the
1501 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001502 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001503 # message types for APIs to use.
1504 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001505 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001506 },
1507 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001508 },
1509 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1510 # contains progress information and common metadata such as create time.
1511 # Some services might not provide such metadata. Any method that returns a
1512 # long-running operation should document the metadata type, if any.
1513 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514 },
1515 }</pre>
1516</div>
1517
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001518</body></html>