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

Question about center & scale #8

Open
girafffeee opened this issue Mar 23, 2017 · 1 comment
Open

Question about center & scale #8

girafffeee opened this issue Mar 23, 2017 · 1 comment

Comments

@girafffeee
Copy link

HI:
in your code:
inputImg = crop(img, center, scale, rot, res)
how should i set the value of "center" and "scale" if i know the bounding box of a single person in img?
thx~

@anewell
Copy link
Collaborator

anewell commented Mar 24, 2017

My recommendation is to set "center" to the center of the bounding box (straightforward enough), and then for "scale" you need to play around a bit. Use the max dimension of the box (either height or width) and divide by a constant factor. I can't say off the top of my head what a good value would be, but play around with the code. You can call crop and display the resulting image. Ideally a standing person should be centered and take up about 70-80% of the image height.

The main issue with boxes is that it is hard to tell if the figure is truncated, and you might see some bad performance for figures where only the upper half of the body is visible. In this case, maybe try adapting the center and scale based off of the aspect ratio of the box. Ultimately, one of the limits of training to rely specifically on these center and scale terms is that it is hard to directly generalize to bounding boxes, but I think you should still be able to produce reasonable predictions.

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