Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Recognition - Find the largest face #6

Open
wrussell1999 opened this issue Aug 25, 2021 · 1 comment
Open

Image Recognition - Find the largest face #6

wrussell1999 opened this issue Aug 25, 2021 · 1 comment

Comments

@wrussell1999
Copy link
Member

To prevent dodgy crops, pick the largest face in the array and use that. Using the Google Cloud Vision API

@wei
Copy link
Member

wei commented Apr 19, 2022

This snippet below is currently always picking the last face in the faces array:

for face in faces:
box = [(vertex.x, vertex.y) for vertex in face.bounding_poly.vertices]

We should add a conditional here to only set the box variable if the new face width/height is larger than the one stored in box. or just do a sort by width/height and take the largest one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants