Kai-46 / PhySG

Code for PhySG: Inverse Rendering with Spherical Gaussians for Physics-based Relighting and Material Editing
MIT License
221 stars 24 forks source link

IDR rendering module #15

Closed ankarako closed 2 years ago

ankarako commented 2 years ago

Hi and congratulations for your interesting work!

I would like to ask you about the participation of the IDR rendering module in the optimization process. From reading the paper I assumed that material properties (including the diffuse albedo) are estimated by the MaterialEnvmap module you introduce in your paper. However, in your code , you utilize both your module and IDR's rendering module (which both estimate rgb values basically). In addition, color values calculated by both IDR's rendering module and the MaterialEnvmap module participate in the loss calculation.

Do you train both modules (IDR Rendering and MaterialEnvmap) for a specific reason, or just for comparison?

PS: In addition, I can't seem to find if EnvmapMaterial module's weights are initialized. Could you help? Thanks for your time.

Kai-46 commented 2 years ago

The weight for that idr rendering loss is set to zero in the config. Hence it doesn't matter.

ankarako commented 2 years ago

Thanks I didn't notice that :). What about weight initialization for the EnvmapMaterial module

Kai-46 commented 2 years ago

Hi --- the weight initialization for EnvmapMaterial are all inside this script: https://github.com/Kai-46/PhySG/blob/030d590bc007377007c65046c8f70ad149cfb371/code/model/sg_envmap_material.py#L46

ankarako commented 2 years ago

Thanks, I saw that, but I was a little bit curious about the weight initialization of the network's linear layers. I guess you use pytorch's default initialization (which must be xavier if I remember correctly).

Thanks again.