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:correction of PairPixelSampler in case of using masks with depth-nerfacto #2477

Conversation

pierremerriaux-leddartech
Copy link
Contributor

Hi,
When I try to train depth-nerfacto with mask, assert below pop:
File "/home/pierre.merriaux/project/nerfstudio/nerfstudio/data/pixel_samplers.py", line 176, in collate_image_dataset_batch
assert collated_batch["image"].shape[0] == num_rays_per_batch

It is because in PairPixelSampler in case of using masks, indices are returned with shape self.rays_to_sample and self.rays_to_sample = self.config.num_rays_per_batch // 2.
I added pair_indices stacking as without using masks. I will push the PR soon

Copy link
Contributor

@AdamRashid96 AdamRashid96 left a comment

Choose a reason for hiding this comment

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

This LGTM

@pierremerriaux-leddartech
Copy link
Contributor Author

Hi @AdamRashid96 , could we merge this one?
Thanks

@AdamRashid96 AdamRashid96 merged commit 7856aa0 into nerfstudio-project:main Sep 29, 2023
4 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.

None yet

2 participants