microsoft / MeshTransformer

Research code for CVPR 2021 paper "End-to-End Human Pose and Mesh Reconstruction with Transformers"
https://arxiv.org/abs/2012.09760
MIT License
607 stars 95 forks source link

How to set focal length of demo codes #34

Open hongsukchoi opened 3 years ago

hongsukchoi commented 3 years ago

Hi, thanks for the excellent work.

I want to ask about how you set the focal length of a mesh renderer. In the demo codes, you set it to 1000 and it works well on the sample FreiHAND images. However, when I test on other images, I have to set the focal length to 5000 for good projection. Is there any math or reason behind setting the focal length? Thanks.

And by the way, the model does not perform bad on left hands as you've written in the demo README. You can flip the input image of a left hand and assume it as a right hand. 스크린샷 2021-09-05 22 24 57

kevinlin311tw commented 3 years ago

We empirically set focal length to 1000, following GraphCMR implementation. I wonder if you could provide an example that requires focal length=5000 for a good projection? I would like to check this issue. Thanks.

Thanks a lot for your brilliant solution! I didn't think of flipping the image 🤣

hongsukchoi commented 2 years ago

This image required me focal length to be 5000. height: 720, width: 1040 If you want, I can send you the source video.

스크린샷 2021-09-09 22 33 32
canghaiyunfan commented 2 years ago

@hongsukchoi How to render on the original image? I try to do it by affine transform, but failed.

hongsukchoi commented 2 years ago

You can do it by adjusting the intrinsic params of the virtual camera you are using to project.

https://github.com/hongsukchoi/3DCrowdNet_RELEASE/blob/3d84d17797e353aaf49acfd8087637eca2877292/demo/demo.py#L205