Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add average_init_density to improve robustness of nerfacto training #2834

Merged
merged 4 commits into from
Jan 28, 2024

Conversation

jb-ye
Copy link
Collaborator

@jb-ye jb-ye commented Jan 27, 2024

This has been my personal recipe for training nerfacto: the basic issue of current nerfacto implementation is the scene is always initialized with an average density at 1.0 (due to the exponential activation of MLP). This is not a robust choice in general especially when scene depth is much higher than 1.0.

One famous example is the mipnerf360 stump dataset, when training with the recommended setting before this PR

ns-train nerfacto --data stump \
  --pipeline.model.appearance_embed_dim 1 \
  --pipeline.model.camera_optimizer.mode off

The PSNR on eval set is only 18. With this PR, one can choose to train with a multiplier on top of density output. My personal experience is to set it 0.01 so the scene is very transparent initially.

ns-train nerfacto --data stump \
  --pipeline.model.appearance_embed_dim 1 \
  --pipeline.model.camera_optimizer.mode off \
  --pipeline.model.average_init_density 0.01

The PSNR on eval set will be improved from 18 to 25.3. Similar improvement can also be observed in some of nerfstudio dataset.

At last, this feature would not produce more quality in the final render, but will avoid some bad optimization outcomes due to improper initialization.

@jb-ye jb-ye force-pushed the main branch 2 times, most recently from 12173d9 to 57d0e14 Compare January 27, 2024 19:43
Copy link
Collaborator

@kerrj kerrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm!

@kerrj kerrj merged commit d8b517d into nerfstudio-project:main Jan 28, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants