creiser / kilonerf

Code for KiloNeRF: Speeding up Neural Radiance Fields with Thousands of Tiny MLPs
471 stars 52 forks source link

How to decide resolution for tiny MLPs in each scene #20

Closed santolina closed 2 years ago

santolina commented 2 years ago

Thanks a lot for your great work!

I noticed the resolution (fixed_resolution) for tiny MLPs defined in cfgs/paper/distill/$SEQ.yaml is not the same across scenes: for lego, [9,16,10], for hotdog: [16,16, 6].

So, I wonder how did you determine the resolution for each scene.

Here are my naive approaches: a. just optimize for each scene using grid search b. define the size for a voxel in each scene, then derive the resolution based on global_{max, min} and voxel size

I would appreciate if you have any suggestions.

creiser commented 2 years ago

From our paper: For each scene, we choose the network grid resolution such that the largest dimension equals 16 and the other dimensions are chosen such that the resulting cells are cubic, hence the maximally possible resolution is 16 × 16 × 16 = 4096.

For instance, if you have a scene of dimensions 2. x 4. x 1., then you would get a resolution of 8 x 16 x 4. However, I think now that there are more elegant ways to determine the resolution. It's probably best to define a fixed number of networks, e.g. 8192, so you have a predictable storage impact. Given this network count and the bounding box, you can then calculate a resolution such that the resulting cells are cubic.

santolina commented 2 years ago

Thanks a lot for your reply. It makes me clearly understand. And, the latter solution is helpful to me.