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

Fix depth-nerfacto edge cases #2939

Merged
merged 7 commits into from
Mar 3, 2024
Merged

Conversation

ethanweber
Copy link
Collaborator

@ethanweber ethanweber commented Feb 21, 2024

Depth nerfacto doesn't work unless num_rays_in_batch is divisible by 2. Also, the depth images are in a list and not just a batch tensor, so I think the changes I made are needed.

@ethanweber ethanweber changed the title Fixes depth-nerfacto Fix depth-nerfacto edge cases Feb 21, 2024

if "mask" in batch:
num_rays_in_batch = num_rays_per_batch // num_images
if num_rays_in_batch % 2 != 0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

this could be moved above if statement and 293-294 deleted right?

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.

other than small fix, lgtm

Copy link
Contributor

@akristoffersen akristoffersen left a comment

Choose a reason for hiding this comment

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

LGTM

@ethanweber ethanweber merged commit 0555132 into main Mar 3, 2024
2 checks passed
@ethanweber ethanweber deleted the ethan/fix_depth_nerfacto_sampling branch March 3, 2024 19:10
Michael-Spleenlab pushed a commit to Michael-Spleenlab/nerfstudio that referenced this pull request Apr 26, 2024
* fixes pixel sampling

* reverting indexing change

* adressing PR change

---------

Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>
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.

None yet

3 participants