Enumerations

BlockType

static

number

Type of a block (text, image etc) as identified by OCR.

Value

UNKNOWN

Unknown block type.

TEXT

Regular text block.

TABLE

Table block.

PICTURE

Image block.

RULER

Horizontal/vertical line box.

BARCODE

Barcode block.

BreakType

static

number

Enum to denote the type of break found. New line, space etc.

Value

UNKNOWN

Unknown break label type.

SPACE

Regular space.

SURE_SPACE

Sure space (very wide).

EOL_SURE_SPACE

Line-wrapping break.

HYPHEN

End-line hyphen that is not present in text; does not co-occur with SPACE, LEADER_SPACE, or LINE_BREAK.

LINE_BREAK

Line break that ends a paragraph.

Likelihood

constant   static

number

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

Value

UNKNOWN

Unknown likelihood.

VERY_UNLIKELY

It is very unlikely that the image belongs to the specified vertical.

UNLIKELY

It is unlikely that the image belongs to the specified vertical.

POSSIBLE

It is possible that the image belongs to the specified vertical.

LIKELY

It is likely that the image belongs to the specified vertical.

VERY_LIKELY

It is very likely that the image belongs to the specified vertical.

ProductSearchCategory

constant   static

number

Supported product search categories.

Value

PRODUCT_SEARCH_CATEGORY_UNSPECIFIED

Default value used when a category is not specified.

SHOES

Shoes category.

BAGS

Bags category.

ProductSearchResultsView

constant   static

number

Specifies the fields to include in product search results.

Value

BASIC

Product search results contain only product_category and product_id. Default value.

FULL

Product search results contain product_category, product_id, image_uri, and score.

State

static

number

Enumerates the possible states that the batch request can be in.

Value

STATE_UNSPECIFIED

Invalid.

PROCESSING

Request is actively being processed.

SUCCESSFUL

The request is done and at least one item has been successfully processed.

FAILED

The request is done and no item has been successfully processed.

CANCELLED

The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request.

State

static

number

Batch operation states.

Value

STATE_UNSPECIFIED

Invalid.

CREATED

Request is received.

RUNNING

Request is actively being processed.

DONE

The batch processing is done.

CANCELLED

The batch processing was cancelled.

Type

static

number

Type of Google Cloud Vision API feature to be extracted.

Value

TYPE_UNSPECIFIED

Unspecified feature type.

FACE_DETECTION

Run face detection.

LANDMARK_DETECTION

Run landmark detection.

LOGO_DETECTION

Run logo detection.

LABEL_DETECTION

Run label detection.

TEXT_DETECTION

Run text detection / optical character recognition (OCR). Text detection is optimized for areas of text within a larger image; if the image is a document, use DOCUMENT_TEXT_DETECTION instead.

DOCUMENT_TEXT_DETECTION

Run dense text document OCR. Takes precedence when both DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.

SAFE_SEARCH_DETECTION

Run Safe Search to detect potentially unsafe or undesirable content.

IMAGE_PROPERTIES

Compute a set of image properties, such as the image's dominant colors.

CROP_HINTS

Run crop hints.

WEB_DETECTION

Run web detection.

PRODUCT_SEARCH

Run Product Search.

OBJECT_LOCALIZATION

Run localizer for object detection.

Type

static

number

Face landmark (feature) type. Left and right are defined from the vantage of the viewer of the image without considering mirror projections typical of photos. So, LEFT_EYE, typically, is the person's right eye.

Value

UNKNOWN_LANDMARK

Unknown face landmark detected. Should not be filled.

LEFT_EYE

Left eye.

RIGHT_EYE

Right eye.

LEFT_OF_LEFT_EYEBROW

Left of left eyebrow.

RIGHT_OF_LEFT_EYEBROW

Right of left eyebrow.

LEFT_OF_RIGHT_EYEBROW

Left of right eyebrow.

RIGHT_OF_RIGHT_EYEBROW

Right of right eyebrow.

MIDPOINT_BETWEEN_EYES

Midpoint between eyes.

NOSE_TIP

Nose tip.

UPPER_LIP

Upper lip.

LOWER_LIP

Lower lip.

MOUTH_LEFT

Mouth left.

MOUTH_RIGHT

Mouth right.

MOUTH_CENTER

Mouth center.

NOSE_BOTTOM_RIGHT

Nose, bottom right.

NOSE_BOTTOM_LEFT

Nose, bottom left.

NOSE_BOTTOM_CENTER

Nose, bottom center.

LEFT_EYE_TOP_BOUNDARY

Left eye, top boundary.

LEFT_EYE_RIGHT_CORNER

Left eye, right corner.

LEFT_EYE_BOTTOM_BOUNDARY

Left eye, bottom boundary.

LEFT_EYE_LEFT_CORNER

Left eye, left corner.

RIGHT_EYE_TOP_BOUNDARY

Right eye, top boundary.

RIGHT_EYE_RIGHT_CORNER

Right eye, right corner.

RIGHT_EYE_BOTTOM_BOUNDARY

Right eye, bottom boundary.

RIGHT_EYE_LEFT_CORNER

Right eye, left corner.

LEFT_EYEBROW_UPPER_MIDPOINT

Left eyebrow, upper midpoint.

RIGHT_EYEBROW_UPPER_MIDPOINT

Right eyebrow, upper midpoint.

LEFT_EAR_TRAGION

Left ear tragion.

RIGHT_EAR_TRAGION

Right ear tragion.

LEFT_EYE_PUPIL

Left eye pupil.

RIGHT_EYE_PUPIL

Right eye pupil.

FOREHEAD_GLABELLA

Forehead glabella.

CHIN_GNATHION

Chin gnathion.

CHIN_LEFT_GONION

Chin left gonion.

CHIN_RIGHT_GONION

Chin right gonion.

Properties

BlockType

static

number

Type of a block (text, image etc) as identified by OCR.

Value

UNKNOWN

Unknown block type.

TEXT

Regular text block.

TABLE

Table block.

PICTURE

Image block.

RULER

Horizontal/vertical line box.

BARCODE

Barcode block.

BreakType

static

number

Enum to denote the type of break found. New line, space etc.

Value

UNKNOWN

Unknown break label type.

SPACE

Regular space.

SURE_SPACE

Sure space (very wide).

EOL_SURE_SPACE

Line-wrapping break.

HYPHEN

End-line hyphen that is not present in text; does not co-occur with SPACE, LEADER_SPACE, or LINE_BREAK.

LINE_BREAK

Line break that ends a paragraph.

Likelihood

constant   static

number

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

Value

UNKNOWN

Unknown likelihood.

VERY_UNLIKELY

It is very unlikely that the image belongs to the specified vertical.

UNLIKELY

It is unlikely that the image belongs to the specified vertical.

POSSIBLE

It is possible that the image belongs to the specified vertical.

LIKELY

It is likely that the image belongs to the specified vertical.

VERY_LIKELY

It is very likely that the image belongs to the specified vertical.

ProductSearchCategory

constant   static

number

Supported product search categories.

Value

PRODUCT_SEARCH_CATEGORY_UNSPECIFIED

Default value used when a category is not specified.

SHOES

Shoes category.

BAGS

Bags category.

ProductSearchResultsView

constant   static

number

Specifies the fields to include in product search results.

Value

BASIC

Product search results contain only product_category and product_id. Default value.

FULL

Product search results contain product_category, product_id, image_uri, and score.

State

static

number

Enumerates the possible states that the batch request can be in.

Value

STATE_UNSPECIFIED

Invalid.

PROCESSING

Request is actively being processed.

SUCCESSFUL

The request is done and at least one item has been successfully processed.

FAILED

The request is done and no item has been successfully processed.

CANCELLED

The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request.

State

static

number

Batch operation states.

Value

STATE_UNSPECIFIED

Invalid.

CREATED

Request is received.

RUNNING

Request is actively being processed.

DONE

The batch processing is done.

CANCELLED

The batch processing was cancelled.

Type

static

number

Type of Google Cloud Vision API feature to be extracted.

Value

TYPE_UNSPECIFIED

Unspecified feature type.

FACE_DETECTION

Run face detection.

LANDMARK_DETECTION

Run landmark detection.

LOGO_DETECTION

Run logo detection.

LABEL_DETECTION

Run label detection.

TEXT_DETECTION

Run text detection / optical character recognition (OCR). Text detection is optimized for areas of text within a larger image; if the image is a document, use DOCUMENT_TEXT_DETECTION instead.

DOCUMENT_TEXT_DETECTION

Run dense text document OCR. Takes precedence when both DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.

SAFE_SEARCH_DETECTION

Run Safe Search to detect potentially unsafe or undesirable content.

IMAGE_PROPERTIES

Compute a set of image properties, such as the image's dominant colors.

CROP_HINTS

Run crop hints.

WEB_DETECTION

Run web detection.

PRODUCT_SEARCH

Run Product Search.

OBJECT_LOCALIZATION

Run localizer for object detection.

Type

static

number

Face landmark (feature) type. Left and right are defined from the vantage of the viewer of the image without considering mirror projections typical of photos. So, LEFT_EYE, typically, is the person's right eye.

Value

UNKNOWN_LANDMARK

Unknown face landmark detected. Should not be filled.

LEFT_EYE

Left eye.

RIGHT_EYE

Right eye.

LEFT_OF_LEFT_EYEBROW

Left of left eyebrow.

RIGHT_OF_LEFT_EYEBROW

Right of left eyebrow.

LEFT_OF_RIGHT_EYEBROW

Left of right eyebrow.

RIGHT_OF_RIGHT_EYEBROW

Right of right eyebrow.

MIDPOINT_BETWEEN_EYES

Midpoint between eyes.

NOSE_TIP

Nose tip.

UPPER_LIP

Upper lip.

LOWER_LIP

Lower lip.

MOUTH_LEFT

Mouth left.

MOUTH_RIGHT

Mouth right.

MOUTH_CENTER

Mouth center.

NOSE_BOTTOM_RIGHT

Nose, bottom right.

NOSE_BOTTOM_LEFT

Nose, bottom left.

NOSE_BOTTOM_CENTER

Nose, bottom center.

LEFT_EYE_TOP_BOUNDARY

Left eye, top boundary.

LEFT_EYE_RIGHT_CORNER

Left eye, right corner.

LEFT_EYE_BOTTOM_BOUNDARY

Left eye, bottom boundary.

LEFT_EYE_LEFT_CORNER

Left eye, left corner.

RIGHT_EYE_TOP_BOUNDARY

Right eye, top boundary.

RIGHT_EYE_RIGHT_CORNER

Right eye, right corner.

RIGHT_EYE_BOTTOM_BOUNDARY

Right eye, bottom boundary.

RIGHT_EYE_LEFT_CORNER

Right eye, left corner.

LEFT_EYEBROW_UPPER_MIDPOINT

Left eyebrow, upper midpoint.

RIGHT_EYEBROW_UPPER_MIDPOINT

Right eyebrow, upper midpoint.

LEFT_EAR_TRAGION

Left ear tragion.

RIGHT_EAR_TRAGION

Right ear tragion.

LEFT_EYE_PUPIL

Left eye pupil.

RIGHT_EYE_PUPIL

Right eye pupil.

FOREHEAD_GLABELLA

Forehead glabella.

CHIN_GNATHION

Chin gnathion.

CHIN_LEFT_GONION

Chin left gonion.

CHIN_RIGHT_GONION

Chin right gonion.

Abstract types

AddProductToProductSetRequest

static

Request message for the AddProductToProductSet method.

Properties

Parameter

name

string

The resource name for the ProductSet to modify.

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

product

string

The resource name for the Product to be added to this ProductSet.

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

See also

google.cloud.vision.v1p3beta1.AddProductToProductSetRequest definition in proto format

AnnotateFileResponse

static

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

Properties

Parameter

inputConfig

Object

Information about the file for which this response is generated.

This object should have the same structure as InputConfig

responses

Array of Object

Individual responses to images found within the file.

This object should have the same structure as AnnotateImageResponse

See also

google.cloud.vision.v1p3beta1.AnnotateFileResponse definition in proto format

AnnotateImageRequest

static

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

Properties

Parameter

image

Object

The image to be processed.

This object should have the same structure as Image

features

Array of Object

Requested features.

This object should have the same structure as Feature

imageContext

Object

Additional context that may accompany the image.

This object should have the same structure as ImageContext

See also

google.cloud.vision.v1p3beta1.AnnotateImageRequest definition in proto format

AnnotateImageResponse

static

Response to an image annotation request.

Properties

Parameter

faceAnnotations

Array of Object

If present, face detection has completed successfully.

This object should have the same structure as FaceAnnotation

landmarkAnnotations

Array of Object

If present, landmark detection has completed successfully.

This object should have the same structure as EntityAnnotation

logoAnnotations

Array of Object

If present, logo detection has completed successfully.

This object should have the same structure as EntityAnnotation

labelAnnotations

Array of Object

If present, label detection has completed successfully.

This object should have the same structure as EntityAnnotation

localizedObjectAnnotations

Array of Object

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

This object should have the same structure as LocalizedObjectAnnotation

textAnnotations

Array of Object

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

This object should have the same structure as EntityAnnotation

fullTextAnnotation

Object

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

This object should have the same structure as TextAnnotation

safeSearchAnnotation

Object

If present, safe-search annotation has completed successfully.

This object should have the same structure as SafeSearchAnnotation

imagePropertiesAnnotation

Object

If present, image properties were extracted successfully.

This object should have the same structure as ImageProperties

cropHintsAnnotation

Object

If present, crop hints have completed successfully.

This object should have the same structure as CropHintsAnnotation

webDetection

Object

If present, web detection has completed successfully.

This object should have the same structure as WebDetection

productSearchResults

Object

If present, product search has completed successfully.

This object should have the same structure as ProductSearchResults

error

Object

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.

This object should have the same structure as Status

context

Object

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

This object should have the same structure as ImageAnnotationContext

See also

google.cloud.vision.v1p3beta1.AnnotateImageResponse definition in proto format

AsyncAnnotateFileRequest

static

An offline file annotation request.

Properties

Parameter

inputConfig

Object

Required. Information about the input file.

This object should have the same structure as InputConfig

features

Array of Object

Required. Requested features.

This object should have the same structure as Feature

imageContext

Object

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

This object should have the same structure as ImageContext

outputConfig

Object

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

This object should have the same structure as OutputConfig

See also

google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest definition in proto format

AsyncAnnotateFileResponse

static

The response for a single offline file annotation request.

Property

Parameter

outputConfig

Object

The output location and metadata from AsyncAnnotateFileRequest.

This object should have the same structure as OutputConfig

See also

google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse definition in proto format

AsyncBatchAnnotateFilesRequest

static

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

Property

Parameter

requests

Array of Object

Individual async file annotation requests for this batch.

This object should have the same structure as AsyncAnnotateFileRequest

See also

google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest definition in proto format

AsyncBatchAnnotateFilesResponse

static

Response to an async batch file annotation request.

Property

Parameter

responses

Array of Object

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

This object should have the same structure as AsyncAnnotateFileResponse

See also

google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse definition in proto format

BatchAnnotateImagesRequest

static

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

Property

Parameter

requests

Array of Object

Individual image annotation requests for this batch.

This object should have the same structure as AnnotateImageRequest

See also

google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest definition in proto format

BatchAnnotateImagesResponse

static

Response to a batch image annotation request.

Property

Parameter

responses

Array of Object

Individual responses to image annotation requests within the batch.

This object should have the same structure as AnnotateImageResponse

See also

google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse definition in proto format

BatchOperationMetadata

static

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.

Properties

Parameter

state

number

The current state of the batch operation.

The number should be among the values of State

submitTime

Object

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

This object should have the same structure as Timestamp

endTime

Object

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

This object should have the same structure as Timestamp

See also

google.cloud.vision.v1p3beta1.BatchOperationMetadata definition in proto format

Block

static

Logical element on the page.

Properties

Parameter

property

Object

Additional information detected for the block.

This object should have the same structure as TextProperty

boundingBox

Object

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 vertice order will still be (0, 1, 2, 3).

    This object should have the same structure as BoundingPoly

paragraphs

Array of Object

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

This object should have the same structure as Paragraph

blockType

number

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

The number should be among the values of BlockType

confidence

number

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

See also

google.cloud.vision.v1p3beta1.Block definition in proto format

BoundingPoly

static

A bounding polygon for the detected image annotation.

Properties

Parameter

vertices

Array of Object

The bounding polygon vertices.

This object should have the same structure as Vertex

normalizedVertices

Array of Object

The bounding polygon normalized vertices.

This object should have the same structure as NormalizedVertex

See also

google.cloud.vision.v1p3beta1.BoundingPoly definition in proto format

ColorInfo

static

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

Properties

Parameter

color

Object

RGB components of the color.

This object should have the same structure as Color

score

number

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

pixelFraction

number

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

See also

google.cloud.vision.v1p3beta1.ColorInfo definition in proto format

CreateProductRequest

static

Request message for the CreateProduct method.

Properties

Parameter

parent

string

The project in which the Product should be created.

Format is projects/PROJECT_ID/locations/LOC_ID.

product

Object

The product to create.

This object should have the same structure as Product

productId

string

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 /.

See also

google.cloud.vision.v1p3beta1.CreateProductRequest definition in proto format

CreateProductSetRequest

static

Request message for the CreateProductSet method.

Properties

Parameter

parent

string

The project in which the ProductSet should be created.

Format is projects/PROJECT_ID/locations/LOC_ID.

productSet

Object

The ProductSet to create.

This object should have the same structure as ProductSet

productSetId

string

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 /.

See also

google.cloud.vision.v1p3beta1.CreateProductSetRequest definition in proto format

CreateReferenceImageRequest

static

Request message for the CreateReferenceImage method.

Properties

Parameter

parent

string

Resource name of the product in which to create the reference image.

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

referenceImage

Object

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

This object should have the same structure as ReferenceImage

referenceImageId

string

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 /.

See also

google.cloud.vision.v1p3beta1.CreateReferenceImageRequest definition in proto format

CropHint

static

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

Properties

Parameter

boundingPoly

Object

The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale, as returned in ImageParams.

This object should have the same structure as BoundingPoly

confidence

number

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

importanceFraction

number

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

See also

google.cloud.vision.v1p3beta1.CropHint definition in proto format

CropHintsAnnotation

static

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

Property

Parameter

cropHints

Array of Object

Crop hint results.

This object should have the same structure as CropHint

See also

google.cloud.vision.v1p3beta1.CropHintsAnnotation definition in proto format

CropHintsParams

static

Parameters for crop hints annotation request.

Property

Parameter

aspectRatios

Array of number

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.

See also

google.cloud.vision.v1p3beta1.CropHintsParams definition in proto format

DeleteProductRequest

static

Request message for the DeleteProduct method.

Property

Parameter

name

string

Resource name of product to delete.

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

See also

google.cloud.vision.v1p3beta1.DeleteProductRequest definition in proto format

DeleteProductSetRequest

static

Request message for the DeleteProductSet method.

Property

Parameter

name

string

Resource name of the ProductSet to delete.

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

See also

google.cloud.vision.v1p3beta1.DeleteProductSetRequest definition in proto format

DeleteReferenceImageRequest

static

Request message for the DeleteReferenceImage method.

Property

Parameter

name

string

The resource name of the reference image to delete.

Format is:

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

See also

google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest definition in proto format

DetectedBreak

static

Detected start or end of a structural component.

Properties

Parameter

type

number

Detected break type.

The number should be among the values of BreakType

isPrefix

boolean

True if break prepends the element.

See also

google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak definition in proto format

DetectedLanguage

static

Detected language for a structural component.

Properties

Parameter

languageCode

string

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

confidence

number

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

See also

google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage definition in proto format

DominantColorsAnnotation

static

Set of dominant colors and their corresponding scores.

Property

Parameter

colors

Array of Object

RGB color values with their score and pixel fraction.

This object should have the same structure as ColorInfo

See also

google.cloud.vision.v1p3beta1.DominantColorsAnnotation definition in proto format

EntityAnnotation

static

Set of detected entity features.

Properties

Parameter

mid

string

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

locale

string

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

description

string

Entity textual description, expressed in its locale language.

score

number

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

confidence

number

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

number

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].

boundingPoly

Object

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

This object should have the same structure as BoundingPoly

locations

Array of Object

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.

This object should have the same structure as LocationInfo

properties

Array of Object

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

This object should have the same structure as Property

See also

google.cloud.vision.v1p3beta1.EntityAnnotation definition in proto format

FaceAnnotation

static

A face annotation object contains the results of face detection.

Properties

Parameter

boundingPoly

Object

The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale, as returned in ImageParams. 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.

This object should have the same structure as BoundingPoly

fdBoundingPoly

Object

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.

This object should have the same structure as BoundingPoly

landmarks

Array of Object

Detected face landmarks.

This object should have the same structure as Landmark

rollAngle

number

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].

panAngle

number

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].

tiltAngle

number

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

detectionConfidence

number

Detection confidence. Range [0, 1].

landmarkingConfidence

number

Face landmarking confidence. Range [0, 1].

joyLikelihood

number

Joy likelihood.

The number should be among the values of Likelihood

sorrowLikelihood

number

Sorrow likelihood.

The number should be among the values of Likelihood

angerLikelihood

number

Anger likelihood.

The number should be among the values of Likelihood

surpriseLikelihood

number

Surprise likelihood.

The number should be among the values of Likelihood

underExposedLikelihood

number

Under-exposed likelihood.

The number should be among the values of Likelihood

blurredLikelihood

number

Blurred likelihood.

The number should be among the values of Likelihood

headwearLikelihood

number

Headwear likelihood.

The number should be among the values of Likelihood

See also

google.cloud.vision.v1p3beta1.FaceAnnotation definition in proto format

Feature

static

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.

Properties

Parameter

type

number

The feature type.

The number should be among the values of Type

maxResults

number

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

model

string

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

See also

google.cloud.vision.v1p3beta1.Feature definition in proto format

GcsDestination

static

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

Property

Parameter

uri

string

Google Cloud Storage URI where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI. This field can either represent a single file, or a prefix for multiple outputs. Prefixes must end in a /.

Examples:

  • File: gs://bucket-name/filename.json
  • Prefix: gs://bucket-name/prefix/here/
  • File: gs://bucket-name/prefix/here

    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.

See also

google.cloud.vision.v1p3beta1.GcsDestination definition in proto format

GcsSource

static

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

Property

Parameter

uri

string

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

See also

google.cloud.vision.v1p3beta1.GcsSource definition in proto format

GetProductRequest

static

Request message for the GetProduct method.

Property

Parameter

name

string

Resource name of the Product to get.

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

See also

google.cloud.vision.v1p3beta1.GetProductRequest definition in proto format

GetProductSetRequest

static

Request message for the GetProductSet method.

Property

Parameter

name

string

Resource name of the ProductSet to get.

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

See also

google.cloud.vision.v1p3beta1.GetProductSetRequest definition in proto format

GetReferenceImageRequest

static

Request message for the GetReferenceImage method.

Property

Parameter

name

string

The resource name of the ReferenceImage to get.

Format is:

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

See also

google.cloud.vision.v1p3beta1.GetReferenceImageRequest definition in proto format

Image

static

Client image to perform Google Cloud Vision API tasks over.

Properties

Parameter

content

string

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

Object

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.

This object should have the same structure as ImageSource

See also

google.cloud.vision.v1p3beta1.Image definition in proto format

ImageAnnotationContext

static

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

Properties

Parameter

uri

string

The URI of the file used to produce the image.

pageNumber

number

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

See also

google.cloud.vision.v1p3beta1.ImageAnnotationContext definition in proto format

ImageContext

static

Image context and/or feature-specific parameters.

Properties

Parameter

latLongRect

Object

Not used.

This object should have the same structure as LatLongRect

languageHints

Array of string

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.

cropHintsParams

Object

Parameters for crop hints annotation request.

This object should have the same structure as CropHintsParams

productSearchParams

Object

Parameters for product search.

This object should have the same structure as ProductSearchParams

webDetectionParams

Object

Parameters for web detection.

This object should have the same structure as WebDetectionParams

See also

google.cloud.vision.v1p3beta1.ImageContext definition in proto format

ImageProperties

static

Stores image properties, such as dominant colors.

Property

Parameter

dominantColors

Object

If present, dominant colors completed successfully.

This object should have the same structure as DominantColorsAnnotation

See also

google.cloud.vision.v1p3beta1.ImageProperties definition in proto format

ImageSource

static

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

Properties

Parameter

gcsImageUri

string

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.

imageUri

string

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.

See also

google.cloud.vision.v1p3beta1.ImageSource definition in proto format

ImportProductSetsGcsSource

static

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

Property

Parameter

csvFileUri

string

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 6 columns.

  1. image_uri 2, image_id
  2. product_set_id
  3. product_id 5, product_category 6, product_display_name 7, labels
  4. bounding_poly

    Columns 1, 3, 4, and 5 are required, other columns are optional. A new ProductSet/Product with the same id will be created on the fly if the ProductSet/Product specified by product_set_id/product_id does not exist.

    The image_id field is optional but has to be unique if provided. If it is empty, we will automatically assign an unique id to the image.

    The product_display_name field is optional. If it is empty, a space (" ") is used as the place holder for the product display_name, which can be updated later through the realtime API.

    If the Product with product_id already exists, the fields product_display_name, product_category and labels are ignored.

    If a Product doesn't exist and needs to be created on the fly, the product_display_name field refers to Product.display_name, the product_category field refers to Product.product_category, and the labels field refers to Product.labels.

    Labels (optional) should be a line containing a list of comma-separated key-value pairs, with the format "key_1=value_1,key_2=value_2,...,key_n=value_n".

    The bounding_poly (optional) field is used to identify one region of interest from the image in the same manner as CreateReferenceImage. If no bounding_poly is specified, the system will try to detect regions of interest automatically.

    Note that the pipeline will resize the image if the image resolution is too large to process (above 20MP).

    Also note that at most one bounding_poly is allowed per line. If the image contains multiple regions of interest, the csv should contain one line per region of interest.

    The bounding_poly column should contain an even number of comma-separated numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative integers should be used for absolute bounding polygons, and float values in [0, 1] should be used for normalized bounding polygons.

See also

google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource definition in proto format

ImportProductSetsInputConfig

static

The input content for the ImportProductSets method.

Property

Parameter

gcsSource

Object

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

This object should have the same structure as ImportProductSetsGcsSource

See also

google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig definition in proto format

ImportProductSetsRequest

static

Request message for the ImportProductSets method.

Properties

Parameter

parent

string

The project in which the ProductSets should be imported.

Format is projects/PROJECT_ID/locations/LOC_ID.

inputConfig

Object

The input content for the list of requests.

This object should have the same structure as ImportProductSetsInputConfig

See also

google.cloud.vision.v1p3beta1.ImportProductSetsRequest definition in proto format

ImportProductSetsResponse

static

Response message for the ImportProductSets method.

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

Properties

Parameter

referenceImages

Array of Object

The list of reference_images that are imported successfully.

This object should have the same structure as ReferenceImage

statuses

Array of Object

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.

This object should have the same structure as Status

See also

google.cloud.vision.v1p3beta1.ImportProductSetsResponse definition in proto format

InputConfig

static

The desired input location and metadata.

Properties

Parameter

gcsSource

Object

The Google Cloud Storage location to read the input from.

This object should have the same structure as GcsSource

mimeType

string

The type of the file. Currently only "application/pdf" and "image/tiff" are supported. Wildcards are not supported.

See also

google.cloud.vision.v1p3beta1.InputConfig definition in proto format

KeyValue

static

A product label represented as a key-value pair.

Properties

Parameter

key

string

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

value

string

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

See also

google.cloud.vision.v1p3beta1.Product.KeyValue definition in proto format

Landmark

static

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

Properties

Parameter

type

number

Face landmark type.

The number should be among the values of Type

position

Object

Face landmark position.

This object should have the same structure as Position

See also

google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark definition in proto format

LatLongRect

static

Rectangle determined by min and max LatLng pairs.

Properties

Parameter

minLatLng

Object

Min lat/long pair.

This object should have the same structure as LatLng

maxLatLng

Object

Max lat/long pair.

This object should have the same structure as LatLng

See also

google.cloud.vision.v1p3beta1.LatLongRect definition in proto format

ListProductSetsRequest

static

Request message for the ListProductSets method.

Properties

Parameter

parent

string

The project from which ProductSets should be listed.

Format is projects/PROJECT_ID/locations/LOC_ID.

pageSize

number

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

pageToken

string

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

See also

google.cloud.vision.v1p3beta1.ListProductSetsRequest definition in proto format

ListProductSetsResponse

static

Response message for the ListProductSets method.

Properties

Parameter

productSets

Array of Object

List of ProductSets.

This object should have the same structure as ProductSet

nextPageToken

string

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

See also

google.cloud.vision.v1p3beta1.ListProductSetsResponse definition in proto format

ListProductsInProductSetRequest

static

Request message for the ListProductsInProductSet method.

Properties

Parameter

name

string

The ProductSet resource for which to retrieve Products.

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

pageSize

number

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

pageToken

string

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

See also

google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest definition in proto format

ListProductsInProductSetResponse

static

Response message for the ListProductsInProductSet method.

Properties

Parameter

products

Array of Object

The list of Products.

This object should have the same structure as Product

nextPageToken

string

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

See also

google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse definition in proto format

ListProductsRequest

static

Request message for the ListProducts method.

Properties

Parameter

parent

string

The project OR ProductSet from which Products should be listed.

Format: projects/PROJECT_ID/locations/LOC_ID

pageSize

number

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

pageToken

string

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

See also

google.cloud.vision.v1p3beta1.ListProductsRequest definition in proto format

ListProductsResponse

static

Response message for the ListProducts method.

Properties

Parameter

products

Array of Object

List of products.

This object should have the same structure as Product

nextPageToken

string

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

See also

google.cloud.vision.v1p3beta1.ListProductsResponse definition in proto format

ListReferenceImagesRequest

static

Request message for the ListReferenceImages method.

Properties

Parameter

parent

string

Resource name of the product containing the reference images.

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

pageSize

number

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

pageToken

string

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.

See also

google.cloud.vision.v1p3beta1.ListReferenceImagesRequest definition in proto format

ListReferenceImagesResponse

static

Response message for the ListReferenceImages method.

Properties

Parameter

referenceImages

Array of Object

The list of reference images.

This object should have the same structure as ReferenceImage

pageSize

number

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

nextPageToken

string

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

See also

google.cloud.vision.v1p3beta1.ListReferenceImagesResponse definition in proto format

LocalizedObjectAnnotation

static

Set of detected objects with bounding boxes.

Properties

Parameter

mid

string

Object ID that should align with EntityAnnotation mid.

languageCode

string

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

name

string

Object name, expressed in its language_code language.

score

number

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

boundingPoly

Object

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

This object should have the same structure as BoundingPoly

See also

google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation definition in proto format

LocationInfo

static

Detected entity location information.

Property

Parameter

latLng

Object

lat/long location coordinates.

This object should have the same structure as LatLng

See also

google.cloud.vision.v1p3beta1.LocationInfo definition in proto format

NormalizedBoundingPoly

static

A normalized bounding polygon around a portion of an image.

Property

Parameter

vertices

Array of Object

Normalized vertices of the bounding polygon.

This object should have the same structure as NormalizedVertex

See also

google.cloud.vision.v1p3beta1.NormalizedBoundingPoly definition in proto format

NormalizedVertex

static

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.

Properties

Parameter

x

number

X coordinate.

y

number

Y coordinate.

See also

google.cloud.vision.v1p3beta1.NormalizedVertex definition in proto format

OperationMetadata

static

Contains metadata for the BatchAnnotateImages operation.

Properties

Parameter

state

number

Current state of the batch operation.

The number should be among the values of State

createTime

Object

The time when the batch request was received.

This object should have the same structure as Timestamp

updateTime

Object

The time when the operation result was last updated.

This object should have the same structure as Timestamp

See also

google.cloud.vision.v1p3beta1.OperationMetadata definition in proto format

OutputConfig

static

The desired output location and metadata.

Properties

Parameter

gcsDestination

Object

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

This object should have the same structure as GcsDestination

batchSize

number

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.

See also

google.cloud.vision.v1p3beta1.OutputConfig definition in proto format

Page

static

Detected page from OCR.

Properties

Parameter

property

Object

Additional information detected on the page.

This object should have the same structure as TextProperty

width

number

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

height

number

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

blocks

Array of Object

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

This object should have the same structure as Block

confidence

number

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

See also

google.cloud.vision.v1p3beta1.Page definition in proto format

Paragraph

static

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

Properties

Parameter

property

Object

Additional information detected for the paragraph.

This object should have the same structure as TextProperty

boundingBox

Object

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 vertice order will still be (0, 1, 2, 3).

This object should have the same structure as BoundingPoly

words

Array of Object

List of words in this paragraph.

This object should have the same structure as Word

confidence

number

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

See also

google.cloud.vision.v1p3beta1.Paragraph definition in proto format

Position

static

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.

Properties

Parameter

x

number

X coordinate.

y

number

Y coordinate.

z

number

Z coordinate (or depth).

See also

google.cloud.vision.v1p3beta1.Position definition in proto format

Product

static

A Product contains ReferenceImages.

Properties

Parameter

name

string

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.

displayName

string

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

description

string

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

productCategory

string

The category for the product identified by the reference image. This should be either "homegoods" or "apparel".

This field is immutable.

productLabels

Array of Object

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 100 product_labels.

This object should have the same structure as KeyValue

See also

google.cloud.vision.v1p3beta1.Product definition in proto format

ProductInfo

static

Information about a product.

Properties

Parameter

productId

string

Product ID.

imageUri

string

The URI of the image which matched the query image.

This field is returned only if view is set to FULL in the request.

score

number

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

This field is returned only if view is set to FULL in the request.

See also

google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo definition in proto format

ProductSearchParams

static

Parameters for a product search request.

Properties

Parameter

catalogName

string

The resource name of the catalog to search.

Format is: productSearch/catalogs/CATALOG_NAME.

category

number

The category to search in. Optional. It is inferred by the system if it is not specified. [Deprecated] Use product_category.

The number should be among the values of ProductSearchCategory

productCategory

string

The product category to search in. Optional. It is inferred by the system if it is not specified. Supported values are bag, shoe, sunglasses, dress, outerwear, skirt, top, shorts, and pants.

normalizedBoundingPoly

Object

The bounding polygon around the area of interest in the image. Optional. If it is not specified, system discretion will be applied. [Deprecated] Use bounding_poly.

This object should have the same structure as NormalizedBoundingPoly

boundingPoly

Object

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

This object should have the same structure as BoundingPoly

view

number

Specifies the verbosity of the product search results. Optional. Defaults to BASIC.

The number should be among the values of ProductSearchResultsView

productSet

string

The resource name of a ProductSet to be searched for similar images.

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

productCategories

Array of string

The list of product categories to search in. Currently, we only consider the first category, and either "homegoods" or "apparel" should be specified.

filter

string

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.

For example, "(color = red OR color = blue) AND brand = Google" is acceptable, but not "(color = red OR brand = Google)" or "color: red".

See also

google.cloud.vision.v1p3beta1.ProductSearchParams definition in proto format

ProductSearchResults

static

Results for a product search request.

Properties

Parameter

category

number

Product category. [Deprecated] Use product_category.

The number should be among the values of ProductSearchCategory

productCategory

string

Product category. Supported values are bag and shoe. [Deprecated] product_category is provided in each Product.

indexTime

Object

Timestamp of the index which provided these results. Changes made after this time are not reflected in the current results.

This object should have the same structure as Timestamp

products

Array of Object

List of detected products.

This object should have the same structure as ProductInfo

results

Array of Object

List of results, one for each product match.

This object should have the same structure as Result

See also

google.cloud.vision.v1p3beta1.ProductSearchResults definition in proto format

ProductSet

static

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

Properties

Parameter

name

string

The resource name of the ProductSet.

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

This field is ignored when creating a ProductSet.

displayName

string

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

indexTime

Object

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 field is 0.

This field is ignored when creating a ProductSet.

This object should have the same structure as Timestamp

indexError

Object

Output only. If there was an error with indexing the product set, the field is populated.

This field is ignored when creating a ProductSet.

This object should have the same structure as Status

See also

google.cloud.vision.v1p3beta1.ProductSet definition in proto format

Property

static

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

Properties

Parameter

name

string

Name of the property.

value

string

Value of the property.

uint64Value

number

Value of numeric properties.

See also

google.cloud.vision.v1p3beta1.Property definition in proto format

ReferenceImage

static

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

Properties

Parameter

name

string

The resource name of the reference image.

Format is:

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

This field is ignored when creating a reference image.

uri

string

The Google Cloud Storage URI of the reference image.

The URI must start with gs://.

Required.

boundingPolys

Array of Object

Bounding polygons around the areas of interest in the reference image. Optional. 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).

This object should have the same structure as BoundingPoly

See also

google.cloud.vision.v1p3beta1.ReferenceImage definition in proto format

RemoveProductFromProductSetRequest

static

Request message for the RemoveProductFromProductSet method.

Properties

Parameter

name

string

The resource name for the ProductSet to modify.

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

product

string

The resource name for the Product to be removed from this ProductSet.

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

See also

google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest definition in proto format

Result

static

Information about a product.

Properties

Parameter

product

Object

The Product.

This object should have the same structure as Product

score

number

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

This field is returned only if view is set to FULL in the request.

image

string

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

See also

google.cloud.vision.v1p3beta1.ProductSearchResults.Result definition in proto format

SafeSearchAnnotation

static

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

Properties

Parameter

adult

number

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

The number should be among the values of Likelihood

spoof

number

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

The number should be among the values of Likelihood

medical

number

Likelihood that this is a medical image.

The number should be among the values of Likelihood

violence

number

Likelihood that this image contains violent content.

The number should be among the values of Likelihood

racy

number

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.

The number should be among the values of Likelihood

See also

google.cloud.vision.v1p3beta1.SafeSearchAnnotation definition in proto format

Symbol

static

A single symbol representation.

Properties

Parameter

property

Object

Additional information detected for the symbol.

This object should have the same structure as TextProperty

boundingBox

Object

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 vertice order will still be (0, 1, 2, 3).

This object should have the same structure as BoundingPoly

text

string

The actual UTF-8 representation of the symbol.

confidence

number

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

See also

google.cloud.vision.v1p3beta1.Symbol definition in proto format

TextAnnotation

static

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.

Properties

Parameter

pages

Array of Object

List of pages detected by OCR.

This object should have the same structure as Page

text

string

UTF-8 text detected on the pages.

See also

google.cloud.vision.v1p3beta1.TextAnnotation definition in proto format

TextProperty

static

Additional information detected on the structural component.

Properties

Parameter

detectedLanguages

Array of Object

A list of detected languages together with confidence.

This object should have the same structure as DetectedLanguage

detectedBreak

Object

Detected start or end of a text segment.

This object should have the same structure as DetectedBreak

See also

google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty definition in proto format

UpdateProductRequest

static

Request message for the UpdateProduct method.

Properties

Parameter

product

Object

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

This object should have the same structure as Product

updateMask

Object

The 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.

This object should have the same structure as FieldMask

See also

google.cloud.vision.v1p3beta1.UpdateProductRequest definition in proto format

UpdateProductSetRequest

static

Request message for the UpdateProductSet method.

Properties

Parameter

productSet

Object

The ProductSet resource which replaces the one on the server.

This object should have the same structure as ProductSet

updateMask

Object

The 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.

This object should have the same structure as FieldMask

See also

google.cloud.vision.v1p3beta1.UpdateProductSetRequest definition in proto format

Vertex

static

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

Properties

Parameter

x

number

X coordinate.

y

number

Y coordinate.

See also

google.cloud.vision.v1p3beta1.Vertex definition in proto format

WebDetection

static

Relevant information for the image from the Internet.

Properties

Parameter

webEntities

Array of Object

Deduced entities from similar images on the Internet.

This object should have the same structure as WebEntity

fullMatchingImages

Array of Object

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

This object should have the same structure as WebImage

partialMatchingImages

Array of Object

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.

This object should have the same structure as WebImage

pagesWithMatchingImages

Array of Object

Web pages containing the matching images from the Internet.

This object should have the same structure as WebPage

visuallySimilarImages

Array of Object

The visually similar image results.

This object should have the same structure as WebImage

bestGuessLabels

Array of Object

Best guess text labels for the request image.

This object should have the same structure as WebLabel

See also

google.cloud.vision.v1p3beta1.WebDetection definition in proto format

WebDetectionParams

static

Parameters for web detection request.

Property

Parameter

includeGeoResults

boolean

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

See also

google.cloud.vision.v1p3beta1.WebDetectionParams definition in proto format

WebEntity

static

Entity deduced from similar images on the Internet.

Properties

Parameter

entityId

string

Opaque entity ID.

score

number

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

description

string

Canonical description of the entity, in English.

See also

google.cloud.vision.v1p3beta1.WebDetection.WebEntity definition in proto format

WebImage

static

Metadata for online images.

Properties

Parameter

url

string

The result image URL.

score

number

(Deprecated) Overall relevancy score for the image.

See also

google.cloud.vision.v1p3beta1.WebDetection.WebImage definition in proto format

WebLabel

static

Label to provide extra metadata for the web detection.

Properties

Parameter

label

string

Label for extra metadata.

languageCode

string

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

See also

google.cloud.vision.v1p3beta1.WebDetection.WebLabel definition in proto format

WebPage

static

Metadata for web pages.

Properties

Parameter

url

string

The result web page URL.

score

number

(Deprecated) Overall relevancy score for the web page.

pageTitle

string

Title for the web page, may contain HTML markups.

fullMatchingImages

Array of Object

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

This object should have the same structure as WebImage

partialMatchingImages

Array of Object

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.

This object should have the same structure as WebImage

See also

google.cloud.vision.v1p3beta1.WebDetection.WebPage definition in proto format

Word

static

A word representation.

Properties

Parameter

property

Object

Additional information detected for the word.

This object should have the same structure as TextProperty

boundingBox

Object

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 vertice order will still be (0, 1, 2, 3).

This object should have the same structure as BoundingPoly

symbols

Array of Object

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

This object should have the same structure as Symbol

confidence

number

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

See also

google.cloud.vision.v1p3beta1.Word definition in proto format