On January 1, 2020 this library will no longer support Python 2 on the latest released version. Previously released library versions will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Cloud Vision API Client

class google.cloud.vision_v1p4beta1.types.AddProductToProductSetRequest

Request message for the AddProductToProductSet method.

name

Required. The resource name for the ProductSet to modify. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/ PRODUCT_SET_ID

product

Required. The resource name for the Product to be added to this ProductSet. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID

name

Field google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.name

product

Field google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.product

class google.cloud.vision_v1p4beta1.types.AnnotateFileRequest

A request to annotate one single file, e.g. a PDF, TIFF or GIF file.

input_config

Required. Information about the input file.

features

Required. Requested features.

image_context

Additional context that may accompany the image(s) in the file.

pages

Pages of the file to perform image annotation. Pages starts from 1, we assume the first page of the file is page 1. At most 5 pages are supported per request. Pages can be negative. Page 1 means the first page. Page 2 means the second page. Page -1 means the last page. Page -2 means the second to the last page. If the file is GIF instead of PDF or TIFF, page refers to GIF frames. If this field is empty, by default the service performs image annotation for the first 5 pages of the file.

features

Field google.cloud.vision.v1p4beta1.AnnotateFileRequest.features

image_context

Field google.cloud.vision.v1p4beta1.AnnotateFileRequest.image_context

input_config

Field google.cloud.vision.v1p4beta1.AnnotateFileRequest.input_config

pages

Field google.cloud.vision.v1p4beta1.AnnotateFileRequest.pages

class google.cloud.vision_v1p4beta1.types.AnnotateFileResponse

Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.

input_config

Information about the file for which this response is generated.

responses

Individual responses to images found within the file. This field will be empty if the error field is set.

total_pages

This field gives the total number of pages in the file.

error

If set, represents the error message for the failed request. The responses field will not be set in this case.

error

Field google.cloud.vision.v1p4beta1.AnnotateFileResponse.error

input_config

Field google.cloud.vision.v1p4beta1.AnnotateFileResponse.input_config

responses

Field google.cloud.vision.v1p4beta1.AnnotateFileResponse.responses

total_pages

Field google.cloud.vision.v1p4beta1.AnnotateFileResponse.total_pages

class google.cloud.vision_v1p4beta1.types.AnnotateImageRequest

Request for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features, and with context information.

image

The image to be processed.

features

Requested features.

image_context

Additional context that may accompany the image.

features

Field google.cloud.vision.v1p4beta1.AnnotateImageRequest.features

image

Field google.cloud.vision.v1p4beta1.AnnotateImageRequest.image

image_context

Field google.cloud.vision.v1p4beta1.AnnotateImageRequest.image_context

class google.cloud.vision_v1p4beta1.types.AnnotateImageResponse

Response to an image annotation request.

face_annotations

If present, face detection has completed successfully.

landmark_annotations

If present, landmark detection has completed successfully.

logo_annotations

If present, logo detection has completed successfully.

label_annotations

If present, label detection has completed successfully.

localized_object_annotations

If present, localized object detection has completed successfully. This will be sorted descending by confidence score.

text_annotations

If present, text (OCR) detection has completed successfully.

full_text_annotation

If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.

safe_search_annotation

If present, safe-search annotation has completed successfully.

image_properties_annotation

If present, image properties were extracted successfully.

crop_hints_annotation

If present, crop hints have completed successfully.

web_detection

If present, web detection has completed successfully.

product_search_results

If present, product search has completed successfully.

error

If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when error is set.

context

If present, contextual information is needed to understand where this image comes from.

context

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.context

crop_hints_annotation

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.crop_hints_annotation

error

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.error

face_annotations

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.face_annotations

full_text_annotation

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.full_text_annotation

image_properties_annotation

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.image_properties_annotation

label_annotations

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.label_annotations

landmark_annotations

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.landmark_annotations

localized_object_annotations

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.localized_object_annotations

logo_annotations

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.logo_annotations

product_search_results

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.product_search_results

safe_search_annotation

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.safe_search_annotation

text_annotations

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.text_annotations

web_detection

Field google.cloud.vision.v1p4beta1.AnnotateImageResponse.web_detection

class google.cloud.vision_v1p4beta1.types.Any
type_url

Field google.protobuf.Any.type_url

value

Field google.protobuf.Any.value

class google.cloud.vision_v1p4beta1.types.AsyncAnnotateFileRequest

An offline file annotation request.

input_config

Required. Information about the input file.

features

Required. Requested features.

image_context

Additional context that may accompany the image(s) in the file.

output_config

Required. The desired output location and metadata (e.g. format).

features

Field google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.features

image_context

Field google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.image_context

input_config

Field google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.input_config

output_config

Field google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.output_config

class google.cloud.vision_v1p4beta1.types.AsyncAnnotateFileResponse

The response for a single offline file annotation request.

output_config

The output location and metadata from AsyncAnnotateFileRequest.

output_config

Field google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.output_config

class google.cloud.vision_v1p4beta1.types.AsyncBatchAnnotateFilesRequest

Multiple async file annotation requests are batched into a single service call.

requests

Required. Individual async file annotation requests for this batch.

requests

Field google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.requests

class google.cloud.vision_v1p4beta1.types.AsyncBatchAnnotateFilesResponse

Response to an async batch file annotation request.

responses

The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.

responses

Field google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.responses

class google.cloud.vision_v1p4beta1.types.AsyncBatchAnnotateImagesRequest

Request for async image annotation for a list of images.

requests

Required. Individual image annotation requests for this batch.

output_config

Required. The desired output location and metadata (e.g. format).

output_config

Field google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.output_config

requests

Field google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.requests

class google.cloud.vision_v1p4beta1.types.AsyncBatchAnnotateImagesResponse

Response to an async batch image annotation request.

output_config

The output location and metadata from AsyncBatchAnnotateImagesRequest.

output_config

Field google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.output_config

class google.cloud.vision_v1p4beta1.types.BatchAnnotateFilesRequest

A list of requests to annotate files using the BatchAnnotateFiles API.

requests

Required. The list of file annotation requests. Right now we support only one AnnotateFileRequest in BatchAnnotateFilesRequest.

requests

Field google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.requests

class google.cloud.vision_v1p4beta1.types.BatchAnnotateFilesResponse

A list of file annotation responses.

responses

The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.

responses

Field google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.responses

class google.cloud.vision_v1p4beta1.types.BatchAnnotateImagesRequest

Multiple image annotation requests are batched into a single service call.

requests

Required. Individual image annotation requests for this batch.

requests

Field google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.requests

class google.cloud.vision_v1p4beta1.types.BatchAnnotateImagesResponse

Response to a batch image annotation request.

responses

Individual responses to image annotation requests within the batch.

responses

Field google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.responses

class google.cloud.vision_v1p4beta1.types.BatchOperationMetadata

Metadata for the batch operations such as the current state.

This is included in the metadata field of the Operation returned by the GetOperation call of the google::longrunning::Operations service.

state

The current state of the batch operation.

submit_time

The time when the batch request was submitted to the server.

end_time

The time when the batch request is finished and [google.longru nning.Operation.done][google.longrunning.Operation.done] is set to true.

end_time

Field google.cloud.vision.v1p4beta1.BatchOperationMetadata.end_time

state

Field google.cloud.vision.v1p4beta1.BatchOperationMetadata.state

submit_time

Field google.cloud.vision.v1p4beta1.BatchOperationMetadata.submit_time

class google.cloud.vision_v1p4beta1.types.Block

Logical element on the page.

property

Additional information detected for the block.

bounding_box

The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the ‘natural’ orientation. For example: - when the text is horizontal it might look like: :: 0—-1 | | 3—-2 - when it’s rotated 180 degrees around the top-left corner it becomes: :: 2—-3 | | 1—-0 and the vertex order will still be (0, 1, 2, 3).

paragraphs

List of paragraphs in this block (if this blocks is of type text).

block_type

Detected block type (text, image etc) for this block.

confidence

Confidence of the OCR results on the block. Range [0, 1].

block_type

Field google.cloud.vision.v1p4beta1.Block.block_type

bounding_box

Field google.cloud.vision.v1p4beta1.Block.bounding_box

confidence

Field google.cloud.vision.v1p4beta1.Block.confidence

paragraphs

Field google.cloud.vision.v1p4beta1.Block.paragraphs

property

Field google.cloud.vision.v1p4beta1.Block.property

class google.cloud.vision_v1p4beta1.types.BoolValue
value

Field google.protobuf.BoolValue.value

class google.cloud.vision_v1p4beta1.types.BoundingPoly

A bounding polygon for the detected image annotation.

vertices

The bounding polygon vertices.

normalized_vertices

The bounding polygon normalized vertices.

normalized_vertices

Field google.cloud.vision.v1p4beta1.BoundingPoly.normalized_vertices

vertices

Field google.cloud.vision.v1p4beta1.BoundingPoly.vertices

class google.cloud.vision_v1p4beta1.types.BytesValue
value

Field google.protobuf.BytesValue.value

class google.cloud.vision_v1p4beta1.types.CancelOperationRequest
name

Field google.longrunning.CancelOperationRequest.name

class google.cloud.vision_v1p4beta1.types.Celebrity

A Celebrity is a group of Faces with an identity.

name

The resource name of the preloaded Celebrity. Has the format builtin/{mid}.

display_name

The Celebrity’s display name.

description

The Celebrity’s description.

description

Field google.cloud.vision.v1p4beta1.Celebrity.description

display_name

Field google.cloud.vision.v1p4beta1.Celebrity.display_name

name

Field google.cloud.vision.v1p4beta1.Celebrity.name

class google.cloud.vision_v1p4beta1.types.Color
alpha

Field google.type.Color.alpha

blue

Field google.type.Color.blue

green

Field google.type.Color.green

red

Field google.type.Color.red

class google.cloud.vision_v1p4beta1.types.ColorInfo

Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.

color

RGB components of the color.

score

Image-specific score for this color. Value in range [0, 1].

pixel_fraction

The fraction of pixels the color occupies in the image. Value in range [0, 1].

color

Field google.cloud.vision.v1p4beta1.ColorInfo.color

pixel_fraction

Field google.cloud.vision.v1p4beta1.ColorInfo.pixel_fraction

score

Field google.cloud.vision.v1p4beta1.ColorInfo.score

class google.cloud.vision_v1p4beta1.types.CreateProductRequest

Request message for the CreateProduct method.

parent

Required. The project in which the Product should be created. Format is projects/PROJECT_ID/locations/LOC_ID.

product

Required. The product to create.

product_id

A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

parent

Field google.cloud.vision.v1p4beta1.CreateProductRequest.parent

product

Field google.cloud.vision.v1p4beta1.CreateProductRequest.product

product_id

Field google.cloud.vision.v1p4beta1.CreateProductRequest.product_id

class google.cloud.vision_v1p4beta1.types.CreateProductSetRequest

Request message for the CreateProductSet method.

parent

Required. The project in which the ProductSet should be created. Format is projects/PROJECT_ID/locations/LOC_ID.

product_set

Required. The ProductSet to create.

product_set_id

A user-supplied resource id for this ProductSet. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

parent

Field google.cloud.vision.v1p4beta1.CreateProductSetRequest.parent

product_set

Field google.cloud.vision.v1p4beta1.CreateProductSetRequest.product_set

product_set_id

Field google.cloud.vision.v1p4beta1.CreateProductSetRequest.product_set_id

class google.cloud.vision_v1p4beta1.types.CreateReferenceImageRequest

Request message for the CreateReferenceImage method.

parent

Required. Resource name of the product in which to create the reference image. Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

reference_image

Required. The reference image to create. If an image ID is specified, it is ignored.

reference_image_id

A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

parent

Field google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.parent

reference_image

Field google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.reference_image

reference_image_id

Field google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.reference_image_id

class google.cloud.vision_v1p4beta1.types.CropHint

Single crop hint that is used to generate a new crop when serving an image.

bounding_poly

The bounding polygon for the crop region. The coordinates of the bounding box are in the original image’s scale.

confidence

Confidence of this being a salient region. Range [0, 1].

importance_fraction

Fraction of importance of this salient region with respect to the original image.

bounding_poly

Field google.cloud.vision.v1p4beta1.CropHint.bounding_poly

confidence

Field google.cloud.vision.v1p4beta1.CropHint.confidence

importance_fraction

Field google.cloud.vision.v1p4beta1.CropHint.importance_fraction

class google.cloud.vision_v1p4beta1.types.CropHintsAnnotation

Set of crop hints that are used to generate new crops when serving images.

crop_hints

Crop hint results.

crop_hints

Field google.cloud.vision.v1p4beta1.CropHintsAnnotation.crop_hints

class google.cloud.vision_v1p4beta1.types.CropHintsParams

Parameters for crop hints annotation request.

aspect_ratios

Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.

aspect_ratios

Field google.cloud.vision.v1p4beta1.CropHintsParams.aspect_ratios

class google.cloud.vision_v1p4beta1.types.DeleteOperationRequest
name

Field google.longrunning.DeleteOperationRequest.name

class google.cloud.vision_v1p4beta1.types.DeleteProductRequest

Request message for the DeleteProduct method.

name

Required. Resource name of product to delete. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID

name

Field google.cloud.vision.v1p4beta1.DeleteProductRequest.name

class google.cloud.vision_v1p4beta1.types.DeleteProductSetRequest

Request message for the DeleteProductSet method.

name

Required. Resource name of the ProductSet to delete. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT _SET_ID

name

Field google.cloud.vision.v1p4beta1.DeleteProductSetRequest.name

class google.cloud.vision_v1p4beta1.types.DeleteReferenceImageRequest

Request message for the DeleteReferenceImage method.

name

Required. The resource name of the reference image to delete. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PR ODUCT_ID/referenceImages/IMAGE_ID

name

Field google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.name

class google.cloud.vision_v1p4beta1.types.DominantColorsAnnotation

Set of dominant colors and their corresponding scores.

colors

RGB color values with their score and pixel fraction.

colors

Field google.cloud.vision.v1p4beta1.DominantColorsAnnotation.colors

class google.cloud.vision_v1p4beta1.types.DoubleValue
value

Field google.protobuf.DoubleValue.value

class google.cloud.vision_v1p4beta1.types.Empty
class google.cloud.vision_v1p4beta1.types.EntityAnnotation

Set of detected entity features.

mid

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

locale

The language code for the locale in which the entity textual description is expressed.

description

Entity textual description, expressed in its locale language.

score

Overall score of the result. Range [0, 1].

confidence

Deprecated. Use ``score`` instead. The accuracy of the entity detection in an image. For example, for an image in which the “Eiffel Tower” entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].

topicality

The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of “tower” is likely higher to an image containing the detected “Eiffel Tower” than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].

bounding_poly

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

locations

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

properties

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

bounding_poly

Field google.cloud.vision.v1p4beta1.EntityAnnotation.bounding_poly

confidence

Field google.cloud.vision.v1p4beta1.EntityAnnotation.confidence

description

Field google.cloud.vision.v1p4beta1.EntityAnnotation.description

locale

Field google.cloud.vision.v1p4beta1.EntityAnnotation.locale

locations

Field google.cloud.vision.v1p4beta1.EntityAnnotation.locations

mid

Field google.cloud.vision.v1p4beta1.EntityAnnotation.mid

properties

Field google.cloud.vision.v1p4beta1.EntityAnnotation.properties

score

Field google.cloud.vision.v1p4beta1.EntityAnnotation.score

topicality

Field google.cloud.vision.v1p4beta1.EntityAnnotation.topicality

class google.cloud.vision_v1p4beta1.types.FaceAnnotation

A face annotation object contains the results of face detection.

bounding_poly

The bounding polygon around the face. The coordinates of the bounding box are in the original image’s scale. The bounding box is computed to “frame” the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the BoundingPoly (the polygon will be unbounded) if only a partial face appears in the image to be annotated.

fd_bounding_poly

The fd_bounding_poly bounding polygon is tighter than the boundingPoly, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the “amount of skin” visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.

landmarks

Detected face landmarks.

roll_angle

Roll angle, which indicates the amount of clockwise/anti- clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].

pan_angle

Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].

tilt_angle

Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image’s horizontal plane. Range [-180,180].

detection_confidence

Detection confidence. Range [0, 1].

landmarking_confidence

Face landmarking confidence. Range [0, 1].

joy_likelihood

Joy likelihood.

sorrow_likelihood

Sorrow likelihood.

anger_likelihood

Anger likelihood.

surprise_likelihood

Surprise likelihood.

under_exposed_likelihood

Under-exposed likelihood.

blurred_likelihood

Blurred likelihood.

headwear_likelihood

Headwear likelihood.

recognition_result

Additional recognition information. Only computed if image_context.face_recognition_params is provided, and a match is found to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is sorted in order of decreasing confidence values.

class Landmark

A face-specific landmark (for example, a face feature).

type

Face landmark type.

position

Face landmark position.

position

Field google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.position

type

Field google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.type

anger_likelihood

Field google.cloud.vision.v1p4beta1.FaceAnnotation.anger_likelihood

blurred_likelihood

Field google.cloud.vision.v1p4beta1.FaceAnnotation.blurred_likelihood

bounding_poly

Field google.cloud.vision.v1p4beta1.FaceAnnotation.bounding_poly

detection_confidence

Field google.cloud.vision.v1p4beta1.FaceAnnotation.detection_confidence

fd_bounding_poly

Field google.cloud.vision.v1p4beta1.FaceAnnotation.fd_bounding_poly

headwear_likelihood

Field google.cloud.vision.v1p4beta1.FaceAnnotation.headwear_likelihood

joy_likelihood

Field google.cloud.vision.v1p4beta1.FaceAnnotation.joy_likelihood

landmarking_confidence

Field google.cloud.vision.v1p4beta1.FaceAnnotation.landmarking_confidence

landmarks

Field google.cloud.vision.v1p4beta1.FaceAnnotation.landmarks

pan_angle

Field google.cloud.vision.v1p4beta1.FaceAnnotation.pan_angle

recognition_result

Field google.cloud.vision.v1p4beta1.FaceAnnotation.recognition_result

roll_angle

Field google.cloud.vision.v1p4beta1.FaceAnnotation.roll_angle

sorrow_likelihood

Field google.cloud.vision.v1p4beta1.FaceAnnotation.sorrow_likelihood

surprise_likelihood

Field google.cloud.vision.v1p4beta1.FaceAnnotation.surprise_likelihood

tilt_angle

Field google.cloud.vision.v1p4beta1.FaceAnnotation.tilt_angle

under_exposed_likelihood

Field google.cloud.vision.v1p4beta1.FaceAnnotation.under_exposed_likelihood

class google.cloud.vision_v1p4beta1.types.FaceRecognitionParams

Parameters for a celebrity recognition request.

celebrity_set

The resource names for one or more [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity set is preloaded and can be specified as “builtin/default”. If this is specified, the algorithm will try to match the faces detected in the input image to the Celebrities in the CelebritySets.

celebrity_set

Field google.cloud.vision.v1p4beta1.FaceRecognitionParams.celebrity_set

class google.cloud.vision_v1p4beta1.types.FaceRecognitionResult

Information about a face’s identity.

celebrity

The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was matched to.

confidence

Recognition confidence. Range [0, 1].

celebrity

Field google.cloud.vision.v1p4beta1.FaceRecognitionResult.celebrity

confidence

Field google.cloud.vision.v1p4beta1.FaceRecognitionResult.confidence

class google.cloud.vision_v1p4beta1.types.Feature

The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple Feature objects can be specified in the features list.

type

The feature type.

max_results

Maximum number of results of this type. Does not apply to TEXT_DETECTION, DOCUMENT_TEXT_DETECTION, or CROP_HINTS.

model

Model to use for the feature. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.

max_results

Field google.cloud.vision.v1p4beta1.Feature.max_results

model

Field google.cloud.vision.v1p4beta1.Feature.model

type

Field google.cloud.vision.v1p4beta1.Feature.type

class google.cloud.vision_v1p4beta1.types.FieldMask
paths

Field google.protobuf.FieldMask.paths

class google.cloud.vision_v1p4beta1.types.FloatValue
value

Field google.protobuf.FloatValue.value

class google.cloud.vision_v1p4beta1.types.GcsDestination

The Google Cloud Storage location where the output will be written to.

uri

Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: - File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with “filenameprefix”. - Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.

uri

Field google.cloud.vision.v1p4beta1.GcsDestination.uri

class google.cloud.vision_v1p4beta1.types.GcsSource

The Google Cloud Storage location where the input will be read from.

uri

Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.

uri

Field google.cloud.vision.v1p4beta1.GcsSource.uri

class google.cloud.vision_v1p4beta1.types.GetOperationRequest
name

Field google.longrunning.GetOperationRequest.name

class google.cloud.vision_v1p4beta1.types.GetProductRequest

Request message for the GetProduct method.

name

Required. Resource name of the Product to get. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID

name

Field google.cloud.vision.v1p4beta1.GetProductRequest.name

class google.cloud.vision_v1p4beta1.types.GetProductSetRequest

Request message for the GetProductSet method.

name

Required. Resource name of the ProductSet to get. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET _ID

name

Field google.cloud.vision.v1p4beta1.GetProductSetRequest.name

class google.cloud.vision_v1p4beta1.types.GetReferenceImageRequest

Request message for the GetReferenceImage method.

name

Required. The resource name of the ReferenceImage to get. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PR ODUCT_ID/referenceImages/IMAGE_ID.

name

Field google.cloud.vision.v1p4beta1.GetReferenceImageRequest.name

class google.cloud.vision_v1p4beta1.types.Image

Client image to perform Google Cloud Vision API tasks over.

content

Image content, represented as a stream of bytes. Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

source

Google Cloud Storage image location, or publicly-accessible image URL. If both content and source are provided for an image, content takes precedence and is used to perform the image annotation request.

content

Field google.cloud.vision.v1p4beta1.Image.content

source

Field google.cloud.vision.v1p4beta1.Image.source

class google.cloud.vision_v1p4beta1.types.ImageAnnotationContext

If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.

uri

The URI of the file used to produce the image.

page_number

If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.

page_number

Field google.cloud.vision.v1p4beta1.ImageAnnotationContext.page_number

uri

Field google.cloud.vision.v1p4beta1.ImageAnnotationContext.uri

class google.cloud.vision_v1p4beta1.types.ImageContext

Image context and/or feature-specific parameters.

lat_long_rect

Not used.

language_hints

List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the supported languages.

crop_hints_params

Parameters for crop hints annotation request.

face_recognition_params

Parameters for face recognition.

product_search_params

Parameters for product search.

web_detection_params

Parameters for web detection.

crop_hints_params

Field google.cloud.vision.v1p4beta1.ImageContext.crop_hints_params

face_recognition_params

Field google.cloud.vision.v1p4beta1.ImageContext.face_recognition_params

language_hints

Field google.cloud.vision.v1p4beta1.ImageContext.language_hints

lat_long_rect

Field google.cloud.vision.v1p4beta1.ImageContext.lat_long_rect

product_search_params

Field google.cloud.vision.v1p4beta1.ImageContext.product_search_params

web_detection_params

Field google.cloud.vision.v1p4beta1.ImageContext.web_detection_params

class google.cloud.vision_v1p4beta1.types.ImageProperties

Stores image properties, such as dominant colors.

dominant_colors

If present, dominant colors completed successfully.

dominant_colors

Field google.cloud.vision.v1p4beta1.ImageProperties.dominant_colors

class google.cloud.vision_v1p4beta1.types.ImageSource

External image source (Google Cloud Storage or web URL image location).

gcs_image_uri

Use ``image_uri`` instead. The Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. See Google Cloud Storage Request URIs for more info.

image_uri

The URI of the source image. Can be either: 1. A Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. See Google Cloud Storage Request URIs for more info. 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from HTTP/HTTPS URLs, Google cannot guarantee that the request will be completed. Your request may fail if the specified host denies the request (e.g. due to request throttling or DOS prevention), or if Google throttles requests to the site for abuse prevention. You should not depend on externally-hosted images for production applications. When both gcs_image_uri and image_uri are specified, image_uri takes precedence.

gcs_image_uri

Field google.cloud.vision.v1p4beta1.ImageSource.gcs_image_uri

image_uri

Field google.cloud.vision.v1p4beta1.ImageSource.image_uri

class google.cloud.vision_v1p4beta1.types.ImportProductSetsGcsSource

The Google Cloud Storage location for a csv file which preserves a list of ImportProductSetRequests in each line.

csv_file_uri

The Google Cloud Storage URI of the input csv file. The URI must start with gs://. The format of the input csv file should be one image per line. In each line, there are 8 columns. 1. image-uri 2. image-id 3. product-set-id 4. product-id 5. product-category 6. product-display-name 7. labels 8. bounding-poly The image-uri, product-set- id, product-id, and product-category columns are required. All other columns are optional. If the ProductSet or Product specified by the product-set- id and product-id values does not exist, then the system will create a new ProductSet or Product for the image. In this case, the product-display-name column refers to [d isplay_name][google.cloud.vision.v1p4beta1.Product.display_n ame], the product-category column refers to [product_cate gory][google.cloud.vision.v1p4beta1.Product.product_category] , and the labels column refers to [product_labels][google .cloud.vision.v1p4beta1.Product.product_labels]. The image-id column is optional but must be unique if provided. If it is empty, the system will automatically assign a unique id to the image. The product-display-name column is optional. If it is empty, the system sets the [display_nam e][google.cloud.vision.v1p4beta1.Product.display_name] field for the product to a space (” “). You can update the display_name later by using the API. If a Product with the specified product-id already exists, then the system ignores the product-display-name, product- category, and labels columns. The labels column (optional) is a line containing a list of comma-separated key- value pairs, in the following format: :: “key_1=value_1,key_2=value_2,…,key_n=value_n” The bounding-poly column (optional) identifies one region of interest from the image in the same manner as CreateReferenceImage. If you do not specify the bounding-poly column, then the system will try to detect regions of interest automatically. At most one bounding- poly column is allowed per line. If the image contains multiple regions of interest, add a line to the CSV file that includes the same product information, and the bounding- poly values for each region of interest. The bounding- poly column must contain an even number of comma-separated numbers, in the format “p1_x,p1_y,p2_x,p2_y,…,pn_x,pn_y”. Use non-negative integers for absolute bounding polygons, and float values in [0, 1] for normalized bounding polygons. The system will resize the image if the image resolution is too large to process (larger than 20MP).

csv_file_uri

Field google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri

class google.cloud.vision_v1p4beta1.types.ImportProductSetsInputConfig

The input content for the ImportProductSets method.

source

The source of the input.

gcs_source

The Google Cloud Storage location for a csv file which preserves a list of ImportProductSetRequests in each line.

gcs_source

Field google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.gcs_source

class google.cloud.vision_v1p4beta1.types.ImportProductSetsRequest

Request message for the ImportProductSets method.

parent

Required. The project in which the ProductSets should be imported. Format is projects/PROJECT_ID/locations/LOC_ID.

input_config

Required. The input content for the list of requests.

input_config

Field google.cloud.vision.v1p4beta1.ImportProductSetsRequest.input_config

parent

Field google.cloud.vision.v1p4beta1.ImportProductSetsRequest.parent

class google.cloud.vision_v1p4beta1.types.ImportProductSetsResponse

Response message for the ImportProductSets method.

This message is returned by the [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned [google.longrunning.Operation.response][google.longrunning.Operation.response] field.

reference_images

The list of reference_images that are imported successfully.

statuses

The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.

reference_images

Field google.cloud.vision.v1p4beta1.ImportProductSetsResponse.reference_images

statuses

Field google.cloud.vision.v1p4beta1.ImportProductSetsResponse.statuses

class google.cloud.vision_v1p4beta1.types.InputConfig

The desired input location and metadata.

gcs_source

The Google Cloud Storage location to read the input from.

content

File content, represented as a stream of bytes. Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.

mime_type

The type of the file. Currently only “application/pdf”, “image/tiff” and “image/gif” are supported. Wildcards are not supported.

content

Field google.cloud.vision.v1p4beta1.InputConfig.content

gcs_source

Field google.cloud.vision.v1p4beta1.InputConfig.gcs_source

mime_type

Field google.cloud.vision.v1p4beta1.InputConfig.mime_type

class google.cloud.vision_v1p4beta1.types.Int32Value
value

Field google.protobuf.Int32Value.value

class google.cloud.vision_v1p4beta1.types.Int64Value
value

Field google.protobuf.Int64Value.value

class google.cloud.vision_v1p4beta1.types.LatLng
latitude

Field google.type.LatLng.latitude

longitude

Field google.type.LatLng.longitude

class google.cloud.vision_v1p4beta1.types.LatLongRect

Rectangle determined by min and max LatLng pairs.

min_lat_lng

Min lat/long pair.

max_lat_lng

Max lat/long pair.

max_lat_lng

Field google.cloud.vision.v1p4beta1.LatLongRect.max_lat_lng

min_lat_lng

Field google.cloud.vision.v1p4beta1.LatLongRect.min_lat_lng

class google.cloud.vision_v1p4beta1.types.ListOperationsRequest
filter

Field google.longrunning.ListOperationsRequest.filter

name

Field google.longrunning.ListOperationsRequest.name

page_size

Field google.longrunning.ListOperationsRequest.page_size

page_token

Field google.longrunning.ListOperationsRequest.page_token

class google.cloud.vision_v1p4beta1.types.ListOperationsResponse
next_page_token

Field google.longrunning.ListOperationsResponse.next_page_token

operations

Field google.longrunning.ListOperationsResponse.operations

class google.cloud.vision_v1p4beta1.types.ListProductSetsRequest

Request message for the ListProductSets method.

parent

Required. The project from which ProductSets should be listed. Format is projects/PROJECT_ID/locations/LOC_ID.

page_size

The maximum number of items to return. Default 10, maximum 100.

page_token

The next_page_token returned from a previous List request, if any.

page_size

Field google.cloud.vision.v1p4beta1.ListProductSetsRequest.page_size

page_token

Field google.cloud.vision.v1p4beta1.ListProductSetsRequest.page_token

parent

Field google.cloud.vision.v1p4beta1.ListProductSetsRequest.parent

class google.cloud.vision_v1p4beta1.types.ListProductSetsResponse

Response message for the ListProductSets method.

product_sets

List of ProductSets.

next_page_token

Token to retrieve the next page of results, or empty if there are no more results in the list.

next_page_token

Field google.cloud.vision.v1p4beta1.ListProductSetsResponse.next_page_token

product_sets

Field google.cloud.vision.v1p4beta1.ListProductSetsResponse.product_sets

class google.cloud.vision_v1p4beta1.types.ListProductsInProductSetRequest

Request message for the ListProductsInProductSet method.

name

Required. The ProductSet resource for which to retrieve Products. Format is: projects/PROJECT_ID/locations/LOC_ID/p roductSets/PRODUCT_SET_ID

page_size

The maximum number of items to return. Default 10, maximum 100.

page_token

The next_page_token returned from a previous List request, if any.

name

Field google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.name

page_size

Field google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.page_size

page_token

Field google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.page_token

class google.cloud.vision_v1p4beta1.types.ListProductsInProductSetResponse

Response message for the ListProductsInProductSet method.

products

The list of Products.

next_page_token

Token to retrieve the next page of results, or empty if there are no more results in the list.

next_page_token

Field google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.next_page_token

products

Field google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.products

class google.cloud.vision_v1p4beta1.types.ListProductsRequest

Request message for the ListProducts method.

parent

Required. The project OR ProductSet from which Products should be listed. Format: projects/PROJECT_ID/locations/LOC_ID

page_size

The maximum number of items to return. Default 10, maximum 100.

page_token

The next_page_token returned from a previous List request, if any.

page_size

Field google.cloud.vision.v1p4beta1.ListProductsRequest.page_size

page_token

Field google.cloud.vision.v1p4beta1.ListProductsRequest.page_token

parent

Field google.cloud.vision.v1p4beta1.ListProductsRequest.parent

class google.cloud.vision_v1p4beta1.types.ListProductsResponse

Response message for the ListProducts method.

products

List of products.

next_page_token

Token to retrieve the next page of results, or empty if there are no more results in the list.

next_page_token

Field google.cloud.vision.v1p4beta1.ListProductsResponse.next_page_token

products

Field google.cloud.vision.v1p4beta1.ListProductsResponse.products

class google.cloud.vision_v1p4beta1.types.ListReferenceImagesRequest

Request message for the ListReferenceImages method.

parent

Required. Resource name of the product containing the reference images. Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

page_size

The maximum number of items to return. Default 10, maximum 100.

page_token

A token identifying a page of results to be returned. This is the value of nextPageToken returned in a previous reference image list request. Defaults to the first page if not specified.

page_size

Field google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.page_size

page_token

Field google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.page_token

parent

Field google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.parent

class google.cloud.vision_v1p4beta1.types.ListReferenceImagesResponse

Response message for the ListReferenceImages method.

reference_images

The list of reference images.

page_size

The maximum number of items to return. Default 10, maximum 100.

next_page_token

The next_page_token returned from a previous List request, if any.

next_page_token

Field google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.next_page_token

page_size

Field google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.page_size

reference_images

Field google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.reference_images

class google.cloud.vision_v1p4beta1.types.LocalizedObjectAnnotation

Set of detected objects with bounding boxes.

mid

Object ID that should align with EntityAnnotation mid.

language_code

The BCP-47 language code, such as “en-US” or “sr-Latn”. For more information, see http://www.unicode.org/reports/tr35/#Uni code_locale_identifier.

name

Object name, expressed in its language_code language.

score

Score of the result. Range [0, 1].

bounding_poly

Image region to which this object belongs. This must be populated.

bounding_poly

Field google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.bounding_poly

language_code

Field google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.language_code

mid

Field google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.mid

name

Field google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.name

score

Field google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.score

class google.cloud.vision_v1p4beta1.types.LocationInfo

Detected entity location information.

lat_lng

lat/long location coordinates.

lat_lng

Field google.cloud.vision.v1p4beta1.LocationInfo.lat_lng

class google.cloud.vision_v1p4beta1.types.NormalizedVertex

X coordinate.

y

Y coordinate.

x

Field google.cloud.vision.v1p4beta1.NormalizedVertex.x

y

Field google.cloud.vision.v1p4beta1.NormalizedVertex.y

class google.cloud.vision_v1p4beta1.types.Operation
deserialize()

Creates new method instance from given serialized data.

done

Field google.longrunning.Operation.done

error

Field google.longrunning.Operation.error

metadata

Field google.longrunning.Operation.metadata

name

Field google.longrunning.Operation.name

response

Field google.longrunning.Operation.response

class google.cloud.vision_v1p4beta1.types.OperationInfo
metadata_type

Field google.longrunning.OperationInfo.metadata_type

response_type

Field google.longrunning.OperationInfo.response_type

class google.cloud.vision_v1p4beta1.types.OperationMetadata

Contains metadata for the BatchAnnotateImages operation.

state

Current state of the batch operation.

create_time

The time when the batch request was received.

update_time

The time when the operation result was last updated.

create_time

Field google.cloud.vision.v1p4beta1.OperationMetadata.create_time

state

Field google.cloud.vision.v1p4beta1.OperationMetadata.state

update_time

Field google.cloud.vision.v1p4beta1.OperationMetadata.update_time

class google.cloud.vision_v1p4beta1.types.OutputConfig

The desired output location and metadata.

gcs_destination

The Google Cloud Storage location to write the output(s) to.

batch_size

The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If batch_size = 20, then 5 json files each containing 20 response protos will be written under the prefix gcs_destination.uri. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.

batch_size

Field google.cloud.vision.v1p4beta1.OutputConfig.batch_size

gcs_destination

Field google.cloud.vision.v1p4beta1.OutputConfig.gcs_destination

class google.cloud.vision_v1p4beta1.types.Page

Detected page from OCR.

property

Additional information detected on the page.

width

Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.

height

Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.

blocks

List of blocks of text, images etc on this page.

confidence

Confidence of the OCR results on the page. Range [0, 1].

blocks

Field google.cloud.vision.v1p4beta1.Page.blocks

confidence

Field google.cloud.vision.v1p4beta1.Page.confidence

height

Field google.cloud.vision.v1p4beta1.Page.height

property

Field google.cloud.vision.v1p4beta1.Page.property

width

Field google.cloud.vision.v1p4beta1.Page.width

class google.cloud.vision_v1p4beta1.types.Paragraph

Structural unit of text representing a number of words in certain order.

property

Additional information detected for the paragraph.

bounding_box

The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the ‘natural’ orientation. For example: * when the text is horizontal it might look like: 0—-1 | | 3 —-2 * when it’s rotated 180 degrees around the top-left corner it becomes: 2—-3 | | 1—-0 and the vertex order will still be (0, 1, 2, 3).

words

List of all words in this paragraph.

confidence

Confidence of the OCR results for the paragraph. Range [0, 1].

bounding_box

Field google.cloud.vision.v1p4beta1.Paragraph.bounding_box

confidence

Field google.cloud.vision.v1p4beta1.Paragraph.confidence

property

Field google.cloud.vision.v1p4beta1.Paragraph.property

words

Field google.cloud.vision.v1p4beta1.Paragraph.words

class google.cloud.vision_v1p4beta1.types.Position

A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.

x

X coordinate.

y

Y coordinate.

z

Z coordinate (or depth).

x

Field google.cloud.vision.v1p4beta1.Position.x

y

Field google.cloud.vision.v1p4beta1.Position.y

z

Field google.cloud.vision.v1p4beta1.Position.z

class google.cloud.vision_v1p4beta1.types.Product

A Product contains ReferenceImages.

name

The resource name of the product. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. This field is ignored when creating a product.

display_name

The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.

description

User-provided metadata to be stored with this product. Must be at most 4096 characters long.

product_category

Immutable. The category for the product identified by the reference image. This should be either “homegoods-v2”, “apparel-v2”, or “toys-v2”. The legacy categories “homegoods”, “apparel”, and “toys” are still supported, but these should not be used for new products.

product_labels

Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. “1199”. Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.

class KeyValue

A product label represented as a key-value pair.

key

The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.

value

The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.

key

Field google.cloud.vision.v1p4beta1.Product.KeyValue.key

value

Field google.cloud.vision.v1p4beta1.Product.KeyValue.value

description

Field google.cloud.vision.v1p4beta1.Product.description

display_name

Field google.cloud.vision.v1p4beta1.Product.display_name

name

Field google.cloud.vision.v1p4beta1.Product.name

product_category

Field google.cloud.vision.v1p4beta1.Product.product_category

product_labels

Field google.cloud.vision.v1p4beta1.Product.product_labels

class google.cloud.vision_v1p4beta1.types.ProductSearchParams

Parameters for a product search request.

bounding_poly

The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.

product_set

The resource name of a [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for similar images. Format is: projects/PROJECT_ID /locations/LOC_ID/productSets/PRODUCT_SET_ID.

product_categories

The list of product categories to search in. Currently, we only consider the first category, and either “homegoods-v2”, “apparel-v2”, “toys-v2”, “packagedgoods-v1”, or “general-v1” should be specified. The legacy categories “homegoods”, “apparel”, and “toys” are still supported but will be deprecated. For new products, please use “homegoods-v2”, “apparel-v2”, or “toys-v2” for better product search accuracy. It is recommended to migrate existing products to these categories as well.

filter

The filtering expression. This can be used to restrict search results based on Product labels. We currently support an AND of OR of key-value expressions, where each expression within an OR must have the same key. An ‘=’ should be used to connect the key and value. For example, “(color = red OR color = blue) AND brand = Google” is acceptable, but “(color = red OR brand = Google)” is not acceptable. “color: red” is not acceptable because it uses a ‘:’ instead of an ‘=’.

bounding_poly

Field google.cloud.vision.v1p4beta1.ProductSearchParams.bounding_poly

filter

Field google.cloud.vision.v1p4beta1.ProductSearchParams.filter

product_categories

Field google.cloud.vision.v1p4beta1.ProductSearchParams.product_categories

product_set

Field google.cloud.vision.v1p4beta1.ProductSearchParams.product_set

class google.cloud.vision_v1p4beta1.types.ProductSearchResults

Results for a product search request.

index_time

Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.

results

List of results, one for each product match.

product_grouped_results

List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.

class GroupedResult

Information about the products similar to a single product in a query image.

bounding_poly

The bounding polygon around the product detected in the query image.

results

List of results, one for each product match.

object_annotations

List of generic predictions for the object in the bounding box.

bounding_poly

Field google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.bounding_poly

object_annotations

Field google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.object_annotations

results

Field google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.results

class ObjectAnnotation

Prediction for what the object in the bounding box is.

mid

Object ID that should align with EntityAnnotation mid.

language_code

The BCP-47 language code, such as “en-US” or “sr-Latn”. For more information, see http://www.unicode.org/reports/tr35/#Uni code_locale_identifier.

name

Object name, expressed in its language_code language.

score

Score of the result. Range [0, 1].

language_code

Field google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.language_code

mid

Field google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.mid

name

Field google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.name

score

Field google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.score

class Result

Information about a product.

product

The Product.

score

A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).

image

The resource name of the image from the product that is the closest match to the query.

image

Field google.cloud.vision.v1p4beta1.ProductSearchResults.Result.image

product

Field google.cloud.vision.v1p4beta1.ProductSearchResults.Result.product

score

Field google.cloud.vision.v1p4beta1.ProductSearchResults.Result.score

index_time

Field google.cloud.vision.v1p4beta1.ProductSearchResults.index_time

product_grouped_results

Field google.cloud.vision.v1p4beta1.ProductSearchResults.product_grouped_results

results

Field google.cloud.vision.v1p4beta1.ProductSearchResults.results

class google.cloud.vision_v1p4beta1.types.ProductSet

A ProductSet contains Products. A ProductSet can contain a maximum of 1 million reference images. If the limit is exceeded, periodic indexing will fail.

name

The resource name of the ProductSet. Format is: projects/PR OJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID. This field is ignored when creating a ProductSet.

display_name

The user-provided name for this ProductSet. Must not be empty. Must be at most 4096 characters long.

index_time

Output only. The time at which this ProductSet was last indexed. Query results will reflect all updates before this time. If this ProductSet has never been indexed, this timestamp is the default value “1970-01-01T00:00:00Z”. This field is ignored when creating a ProductSet.

index_error

Output only. If there was an error with indexing the product set, the field is populated. This field is ignored when creating a ProductSet.

display_name

Field google.cloud.vision.v1p4beta1.ProductSet.display_name

index_error

Field google.cloud.vision.v1p4beta1.ProductSet.index_error

index_time

Field google.cloud.vision.v1p4beta1.ProductSet.index_time

name

Field google.cloud.vision.v1p4beta1.ProductSet.name

class google.cloud.vision_v1p4beta1.types.ProductSetPurgeConfig

Config to control which ProductSet contains the Products to be deleted.

product_set_id

The ProductSet that contains the Products to delete. If a Product is a member of product_set_id in addition to other ProductSets, the Product will still be deleted.

product_set_id

Field google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.product_set_id

class google.cloud.vision_v1p4beta1.types.Property

A Property consists of a user-supplied name/value pair.

name

Name of the property.

value

Value of the property.

uint64_value

Value of numeric properties.

name

Field google.cloud.vision.v1p4beta1.Property.name

uint64_value

Field google.cloud.vision.v1p4beta1.Property.uint64_value

value

Field google.cloud.vision.v1p4beta1.Property.value

class google.cloud.vision_v1p4beta1.types.PurgeProductsRequest

Request message for the PurgeProducts method.

target

The Products to delete.

product_set_purge_config

Specify which ProductSet contains the Products to be deleted.

delete_orphan_products

If delete_orphan_products is true, all Products that are not in any ProductSet will be deleted.

parent

Required. The project and location in which the Products should be deleted. Format is projects/PROJECT_ID/locations/LOC_ID.

force

The default value is false. Override this value to true to actually perform the purge.

delete_orphan_products

Field google.cloud.vision.v1p4beta1.PurgeProductsRequest.delete_orphan_products

force

Field google.cloud.vision.v1p4beta1.PurgeProductsRequest.force

parent

Field google.cloud.vision.v1p4beta1.PurgeProductsRequest.parent

product_set_purge_config

Field google.cloud.vision.v1p4beta1.PurgeProductsRequest.product_set_purge_config

class google.cloud.vision_v1p4beta1.types.ReferenceImage

A ReferenceImage represents a product image and its associated metadata, such as bounding boxes.

name

The resource name of the reference image. Format is: proje cts/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceI mages/IMAGE_ID. This field is ignored when creating a reference image.

uri

Required. The Google Cloud Storage URI of the reference image. The URI must start with gs://.

bounding_polys

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

bounding_polys

Field google.cloud.vision.v1p4beta1.ReferenceImage.bounding_polys

name

Field google.cloud.vision.v1p4beta1.ReferenceImage.name

uri

Field google.cloud.vision.v1p4beta1.ReferenceImage.uri

class google.cloud.vision_v1p4beta1.types.RemoveProductFromProductSetRequest

Request message for the RemoveProductFromProductSet method.

name

Required. The resource name for the ProductSet to modify. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/ PRODUCT_SET_ID

product

Required. The resource name for the Product to be removed from this ProductSet. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID

name

Field google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.name

product

Field google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.product

class google.cloud.vision_v1p4beta1.types.SafeSearchAnnotation

Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).

adult

Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.

spoof

Spoof likelihood. The likelihood that an modification was made to the image’s canonical version to make it appear funny or offensive.

medical

Likelihood that this is a medical image.

violence

Likelihood that this image contains violent content.

racy

Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.

adult

Field google.cloud.vision.v1p4beta1.SafeSearchAnnotation.adult

medical

Field google.cloud.vision.v1p4beta1.SafeSearchAnnotation.medical

racy

Field google.cloud.vision.v1p4beta1.SafeSearchAnnotation.racy

spoof

Field google.cloud.vision.v1p4beta1.SafeSearchAnnotation.spoof

violence

Field google.cloud.vision.v1p4beta1.SafeSearchAnnotation.violence

class google.cloud.vision_v1p4beta1.types.Status
code

Field google.rpc.Status.code

details

Field google.rpc.Status.details

message

Field google.rpc.Status.message

class google.cloud.vision_v1p4beta1.types.StringValue
value

Field google.protobuf.StringValue.value

class google.cloud.vision_v1p4beta1.types.Symbol

A single symbol representation.

property

Additional information detected for the symbol.

bounding_box

The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the ‘natural’ orientation. For example: * when the text is horizontal it might look like: 0—-1 | | 3 —-2 * when it’s rotated 180 degrees around the top-left corner it becomes: 2—-3 | | 1—-0 and the vertex order will still be (0, 1, 2, 3).

text

The actual UTF-8 representation of the symbol.

confidence

Confidence of the OCR results for the symbol. Range [0, 1].

bounding_box

Field google.cloud.vision.v1p4beta1.Symbol.bounding_box

confidence

Field google.cloud.vision.v1p4beta1.Symbol.confidence

property

Field google.cloud.vision.v1p4beta1.Symbol.property

text

Field google.cloud.vision.v1p4beta1.Symbol.text

class google.cloud.vision_v1p4beta1.types.TextAnnotation

TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty] message definition below for more detail.

pages

List of pages detected by OCR.

text

UTF-8 text detected on the pages.

class DetectedBreak

Detected start or end of a structural component.

type

Detected break type.

is_prefix

True if break prepends the element.

is_prefix

Field google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.is_prefix

type

Field google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.type

class DetectedLanguage

Detected language for a structural component.

language_code

The BCP-47 language code, such as “en-US” or “sr-Latn”. For more information, see http://www.unicode.org/reports/tr35/#Uni code_locale_identifier.

confidence

Confidence of detected language. Range [0, 1].

confidence

Field google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.confidence

language_code

Field google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.language_code

class TextProperty

Additional information detected on the structural component.

detected_languages

A list of detected languages together with confidence.

detected_break

Detected start or end of a text segment.

detected_break

Field google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.detected_break

detected_languages

Field google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.detected_languages

pages

Field google.cloud.vision.v1p4beta1.TextAnnotation.pages

text

Field google.cloud.vision.v1p4beta1.TextAnnotation.text

class google.cloud.vision_v1p4beta1.types.Timestamp
nanos

Field google.protobuf.Timestamp.nanos

seconds

Field google.protobuf.Timestamp.seconds

class google.cloud.vision_v1p4beta1.types.UInt32Value
value

Field google.protobuf.UInt32Value.value

class google.cloud.vision_v1p4beta1.types.UInt64Value
value

Field google.protobuf.UInt64Value.value

class google.cloud.vision_v1p4beta1.types.UpdateProductRequest

Request message for the UpdateProduct method.

product

Required. The Product resource which replaces the one on the server. product.name is immutable.

update_mask

The [FieldMask][google.protobuf.FieldMask] that specifies which fields to update. If update_mask isn’t specified, all mutable fields are to be updated. Valid mask paths include product_labels, display_name, and description.

product

Field google.cloud.vision.v1p4beta1.UpdateProductRequest.product

update_mask

Field google.cloud.vision.v1p4beta1.UpdateProductRequest.update_mask

class google.cloud.vision_v1p4beta1.types.UpdateProductSetRequest

Request message for the UpdateProductSet method.

product_set

Required. The ProductSet resource which replaces the one on the server.

update_mask

The [FieldMask][google.protobuf.FieldMask] that specifies which fields to update. If update_mask isn’t specified, all mutable fields are to be updated. Valid mask path is display_name.

product_set

Field google.cloud.vision.v1p4beta1.UpdateProductSetRequest.product_set

update_mask

Field google.cloud.vision.v1p4beta1.UpdateProductSetRequest.update_mask

class google.cloud.vision_v1p4beta1.types.Vertex

X coordinate.

y

Y coordinate.

x

Field google.cloud.vision.v1p4beta1.Vertex.x

y

Field google.cloud.vision.v1p4beta1.Vertex.y

class google.cloud.vision_v1p4beta1.types.WebDetection

Relevant information for the image from the Internet.

web_entities

Deduced entities from similar images on the Internet.

full_matching_images

Fully matching images from the Internet. Can include resized copies of the query image.

partial_matching_images

Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.

pages_with_matching_images

Web pages containing the matching images from the Internet.

visually_similar_images

The visually similar image results.

best_guess_labels

The service’s best guess as to the topic of the request image. Inferred from similar images on the open web.

class WebEntity

Entity deduced from similar images on the Internet.

entity_id

Opaque entity ID.

score

Overall relevancy score for the entity. Not normalized and not comparable across different image queries.

description

Canonical description of the entity, in English.

description

Field google.cloud.vision.v1p4beta1.WebDetection.WebEntity.description

entity_id

Field google.cloud.vision.v1p4beta1.WebDetection.WebEntity.entity_id

score

Field google.cloud.vision.v1p4beta1.WebDetection.WebEntity.score

class WebImage

Metadata for online images.

url

The result image URL.

score

(Deprecated) Overall relevancy score for the image.

score

Field google.cloud.vision.v1p4beta1.WebDetection.WebImage.score

url

Field google.cloud.vision.v1p4beta1.WebDetection.WebImage.url

class WebLabel

Label to provide extra metadata for the web detection.

label

Label for extra metadata.

language_code

The BCP-47 language code for label, such as “en-US” or “sr-Latn”. For more information, see http://www.unicode.org/re ports/tr35/#Unicode_locale_identifier.

label

Field google.cloud.vision.v1p4beta1.WebDetection.WebLabel.label

language_code

Field google.cloud.vision.v1p4beta1.WebDetection.WebLabel.language_code

class WebPage

Metadata for web pages.

url

The result web page URL.

score

(Deprecated) Overall relevancy score for the web page.

page_title

Title for the web page, may contain HTML markups.

full_matching_images

Fully matching images on the page. Can include resized copies of the query image.

partial_matching_images

Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.

full_matching_images

Field google.cloud.vision.v1p4beta1.WebDetection.WebPage.full_matching_images

page_title

Field google.cloud.vision.v1p4beta1.WebDetection.WebPage.page_title

partial_matching_images

Field google.cloud.vision.v1p4beta1.WebDetection.WebPage.partial_matching_images

score

Field google.cloud.vision.v1p4beta1.WebDetection.WebPage.score

url

Field google.cloud.vision.v1p4beta1.WebDetection.WebPage.url

best_guess_labels

Field google.cloud.vision.v1p4beta1.WebDetection.best_guess_labels

full_matching_images

Field google.cloud.vision.v1p4beta1.WebDetection.full_matching_images

pages_with_matching_images

Field google.cloud.vision.v1p4beta1.WebDetection.pages_with_matching_images

partial_matching_images

Field google.cloud.vision.v1p4beta1.WebDetection.partial_matching_images

visually_similar_images

Field google.cloud.vision.v1p4beta1.WebDetection.visually_similar_images

web_entities

Field google.cloud.vision.v1p4beta1.WebDetection.web_entities

class google.cloud.vision_v1p4beta1.types.WebDetectionParams

Parameters for web detection request.

include_geo_results

Whether to include results derived from the geo information in the image.

include_geo_results

Field google.cloud.vision.v1p4beta1.WebDetectionParams.include_geo_results

class google.cloud.vision_v1p4beta1.types.Word

A word representation.

property

Additional information detected for the word.

bounding_box

The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the ‘natural’ orientation. For example: * when the text is horizontal it might look like: 0—-1 | | 3 —-2 * when it’s rotated 180 degrees around the top-left corner it becomes: 2—-3 | | 1—-0 and the vertex order will still be (0, 1, 2, 3).

symbols

List of symbols in the word. The order of the symbols follows the natural reading order.

confidence

Confidence of the OCR results for the word. Range [0, 1].

bounding_box

Field google.cloud.vision.v1p4beta1.Word.bounding_box

confidence

Field google.cloud.vision.v1p4beta1.Word.confidence

property

Field google.cloud.vision.v1p4beta1.Word.property

symbols

Field google.cloud.vision.v1p4beta1.Word.symbols