You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
python face detection: max_results parameter is not used #1173
The max_results parameter is not used, so code detects only 10 faces max:
def detect_face(face_file, max_results=4):
"""Uses the Vision API to detect faces in the given file.
Args:
face_file: A file-like object containing an image with faces.
Returns:
An array of Face objects with information about the picture.
"""
# [START get_vision_service]
client = vision.ImageAnnotatorClient()
# [END get_vision_service]
content = face_file.read()
image = types.Image(content=content)
return client.face_detection(image=image).face_annotations
Activity
theacodes commentedon Oct 25, 2017
@michaelawyu seems like an easy fix, can you take this on?
michaelawyu commentedon Oct 25, 2017
Got it :)
michaelawyu commentedon Oct 27, 2017
Reported to client libraries repo and waiting for a fix now.
Pass max_results through to API - issue #1173
engelke commentedon Dec 7, 2018
See PR #1917 to pass parameter to API.
Pass max_results through to API - issue #1173 (#1917)
chore: move samples from python-docs-sample (#45)
chore: move samples from python-docs-sample (#45)