Vision Annotations#

Annotations management for Vision API responses.

class, faces=(), full_texts=(), properties=(), labels=(), landmarks=(), logos=(), safe_searches=(), texts=(), web=())[source]#

Bases: object

Helper class to bundle annotation responses.

classmethod from_api_repr(response)[source]#

Factory: construct an instance of Annotations from a response.

Parameters:response (dict) – Vision API response object.
Return type:Annotations
Returns:An instance of Annotations with detection types loaded.
classmethod from_pb(response)[source]#

Factory: construct an instance of Annotations from protobuf.

Parameters:response (AnnotateImageResponse) – AnnotateImageResponse from protobuf call.
Return type:Annotations
Returns:Annotations instance populated from gRPC response.