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

Question: How to get ray indices from the Nerfacto model inside the get_outputs() function #3578

Open
stanathong opened this issue Jan 22, 2025 · 0 comments

Comments

@stanathong
Copy link

stanathong commented Jan 22, 2025

Hello, I was wondering if anyone know how to get ray indices from the Nerfacto model.

In the Instant NGP model, you get ray indices when calling proposal_sampler() inside the get_outputs() function, which is quite convenient to know which ray indices the samples are from.

def get_outputs(self, ray_bundle: RayBundle):
assert self.field is not None
num_rays = len(ray_bundle)
with torch.no_grad():
ray_samples, ray_indices = self.sampler(

In the Nerfacto model, you don't get the ray indices. Is there a way to retrieve ray indices inside the get_outputs() function as that of the Instant NGP model, or somehow derived them from somewhere?

def get_outputs(self, ray_bundle: RayBundle):
# apply the camera optimizer pose tweaks
if self.training:
self.camera_optimizer.apply_to_raybundle(ray_bundle)
ray_samples: RaySamples
ray_samples, weights_list, ray_samples_list = self.proposal_sampler(ray_bundle, density_fns=self.density_fns)

Thank you very much.

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

No branches or pull requests

1 participant