-
Notifications
You must be signed in to change notification settings - Fork 283
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
Backpropagating through raymarching #119
Comments
I am also interested in learning how to add gradient flow such that rays_o and rays_d have requires_grad = True so that backward pass can be used to optimize camera pose like in iNeRF or more recently NVIDIA's parallel inversion of NeRF's paper. |
@alex3dfan Hi, yes, you have to implement the |
hi @ashawkey , I am writing the backward pass for raymarching following ngp_pl. I am wondering if deltas[:,1] ( torch-ngp/raymarching/raymarching.py Line 229 in b6e0804
Thanks for this open-source contribution! Best, |
This is my current implementation:
|
@ShengyuH Hi, Shengyu, I wonder if the gradient works properly for camera optimization with the code you provided above? I am trying to do something similar but still encountered |
Hi @ashawkey ,
I wish to backpropagate gradients back to camera poses, however this results in an error in _march_rays_train(), which does not have a backward pass function. To make this work do I need to write the backward pass function in raymarching py and the backward function in raymarching.cu or is there another easier way to reach that goal ?
The text was updated successfully, but these errors were encountered: