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

Error in OccGridEstimator sampling with t_max #291

Open
countywest opened this issue Apr 4, 2024 · 0 comments
Open

Error in OccGridEstimator sampling with t_max #291

countywest opened this issue Apr 4, 2024 · 0 comments

Comments

@countywest
Copy link

I want to ask for advice since I met the weird behaviors when using occupancy grid sampling with t_max.

I want to sample points with nerfacc.OccGridEstimator when each ray has maximum distance.
So I wrote this typical sampling code:
ray_indices, t_starts, t_ends = occgrid.sampling(rays_o=rays_o, rays_d=rays_d, render_step_size=0.01, t_max=t_max)
where t_max is a torch.Tensor of shape (n_rays, 1).

However, when I ran this code, there are some points which have been sampled over the maximum distance t_max.
I noticed it since both (t_max[ray_indices] < t_ends[:, None]).sum() and (t_max[ray_indices] < t_starts[:, None]).sum() are over 0.

In the above case, t_max values are smaller than default far_plane enough. I think this behavior is not intended, since the docs say that if t_max is profided, the marching will stop by minimum of t_max and far_plane.

Please let me know if I'm doing something wrong.
I'm using version 0.5.2+pt113cu117.

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