Types for Google Cloud Vision v1p1beta1 API¶
- class google.cloud.vision_v1p1beta1.types.AnnotateImageRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features.
- image¶
The image to be processed.
- features¶
Requested features.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.Feature]
- image_context¶
Additional context that may accompany the image.
- class google.cloud.vision_v1p1beta1.types.AnnotateImageResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response to an image annotation request.
- face_annotations¶
If present, face detection has completed successfully.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.FaceAnnotation]
- landmark_annotations¶
If present, landmark detection has completed successfully.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.EntityAnnotation]
- logo_annotations¶
If present, logo detection has completed successfully.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.EntityAnnotation]
- label_annotations¶
If present, label detection has completed successfully.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.EntityAnnotation]
- text_annotations¶
If present, text (OCR) detection has completed successfully.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.EntityAnnotation]
- 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.
- 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.- Type
google.rpc.status_pb2.Status
- class google.cloud.vision_v1p1beta1.types.BatchAnnotateImagesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Multiple image annotation requests are batched into a single service call.
- requests¶
Required. Individual image annotation requests for this batch.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.AnnotateImageRequest]
- class google.cloud.vision_v1p1beta1.types.BatchAnnotateImagesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response to a batch image annotation request.
- responses¶
Individual responses to image annotation requests within the batch.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.AnnotateImageResponse]
- class google.cloud.vision_v1p1beta1.types.Block(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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 vertice order will still be (0, 1, 2, 3).
- paragraphs¶
List of paragraphs in this block (if this blocks is of type text).
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.Paragraph]
- block_type¶
Detected block type (text, image etc) for this block.
- class BlockType(value)[source]¶
Bases:
proto.enums.Enum
Type of a block (text, image etc) as identified by OCR.
- Values:
- UNKNOWN (0):
Unknown block type.
- TEXT (1):
Regular text block.
- TABLE (2):
Table block.
- PICTURE (3):
Image block.
- RULER (4):
Horizontal/vertical line box.
- BARCODE (5):
Barcode block.
- class google.cloud.vision_v1p1beta1.types.BoundingPoly(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A bounding polygon for the detected image annotation.
- vertices¶
The bounding polygon vertices.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.Vertex]
- class google.cloud.vision_v1p1beta1.types.ColorInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- Type
google.type.color_pb2.Color
- class google.cloud.vision_v1p1beta1.types.CropHint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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, as returned in
ImageParams
.
- class google.cloud.vision_v1p1beta1.types.CropHintsAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Set of crop hints that are used to generate new crops when serving images.
- crop_hints¶
Crop hint results.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.CropHint]
- class google.cloud.vision_v1p1beta1.types.CropHintsParams(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- Type
MutableSequence[float]
- class google.cloud.vision_v1p1beta1.types.DominantColorsAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Set of dominant colors and their corresponding scores.
- colors¶
RGB color values with their score and pixel fraction.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.ColorInfo]
- class google.cloud.vision_v1p1beta1.types.EntityAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Set of detected entity features.
- mid¶
Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.
- Type
- locale¶
The language code for the locale in which the entity textual
description
is expressed.- Type
- confidence¶
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].
- Type
- 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].
- Type
- 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.- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.LocationInfo]
- properties¶
Some entities may have optional user-supplied
Property
(name/value) fields, such a score or string that qualifies the entity.- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.Property]
- class google.cloud.vision_v1p1beta1.types.FaceAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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, 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 theBoundingPoly
(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 theboundingPoly
, 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.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.FaceAnnotation.Landmark]
- 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].
- Type
- 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].
- Type
- 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].
- Type
- 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.
- class Landmark(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A face-specific landmark (for example, a face feature).
- type_¶
Face landmark type.
- position¶
Face landmark position.
- class Type(value)[source]¶
Bases:
proto.enums.Enum
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.- Values:
- UNKNOWN_LANDMARK (0):
Unknown face landmark detected. Should not be filled.
- LEFT_EYE (1):
Left eye.
- RIGHT_EYE (2):
Right eye.
- LEFT_OF_LEFT_EYEBROW (3):
Left of left eyebrow.
- RIGHT_OF_LEFT_EYEBROW (4):
Right of left eyebrow.
- LEFT_OF_RIGHT_EYEBROW (5):
Left of right eyebrow.
- RIGHT_OF_RIGHT_EYEBROW (6):
Right of right eyebrow.
- MIDPOINT_BETWEEN_EYES (7):
Midpoint between eyes.
- NOSE_TIP (8):
Nose tip.
- UPPER_LIP (9):
Upper lip.
- LOWER_LIP (10):
Lower lip.
- MOUTH_LEFT (11):
Mouth left.
- MOUTH_RIGHT (12):
Mouth right.
- MOUTH_CENTER (13):
Mouth center.
- NOSE_BOTTOM_RIGHT (14):
Nose, bottom right.
- NOSE_BOTTOM_LEFT (15):
Nose, bottom left.
- NOSE_BOTTOM_CENTER (16):
Nose, bottom center.
- LEFT_EYE_TOP_BOUNDARY (17):
Left eye, top boundary.
- LEFT_EYE_RIGHT_CORNER (18):
Left eye, right corner.
- LEFT_EYE_BOTTOM_BOUNDARY (19):
Left eye, bottom boundary.
- LEFT_EYE_LEFT_CORNER (20):
Left eye, left corner.
- RIGHT_EYE_TOP_BOUNDARY (21):
Right eye, top boundary.
- RIGHT_EYE_RIGHT_CORNER (22):
Right eye, right corner.
- RIGHT_EYE_BOTTOM_BOUNDARY (23):
Right eye, bottom boundary.
- RIGHT_EYE_LEFT_CORNER (24):
Right eye, left corner.
- LEFT_EYEBROW_UPPER_MIDPOINT (25):
Left eyebrow, upper midpoint.
- RIGHT_EYEBROW_UPPER_MIDPOINT (26):
Right eyebrow, upper midpoint.
- LEFT_EAR_TRAGION (27):
Left ear tragion.
- RIGHT_EAR_TRAGION (28):
Right ear tragion.
- LEFT_EYE_PUPIL (29):
Left eye pupil.
- RIGHT_EYE_PUPIL (30):
Right eye pupil.
- FOREHEAD_GLABELLA (31):
Forehead glabella.
- CHIN_GNATHION (32):
Chin gnathion.
- CHIN_LEFT_GONION (33):
Chin left gonion.
- CHIN_RIGHT_GONION (34):
Chin right gonion.
- class google.cloud.vision_v1p1beta1.types.Feature(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Users describe the type of Google Cloud Vision API tasks to perform over images by using Features. Each Feature indicates a type of image detection task to perform. Features encode the Cloud Vision API vertical to operate on and the number of top-scoring results to return.
- type_¶
The feature type.
- model¶
Model to use for the feature. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.
DOCUMENT_TEXT_DETECTION
andTEXT_DETECTION
also support “builtin/weekly” for the bleeding edge release updated weekly.- Type
- class Type(value)[source]¶
Bases:
proto.enums.Enum
Type of image feature.
- Values:
- TYPE_UNSPECIFIED (0):
Unspecified feature type.
- FACE_DETECTION (1):
Run face detection.
- LANDMARK_DETECTION (2):
Run landmark detection.
- LOGO_DETECTION (3):
Run logo detection.
- LABEL_DETECTION (4):
Run label detection.
- TEXT_DETECTION (5):
Run OCR.
- DOCUMENT_TEXT_DETECTION (11):
Run dense text document OCR. Takes precedence when both DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.
- SAFE_SEARCH_DETECTION (6):
Run computer vision models to compute image safe-search properties.
- IMAGE_PROPERTIES (7):
Compute a set of image properties, such as the image’s dominant colors.
- CROP_HINTS (9):
Run crop hints.
- WEB_DETECTION (10):
Run web detection.
- class google.cloud.vision_v1p1beta1.types.Image(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.- Type
- source¶
Google Cloud Storage image location. If both
content
andsource
are provided for an image,content
takes precedence and is used to perform the image annotation request.
- class google.cloud.vision_v1p1beta1.types.ImageContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Image context and/or feature-specific parameters.
- lat_long_rect¶
lat/long rectangle that specifies the location of the image.
- 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.- Type
MutableSequence[str]
- crop_hints_params¶
Parameters for crop hints annotation request.
- web_detection_params¶
Parameters for web detection.
- text_detection_params¶
Parameters for text detection and document text detection.
- class google.cloud.vision_v1p1beta1.types.ImageProperties(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Stores image properties, such as dominant colors.
- dominant_colors¶
If present, dominant colors completed successfully.
- class google.cloud.vision_v1p1beta1.types.ImageSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
External image source (Google Cloud Storage image location).
- gcs_image_uri¶
NOTE: For new code
image_uri
below is preferred. Google Cloud Storage image URI, which must be in the following form:gs://bucket_name/object_name
(for details, see Google Cloud Storage Request URIs). NOTE: Cloud Storage object versioning is not supported.- Type
- image_uri¶
Image URI which supports:
Google Cloud Storage image URI, which must be in the following form:
gs://bucket_name/object_name
(for details, see Google Cloud Storage Request URIs). NOTE: Cloud Storage object versioning is not supported.Publicly accessible image HTTP/HTTPS URL. This is preferred over the legacy
gcs_image_uri
above. When bothgcs_image_uri
andimage_uri
are specified,image_uri
takes precedence.
- Type
- class google.cloud.vision_v1p1beta1.types.LatLongRect(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Rectangle determined by min and max
LatLng
pairs.- min_lat_lng¶
Min lat/long pair.
- Type
google.type.latlng_pb2.LatLng
- max_lat_lng¶
Max lat/long pair.
- Type
google.type.latlng_pb2.LatLng
- class google.cloud.vision_v1p1beta1.types.Likelihood(value)[source]¶
Bases:
proto.enums.Enum
A bucketized representation of likelihood, which is intended to give clients highly stable results across model upgrades.
- Values:
- UNKNOWN (0):
Unknown likelihood.
- VERY_UNLIKELY (1):
It is very unlikely that the image belongs to the specified vertical.
- UNLIKELY (2):
It is unlikely that the image belongs to the specified vertical.
- POSSIBLE (3):
It is possible that the image belongs to the specified vertical.
- LIKELY (4):
It is likely that the image belongs to the specified vertical.
- VERY_LIKELY (5):
It is very likely that the image belongs to the specified vertical.
- class google.cloud.vision_v1p1beta1.types.LocationInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Detected entity location information.
- lat_lng¶
lat/long location coordinates.
- Type
google.type.latlng_pb2.LatLng
- class google.cloud.vision_v1p1beta1.types.Page(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Detected page from OCR.
- property¶
Additional information detected on the page.
- blocks¶
List of blocks of text, images etc on this page.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.Block]
- class google.cloud.vision_v1p1beta1.types.Paragraph(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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 vertice order will still be (0, 1, 2, 3).
- words¶
List of words in this paragraph.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.Word]
- class google.cloud.vision_v1p1beta1.types.Position(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- class google.cloud.vision_v1p1beta1.types.Property(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A
Property
consists of a user-supplied name/value pair.
- class google.cloud.vision_v1p1beta1.types.SafeSearchAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- class google.cloud.vision_v1p1beta1.types.Symbol(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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 vertice order will still be (0, 1, 2, 3).
- class google.cloud.vision_v1p1beta1.types.TextAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.v1p1beta1.TextAnnotation.TextProperty] message definition below for more detail.
- pages¶
List of pages detected by OCR.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.Page]
- class DetectedBreak(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Detected start or end of a structural component.
- type_¶
Detected break type.
- class BreakType(value)[source]¶
Bases:
proto.enums.Enum
Enum to denote the type of break found. New line, space etc.
- Values:
- UNKNOWN (0):
Unknown break label type.
- SPACE (1):
Regular space.
- SURE_SPACE (2):
Sure space (very wide).
- EOL_SURE_SPACE (3):
Line-wrapping break.
- HYPHEN (4):
End-line hyphen that is not present in text; does not co-occur with
SPACE
,LEADER_SPACE
, orLINE_BREAK
.- LINE_BREAK (5):
Line break that ends a paragraph.
- class DetectedLanguage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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/#Unicode_locale_identifier.
- Type
- class TextProperty(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Additional information detected on the structural component.
- detected_languages¶
A list of detected languages together with confidence.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.TextAnnotation.DetectedLanguage]
- detected_break¶
Detected start or end of a text segment.
- class google.cloud.vision_v1p1beta1.types.TextDetectionParams(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.
- enable_text_detection_confidence_score¶
By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well.
- Type
- class google.cloud.vision_v1p1beta1.types.Vertex(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
- class google.cloud.vision_v1p1beta1.types.WebDetection(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Relevant information for the image from the Internet.
- web_entities¶
Deduced entities from similar images on the Internet.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.WebDetection.WebEntity]
- full_matching_images¶
Fully matching images from the Internet. Can include resized copies of the query image.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.WebDetection.WebImage]
- 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.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.WebDetection.WebImage]
- pages_with_matching_images¶
Web pages containing the matching images from the Internet.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.WebDetection.WebPage]
- visually_similar_images¶
The visually similar image results.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.WebDetection.WebImage]
- best_guess_labels¶
Best guess text labels for the request image.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.WebDetection.WebLabel]
- class WebEntity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Entity deduced from similar images on the Internet.
- score¶
Overall relevancy score for the entity. Not normalized and not comparable across different image queries.
- Type
- class WebImage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for online images.
- class WebLabel(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Label to provide extra metadata for the web detection.
- language_code¶
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.- Type
- class WebPage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for web pages.
- full_matching_images¶
Fully matching images on the page. Can include resized copies of the query image.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.WebDetection.WebImage]
- 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.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.WebDetection.WebImage]
- class google.cloud.vision_v1p1beta1.types.WebDetectionParams(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Parameters for web detection request.
- class google.cloud.vision_v1p1beta1.types.Word(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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 vertice 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.
- Type
MutableSequence[google.cloud.vision_v1p1beta1.types.Symbol]