Package types (2.4.4)

API documentation for vision_v1p4beta1.types package.

Classes

AddProductToProductSetRequest

Request message for the AddProductToProductSet method. .. attribute:: name

Required. The resource name for the ProductSet to modify.

Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

:type: str

AnnotateFileRequest

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

AnnotateFileResponse

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

AnnotateImageRequest

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

AnnotateImageResponse

Response to an image annotation request. .. attribute:: face_annotations

If present, face detection has completed successfully.

:type: Sequence[google.cloud.vision_v1p4beta1.types.FaceAnnotation]

AsyncAnnotateFileRequest

An offline file annotation request. .. attribute:: input_config

Required. Information about the input file.

:type: google.cloud.vision_v1p4beta1.types.InputConfig

AsyncAnnotateFileResponse

The response for a single offline file annotation request. .. attribute:: output_config

The output location and metadata from AsyncAnnotateFileRequest.

:type: google.cloud.vision_v1p4beta1.types.OutputConfig

AsyncBatchAnnotateFilesRequest

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

AsyncBatchAnnotateFilesResponse

Response to an async batch file annotation request. .. attribute:: responses

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

:type: Sequence[google.cloud.vision_v1p4beta1.types.AsyncAnnotateFileResponse]

AsyncBatchAnnotateImagesRequest

Request for async image annotation for a list of images. .. attribute:: requests

Required. Individual image annotation requests for this batch.

:type: Sequence[google.cloud.vision_v1p4beta1.types.AnnotateImageRequest]

AsyncBatchAnnotateImagesResponse

Response to an async batch image annotation request. .. attribute:: output_config

The output location and metadata from AsyncBatchAnnotateImagesRequest.

:type: google.cloud.vision_v1p4beta1.types.OutputConfig

BatchAnnotateFilesRequest

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

BatchAnnotateFilesResponse

A list of file annotation responses. .. attribute:: responses

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

:type: Sequence[google.cloud.vision_v1p4beta1.types.AnnotateFileResponse]

BatchAnnotateImagesRequest

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

BatchAnnotateImagesResponse

Response to a batch image annotation request. .. attribute:: responses

Individual responses to image annotation requests within the batch.

:type: Sequence[google.cloud.vision_v1p4beta1.types.AnnotateImageResponse]

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.

Block

Logical element on the page. .. attribute:: property

Additional information detected for the block.

:type: google.cloud.vision_v1p4beta1.types.TextAnnotation.TextProperty

BoundingPoly

A bounding polygon for the detected image annotation. .. attribute:: vertices

The bounding polygon vertices.

:type: Sequence[google.cloud.vision_v1p4beta1.types.Vertex]

Celebrity

A Celebrity is a group of Faces with an identity. .. attribute:: name

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

:type: str

ColorInfo

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

CreateProductRequest

Request message for the CreateProduct method. .. attribute:: parent

Required. The project in which the Product should be created.

Format is projects/PROJECT_ID/locations/LOC_ID.

:type: str

CreateProductSetRequest

Request message for the CreateProductSet method. .. attribute:: parent

Required. The project in which the ProductSet should be created.

Format is projects/PROJECT_ID/locations/LOC_ID.

:type: str

CreateReferenceImageRequest

Request message for the CreateReferenceImage method. .. attribute:: 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.

:type: str

CropHint

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

CropHintsAnnotation

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

CropHintsParams

Parameters for crop hints annotation request. .. attribute:: 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.

:type: Sequence[float]

DeleteProductRequest

Request message for the DeleteProduct method. .. attribute:: name

Required. Resource name of product to delete.

Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID

:type: str

DeleteProductSetRequest

Request message for the DeleteProductSet method. .. attribute:: name

Required. Resource name of the ProductSet to delete.

Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

:type: str

DeleteReferenceImageRequest

Request message for the DeleteReferenceImage method. .. attribute:: name

Required. The resource name of the reference image to delete.

Format is:

projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID

:type: str

DominantColorsAnnotation

Set of dominant colors and their corresponding scores. .. attribute:: colors

RGB color values with their score and pixel fraction.

:type: Sequence[google.cloud.vision_v1p4beta1.types.ColorInfo]

EntityAnnotation

Set of detected entity features. .. attribute:: mid

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API <https://developers.google.com/knowledge-graph/>__.

:type: str

FaceAnnotation

A face annotation object contains the results of face detection.

FaceRecognitionParams

Parameters for a celebrity recognition request. .. attribute:: celebrity_set

The resource names for one or more CelebritySets. 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.

:type: Sequence[str]

FaceRecognitionResult

Information about a face's identity. .. attribute:: celebrity

The Celebrity that this face was matched to.

:type: google.cloud.vision_v1p4beta1.types.Celebrity

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.

GcsDestination

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

GcsSource

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

GetProductRequest

Request message for the GetProduct method. .. attribute:: name

Required. Resource name of the Product to get.

Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID

:type: str

GetProductSetRequest

Request message for the GetProductSet method. .. attribute:: name

Required. Resource name of the ProductSet to get.

Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

:type: str

GetReferenceImageRequest

Request message for the GetReferenceImage method. .. attribute:: name

Required. The resource name of the ReferenceImage to get.

Format is:

projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID.

:type: str

Image

Client image to perform Google Cloud Vision API tasks over. .. attribute:: 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.

:type: bytes

ImageAnnotationContext

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

ImageContext

Image context and/or feature-specific parameters. .. attribute:: lat_long_rect

Not used.

:type: google.cloud.vision_v1p4beta1.types.LatLongRect

ImageProperties

Stores image properties, such as dominant colors. .. attribute:: dominant_colors

If present, dominant colors completed successfully.

:type: google.cloud.vision_v1p4beta1.types.DominantColorsAnnotation

ImageSource

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

ImportProductSetsGcsSource

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

ImportProductSetsInputConfig

The input content for the ImportProductSets method. .. attribute:: gcs_source

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

:type: google.cloud.vision_v1p4beta1.types.ImportProductSetsGcsSource

ImportProductSetsRequest

Request message for the ImportProductSets method. .. attribute:: parent

Required. The project in which the ProductSets should be imported.

Format is projects/PROJECT_ID/locations/LOC_ID.

:type: str

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.

InputConfig

The desired input location and metadata. .. attribute:: gcs_source

The Google Cloud Storage location to read the input from.

:type: google.cloud.vision_v1p4beta1.types.GcsSource

LatLongRect

Rectangle determined by min and max LatLng pairs. .. attribute:: min_lat_lng

Min lat/long pair.

:type: google.type.latlng_pb2.LatLng

Likelihood

A bucketized representation of likelihood, which is intended to give clients highly stable results across model upgrades.

ListProductSetsRequest

Request message for the ListProductSets method. .. attribute:: parent

Required. The project from which ProductSets should be listed.

Format is projects/PROJECT_ID/locations/LOC_ID.

:type: str

ListProductSetsResponse

Response message for the ListProductSets method. .. attribute:: product_sets

List of ProductSets.

:type: Sequence[google.cloud.vision_v1p4beta1.types.ProductSet]

ListProductsInProductSetRequest

Request message for the ListProductsInProductSet method. .. attribute:: name

Required. The ProductSet resource for which to retrieve Products.

Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

:type: str

ListProductsInProductSetResponse

Response message for the ListProductsInProductSet method. .. attribute:: products

The list of Products.

:type: Sequence[google.cloud.vision_v1p4beta1.types.Product]

ListProductsRequest

Request message for the ListProducts method. .. attribute:: parent

Required. The project OR ProductSet from which Products should be listed.

Format: projects/PROJECT_ID/locations/LOC_ID

:type: str

ListProductsResponse

Response message for the ListProducts method. .. attribute:: products

List of products.

:type: Sequence[google.cloud.vision_v1p4beta1.types.Product]

ListReferenceImagesRequest

Request message for the ListReferenceImages method. .. attribute:: parent

Required. Resource name of the product containing the reference images.

Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

:type: str

ListReferenceImagesResponse

Response message for the ListReferenceImages method. .. attribute:: reference_images

The list of reference images.

:type: Sequence[google.cloud.vision_v1p4beta1.types.ReferenceImage]

LocalizedObjectAnnotation

Set of detected objects with bounding boxes. .. attribute:: mid

Object ID that should align with EntityAnnotation mid.

:type: str

LocationInfo

Detected entity location information. .. attribute:: lat_lng

lat/long location coordinates.

:type: google.type.latlng_pb2.LatLng

NormalizedVertex

A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.

OperationMetadata

Contains metadata for the BatchAnnotateImages operation. .. attribute:: state

Current state of the batch operation.

:type: google.cloud.vision_v1p4beta1.types.OperationMetadata.State

OutputConfig

The desired output location and metadata. .. attribute:: gcs_destination

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

:type: google.cloud.vision_v1p4beta1.types.GcsDestination

Page

Detected page from OCR. .. attribute:: property

Additional information detected on the page.

:type: google.cloud.vision_v1p4beta1.types.TextAnnotation.TextProperty

Paragraph

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

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.

Product

A Product contains ReferenceImages. .. attribute:: 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.

:type: str

ProductSearchParams

Parameters for a product search request. .. attribute:: bounding_poly

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

:type: google.cloud.vision_v1p4beta1.types.BoundingPoly

ProductSearchResults

Results for a product search request. .. attribute:: 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.

:type: google.protobuf.timestamp_pb2.Timestamp

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.

ProductSetPurgeConfig

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

Property

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

Name of the property.

:type: str

PurgeProductsRequest

Request message for the PurgeProducts method. .. attribute:: product_set_purge_config

Specify which ProductSet contains the Products to be deleted.

:type: google.cloud.vision_v1p4beta1.types.ProductSetPurgeConfig

ReferenceImage

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

RemoveProductFromProductSetRequest

Request message for the RemoveProductFromProductSet method. .. attribute:: name

Required. The resource name for the ProductSet to modify.

Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

:type: str

SafeSearchAnnotation

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

Symbol

A single symbol representation. .. attribute:: property

Additional information detected for the symbol.

:type: google.cloud.vision_v1p4beta1.types.TextAnnotation.TextProperty

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 message definition below for more detail.

TextDetectionParams

Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.

UpdateProductRequest

Request message for the UpdateProduct method. .. attribute:: product

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

:type: google.cloud.vision_v1p4beta1.types.Product

UpdateProductSetRequest

Request message for the UpdateProductSet method. .. attribute:: product_set

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

:type: google.cloud.vision_v1p4beta1.types.ProductSet

Vertex

A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.

WebDetection

Relevant information for the image from the Internet. .. attribute:: web_entities

Deduced entities from similar images on the Internet.

:type: Sequence[google.cloud.vision_v1p4beta1.types.WebDetection.WebEntity]

WebDetectionParams

Parameters for web detection request. .. attribute:: include_geo_results

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

:type: bool

Word

A word representation. .. attribute:: property

Additional information detected for the word.

:type: google.cloud.vision_v1p4beta1.types.TextAnnotation.TextProperty