chenyilun95 / tf-cpn

Cascaded Pyramid Network for Multi-Person Pose Estimation (CVPR 2018)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why making the boarder for image in image process?

lilhope opened this issue · comments

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.

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

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

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)