Skip to content

Vision: Single feature functions generated by cloud vision client library does not support parameter max_results #4272

Closed
@michaelawyu

Description

@michaelawyu

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

Metadata

Metadata

Assignees

Labels

api: visionIssues related to the Cloud Vision API.status: blockedResolving the issue is dependent on other work.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions