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 when trying to remove actors + fixing solution #42

Open
Andyshen555 opened this issue Jul 9, 2024 · 1 comment
Open

Error when trying to remove actors + fixing solution #42

Andyshen555 opened this issue Jul 9, 2024 · 1 comment

Comments

@Andyshen555
Copy link

Describe the bug
When I try to remove all actors during rendering, throws IndexError: shape mismatch.

To Reproduce
Steps to reproduce the behavior:

  1. Train on the pandaset as described
  2. Render with the option --actor-removal-time x.x
  3. See error (for sequence 001 and actor removal time 0.0)
nerfstudio/scripts/render.py", line 739, in modify_actors
pipeline.model.dynamic_actors.actor_present_at_time[no_actor_mask, indices] = False
IndexError: shape mismatch: indexing tensors could not be broadcast together with shapes [40], [47]

Expected behavior
the no_actor_mask and indices should be used as indices instead of concatenating together.

Additional context
As far as pytorch 2.0.1-2.3.1, the > operator outputs tensor [true, false ,....] instead of index.
I solved the problem by replacing line 738 with no_actor_mask = torch.nonzero(pipeline.model.dynamic_actors.unique_timestamps > actor_removal_time, as_tuple=False)

@lidonghui-ai
Copy link

hello,I also try to remove actors,but I find it didn't work. The rendering video was not changed. Have you ever been in the same situation ? If not, can you help me to solve this issue? Thank you!

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

2 participants