nerfstudio-project / nerfacc

A General NeRF Acceleration Toolbox in PyTorch.
https://www.nerfacc.com/
Other
1.38k stars 113 forks source link

What is the main difference between 'render_image_with_occgrid' vs 'render_image_with_occgrid_test'? #233

Open umyta opened 1 year ago

umyta commented 1 year ago

Hi, I noticed that a new function 'render_image_with_occgrid_test' is provided in the examples recently. May I ask what is the main difference between the two functions? Is there any problem with using 'render_image_with_occgrid' for evaluation?

liruilong940607 commented 1 year ago

Not a problem at all. We recently update the code from render_image_with_occgrid to render_image_with_occgrid_test for faster rendering (see https://github.com/KAIR-BAIR/nerfacc/pull/217) but it is totally compatible to just use render_image_with_occgrid.

High levelly, the difference is how the for-loop (parallelization) is done in these two functions:

The second one allows for early termination for some rays which brings speedup to the rendering.