GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python face detection: max_results parameter is not used · Issue #1173 · GoogleCloudPlatform/python-docs-samples

python face detection: max_results parameter is not used #1173

New issue
Copy link
New issue
Copy link
Closed
Closed
python face detection: max_results parameter is not used#1173
Copy link
Assignees
michaelawyu
Labels
FixitML

Description

@karolmajek
karolmajek
opened on Oct 25, 2017
Issue body actions

In which file did you encounter the issue?

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/vision/cloud-client/face_detection/faces.py

Did you change the file? If so, how?

no

Describe the issue

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

  1. theacodes
    assigned
    michaelawyu
    on Oct 25, 2017
  2. theacodes commented on Oct 25, 2017

    @theacodes
    theacodes
    on Oct 25, 2017
    Contributor
    More actions

    @michaelawyu seems like an easy fix, can you take this on?

  3. michaelawyu commented on Oct 25, 2017

    @michaelawyu
    michaelawyu
    on Oct 25, 2017
    Contributor
    More actions

    Got it :)

  4. michaelawyu commented on Oct 27, 2017

    @michaelawyu
    michaelawyu
    on Oct 27, 2017
    Contributor
    More actions

    Reported to client libraries repo and waiting for a fix now.

  5. nnegrey
    added
    ML
    on Nov 29, 2018
  6. engelke
    added
    Fixit
    on Dec 7, 2018
  7. engelke
    added a commit that references this issue on Dec 7, 2018

    Pass max_results through to API - issue #1173

    eb35c20
  8. engelke commented on Dec 7, 2018

    @engelke
    engelke
    on Dec 7, 2018
    Contributor
    More actions

    See PR #1917 to pass parameter to API.

  9. engelke
    closed this as completedon Dec 7, 2018
  10. engelke
    added a commit that references this issue on Dec 7, 2018

    Pass max_results through to API - issue #1173 (#1917)

    cc820e6
  11. arbrown
    added a commit that references this issue on Nov 14, 2022

    chore: move samples from python-docs-sample (#45)

    9f24bc2
  12. dandhlee
    added a commit that references this issue on Nov 15, 2022

    chore: move samples from python-docs-sample (#45)

    00c2a5f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @michaelawyu
    michaelawyu

Labels

FixitML

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.