NeRF-OSR icon indicating copy to clipboard operation
NeRF-OSR copied to clipboard

What is the env params of testing or validating images?

Open qizipeng opened this issue 2 years ago • 5 comments

Hi! Thanks for sharing your code and I think this is a wonderful work to solve the problems in relighting outdoor scenes by a NeRF framework. I have an issue with the env params consisting of 9*3 variables. I clearly know the network how to process the training images and optimize the env params from default values. However, I find that the network also takes the default values ​​as testing env params and do not optimize them. if i dont misunderstand. Is this reasonable? How do u get the default values?

Looking forward to your answer, Thanks again!

qizipeng avatar Nov 25 '22 12:11 qizipeng

Hi. Thank you for the kind words!

You can change environments used for testing with --test_env argument (implemented here). There you can either provide a folder with per-view SH environments or a path to a single SH environment written in a .txt. Even if you provide a single SH environment, you can still rotate it around the building by using --rotate_test_env argument in addition to --test_env.

Default value for the environment is taken from one of the runs of the method on our data. When we used completely random inialisation values, the model often diverged. Using these coefficients instead resulted in more consistent and better training results on the tested scenes. Coincidentally, they are also used for rendering views where no other envmap is found, which are validation and test views (when --test_env argument is not provided).

To use an external LDR/HDR envmap, you would first need to convert it to SH coefficients. The conversion will just fit the closest SH coefficients with least squares. The script for that is not yet in the repo, but I'll upload it soon, as well as the instructions on how to reproduce our numerical results from the paper. The latter involves using external environment maps and this SH conversion step too, so it should be helpful.

r00tman avatar Nov 28 '22 16:11 r00tman

Thank you for your patience in answering! Good luck with your work

qizipeng avatar Dec 10 '22 10:12 qizipeng

Hello, did you find where is the envmap located?

yangbaoquan avatar Apr 10 '23 13:04 yangbaoquan

Can this code train a set of env parameters about the dataset

zerolfq avatar Sep 08 '23 14:09 zerolfq

Hi. Thank you for the kind words!

You can change environments used for testing with --test_env argument (implemented here). There you can either provide a folder with per-view SH environments or a path to a single SH environment written in a .txt. Even if you provide a single SH environment, you can still rotate it around the building by using --rotate_test_env argument in addition to --test_env.

Default value for the environment is taken from one of the runs of the method on our data. When we used completely random inialisation values, the model often diverged. Using these coefficients instead resulted in more consistent and better training results on the tested scenes. Coincidentally, they are also used for rendering views where no other envmap is found, which are validation and test views (when --test_env argument is not provided).

To use an external LDR/HDR envmap, you would first need to convert it to SH coefficients. The conversion will just fit the closest SH coefficients with least squares. The script for that is not yet in the repo, but I'll upload it soon, as well as the instructions on how to reproduce our numerical results from the paper. The latter involves using external environment maps and this SH conversion step too, so it should be helpful.

@r00tman Thanks for your great work! I can't find script converting LDR/HDR envmap to SH coefficients in your repo. Can you share me this part of code ?

zjulabwjt avatar Nov 28 '23 06:11 zjulabwjt