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

Update NGP related models with nerfacc 0.5.2 #1809

Merged
merged 20 commits into from
Apr 25, 2023
Merged

Conversation

liruilong940607
Copy link
Contributor

@liruilong940607 liruilong940607 commented Apr 24, 2023

This PR separates nerfacc update from the PR #1705. It bumps the nerfacc dependence to its latest version (0.5.2), and updates NGP related models (instant-ngp, instant-ngp-bounded, nerfplayer-ngp) with the latest nerfacc.

Note on the master branch, for some reason the non-gradient skipping is disabled with nerfacc. This PR re-enables that with the latest nerfacc.

After this PR, we can update the docs for the ngp-based methods, such as #1774.

@liruilong940607
Copy link
Contributor Author

instant-ngp-bounded model is tested on nerf-synthetic lego:

CUDA_VISIBLE_DEVICES=3 ns-train instant-ngp-bounded --data ./data/nerf_synthetic/lego/transforms_train.json --vis wandb --max-num-iterations 10000

Screen Shot 2023-04-24 at 4 18 59 PM

Screen Shot 2023-04-24 at 4 18 31 PM

Screen Shot 2023-04-24 at 4 18 03 PM

Screen Shot 2023-04-24 at 4 17 43 PM

@liruilong940607
Copy link
Contributor Author

instant-ngp is tested with the poster scene:

CUDA_VISIBLE_DEVICES=3 ns-train instant-ngp --data data/nerfstudio/poster --vis wandb --max-num-iterations 10000

Screen Shot 2023-04-24 at 4 35 20 PM

Screen Shot 2023-04-24 at 4 35 41 PM

Screen Shot 2023-04-24 at 4 36 05 PM

Screen Shot 2023-04-24 at 4 35 54 PM

@liruilong940607
Copy link
Contributor Author

nerfplayer-ngp is tested with dycheck's sequence mochi-high-five:

CUDA_VISIBLE_DEVICES=3 ns-train nerfplayer-ngp --vis wandb --max-num-iterations 10000 --data ./data/mochi-high-five/

Screen Shot 2023-04-24 at 4 38 03 PM

Screen Shot 2023-04-24 at 4 38 15 PM

Screen Shot 2023-04-24 at 4 38 43 PM

Screen Shot 2023-04-24 at 4 38 33 PM

Screen Shot 2023-04-24 at 4 38 26 PM

@liruilong940607 liruilong940607 requested a review from tancik April 24, 2023 23:42
Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for updating. The results look promising!

@liruilong940607
Copy link
Contributor Author

In summary:

  • for instant-ngp-bounded the metrics match with the original one with ~3x faster training.
  • for instant-ngp the master version somehow fails to converge. I'm not sure why but now it's good.
  • for nerfplayer-ngp the metrics are consistently better, with 1.5x training time. But considering num_rays_per_batch is 3x than before, the 1.5x training time is reasonable.

The major difference is that now we re-enable the non-gradient skipping for the occluded regions in the sampling procedure.

@liruilong940607 liruilong940607 merged commit ea2993d into main Apr 25, 2023
@liruilong940607 liruilong940607 deleted the ruilong/nerfacc branch April 25, 2023 00:11
if self.config.disable_scene_contraction:
scene_contraction = None
else:
scene_contraction = SceneContraction(order=float("inf"))
Copy link
Contributor

Choose a reason for hiding this comment

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

@liruilong940607 is scene contraction meant to be used with the new multi-level grid? Should TCNNNerfactoField just not take the expanded aabb as in https://github.com/KAIR-BAIR/nerfacc/blob/master/examples/train_ngp_nerf_occ.py#L130

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The field and multi-level occ grid are completely separated with each other. The new occ grid does not support contraction anymore but the field can still do contraction. I didn't play around with the field to compare it with/without contraction so I just kept it as is.

Plz share if you find anything!

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.

3 participants