Vision Feature#

Feature#

Feature represenging various types of annotating.

class google.cloud.vision.feature.Feature(feature_type, max_results=1)[source]#

Bases: object

Feature object specifying the annotation type and maximum results.

Parameters:
  • feature_type (str) – String representation of google.cloud.vision.feature.FeatureType.
  • max_results (int) – Number of results to return for the specified feature type.

See: https://cloud.google.com/vision/reference/rest/v1/images/annotate#Feature

as_dict()[source]#

Generate dictionary for Feature request format.

feature_type#

“Feature type string.

max_results#

Maximum number of results for feature type.

class google.cloud.vision.feature.FeatureTypes[source]#

Bases: object

Feature Types to indication which annotations to perform.

See: https://cloud.google.com/vision/reference/rest/v1/images/annotate#Type

FACE_DETECTION = 'FACE_DETECTION'#
LABEL_DETECTION = 'LABEL_DETECTION'#
LANDMARK_DETECTION = 'LANDMARK_DETECTION'#
LOGO_DETECTION = 'LOGO_DETECTION'#
SAFE_SEARCH_DETECTION = 'SAFE_SEARCH_DETECTION'#
TEXT_DETECTION = 'TEXT_DETECTION'#