kakaobrain / nerf-factory

An awesome PyTorch NeRF library
https://kakaobrain.github.io/NeRF-Factory
Apache License 2.0
1.27k stars 107 forks source link

`self.curr_step` never increases in `LitPlenoxel` #15

Closed Wuziyi616 closed 1 year ago

Wuziyi616 commented 1 year ago

Hi, thanks for releasing this great work! I think there is an error in the implementation of LitPlenoxel. You define self.curr_step here and use it to determine lr decay, voxel upsampling, etc. However, it seems that you never increase this value? I add a print(gstep) after this line, and it always prints 0.

Wuziyi616 commented 1 year ago

ok so I double-check the code, this line is the only place affected by this bug, because you're reading the correct step value here. All the others (lr, resolution, which are after this correct line) are not affected.

After I change the previous line to the correct one, the performance on my custom data improves a lot (I think this is because I'm using lr_fg_begin_step>0). As shown below, the orange curve is after correcting that line. image

Wuziyi616 commented 1 year ago

There is also another places affected by this, since curr_step is always 0, the ResampleCallBack condition here will never be True, so it will never upsample the Plenoxel voxel grids

Wuziyi616 commented 1 year ago

I also have another question: the input args near_clip here doesn't seem to be used anywhere? I assume it should be put in RenderOption here. Also background_brightness doesn't seem to be used as well...

jeongyw12382 commented 1 year ago

Sorry for being late. This issue is often found when using a different pytorch_lightning version. Could you share your environment version?

jeongyw12382 commented 1 year ago

In the case of the last comment, we'll double check it and change the config if some arguments are not used.

jeongyw12382 commented 1 year ago

Feel free to reopen the issue if you suffer from any problems regarding this issue.