Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Max results in batched vision.ImageAnnotatorClient

Hi, 

I am trying to set maxResults in batched vision.ImageAnnotatorClient as follows but such a parameter is not recognized. 

 

 

contents = loadImages(img_chunk)
        client = vision.ImageAnnotatorClient()
        requests = []
        for content in contents:
            image = {"content": content}
            features = [
                {
                    "type_": vision.Feature.Type.LABEL_DETECTION,
                    "maxResults": 50
                },
            ]
            requests.append({"image": image, "features": features})

        response = client.batch_annotate_images(requests=requests,)

 

What am I doing wrong?

 

 

Solved Solved
0 2 251
1 ACCEPTED SOLUTION

try `max_results` instead


@magenti wrote:

maxResults


 

 

View solution in original post

2 REPLIES 2

try `max_results` instead


@magenti wrote:

maxResults


 

 

Yep, it worked fine. Thank you!