NVlabs / nvdiffrec

Official code for the CVPR 2022 (oral) paper "Extracting Triangular 3D Models, Materials, and Lighting From Images".
Other
2.09k stars 222 forks source link

Wrong fragments appeared after second pass #107

Closed sun510001 closed 1 year ago

sun510001 commented 1 year ago

Hello, Firstly, thanks for your excellent work. I'm trying nvdiffrec and nvdiffrecmc on my own data.

It works pretty good at first pass: img_dmtet_pass1_000077 img_dmtet_pass1_000042 image image

but lots of wrong fragments are appeared after second pass: img_mesh_pass_000077 img_mesh_pass_000042 image image

This problem occurs with both nvdiffrec and nvdiffrecmc. Lock pos can solve this problem, but I want to use regularizer to make mesh smoother. I have tried laplace_scale 3000 6000 and 10000; laplace: absolute and relative, but wrong fragments still appeared after second pass.

Any input here would be greatly appreciated, thank you!

jmunkberg commented 1 year ago

Thanks @sun510001 !

Increasing the Laplacian regularizer would have been my first tests as well. You can test the "lock_pos" : true option in the config, which disables geometry optimization in the second pass . You can also test decreasing the learning rate in the second pass, like "learning_rate": [0.03, 0.003], or similar.

Also, nvdiffrec(mc) is quite sensitive to inaccuracies in the foreground segmentation masks and poses. Your reconstructed silhouettes look a bit uneven, so if there is a way to provide better masks with your dataset, that could likely help quality a bit here.

sun510001 commented 1 year ago

@jmunkberg Thanks for your reply.

I checked the previously generated meshes and datasets. The datasets with good matting generated fewer fragments in the textures of the mesh.