Closed
Description
As specified in the gRPC reference, AnnotateImageRequest message have three fields, image, features[] and image_context, in which the features[] field determines what feature user is request (type) and max number of returned results (max_results). The code for generating single-feature functions (for example, face_detection()), however, does not allow user to specify max_results:
feature_value = {'type': enum.__dict__[feature]}
def inner(self, image, options=None, **kwargs):
request = dict(
image=image,
features=[feature_value],
**kwargs
)
return self.annotate_image(request, options=options)
Reported in GoogleCloudPlatform/python-docs-samples#1173