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

why making the boarder for image in image process? #2

Closed
lilhope opened this issue Apr 13, 2018 · 3 comments
Closed

why making the boarder for image in image process? #2

lilhope opened this issue Apr 13, 2018 · 3 comments

Comments

@lilhope
Copy link

lilhope commented Apr 13, 2018

Hi,I'm quite a newer for human pose estimate, and your work helps me a lot. I'm confused that why you make boarder for the image in the image process, like this code:

bimg = cv2.copyMakeBorder(img, add, add, add, add, borderType=cv2.BORDER_CONSTANT,
                              value=cfg.pixel_means.reshape(-1))

It seems to avoid the region with human beyond the image size(e.g. xmin < 0), you pad the image before cropping the region with human. Did I understand it correctly? If so, crop first then pad the cropped image is another choice?
Thanks in advance.

@chenyilun95
Copy link
Owner

Yes, you can crop first and pad. Make sure the image doesn't change its aspect ratio.

@lilhope
Copy link
Author

lilhope commented Apr 14, 2018

Thanks,and did you use the resnet-v1 or resnet-v2 as the model backbone?

@chenyilun95
Copy link
Owner

chenyilun95 commented Apr 14, 2018

Network backbone is based on resnet_v1 in the model zoo of slim. Note that network is modified a bit (lib/nets/basemodel.py) to fit the original feature map size yet with the same initialized weights. (related issue: tensorflow/models#1418)

@lilhope lilhope closed this as completed Apr 19, 2018
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