Pytorch3d: Optimize Object Pose with a PhongShader instead of SilhouetteShader

Created on 7 Feb 2020  路  4Comments  路  Source: facebookresearch/pytorch3d

I'm trying to optimize a mesh pose using a target image and the rendered. Because I'm working in synthetic domain I thought that I could use PhongShader instead of Silouette proxy.

However, right in first iteration weights explode. Is there a simple justification for this? Or maybe I'm doing something wrong?

enhancement question

All 4 comments

Can you post a bit of code that reproduces the problem? That will make it easier for us to help.

@filipetrocadoferreira I can take a look at this and get back to you. You may need to increase the faces_per_pixel for the PhongShader.

I was having a hard time spliting the code to show here
So, I tried camera pose optimization tutorial and changed the SilhouetteShader with a Phong, and it worked.

In my problem, I estimate Rotation (R) from a neural network but after the first backpropagation, all values go to nan, despite loss being finite.

EDIT: Conclusion: The problem is not the shader, it has to be something else. You can close this. Thanks for the attention.

@filipetrocadoferreira ok great!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cihanongun picture cihanongun  路  3Comments

ldepn picture ldepn  路  3Comments

MarkTension picture MarkTension  路  3Comments

eliemichel picture eliemichel  路  3Comments

TSKongLingwei picture TSKongLingwei  路  3Comments