shubham-goel / ucmr

Code for the ECCV2020 paper "Shape and Viewpoint without Keypoints".
https://shubham-goel.github.io/ucmr/
148 stars 11 forks source link

Weak-perspective camera projection #3

Closed stalkerrush closed 3 years ago

stalkerrush commented 3 years ago

Hi @shubham-goel , congrats on your great work! I noticed that you used weak-prospective camera projection in the paper, but I am a bit confused about it. Can you elaborate a little more on this? For example, does it mean that you use the average depth of every triangular mesh to generate masks and textured images instead of the way in softrasterizer? Thank you!

shubham-goel commented 3 years ago

Hi @stalkerrush, thank you for your interest in our work!

Similar to CMR, the cameras have a fixed z-distance from the meshes which are almost zero-centered. You may be interested in looking at our SoftRas wrapper for clarity.

Closing this issue for now, please reopen if this doesn't answer your query.

stalkerrush commented 3 years ago

Thanks for the answer. I looked into this, if my understanding is correct, the only difference being a weak perspective camera from perspective cameras is that the intrinsic matrix is replaced with a scalar scale factor for x,y in camera frame (z is ignored). This scale factor is specific to every image. Is this correct?

shubham-goel commented 3 years ago

Yes that's right! Another way to think about it, is that a weak perspective camera is essentially an orthographic camera (that projects [xyz] -> [xy]) but with an additional scale factor.

stalkerrush commented 3 years ago

I see thanks! But in such a way, how can you learn the scale factor and the real scale of the object separately? Given the fact that they are all dependent on the input, I would assume it's impossible to factor them out.

shubham-goel commented 3 years ago

Correct, the real-world scale of the object is impossible to find. Our goal is to reconstruct the object up-to a scale ambiguity s.t. it projects onto the image correctly.