-
Notifications
You must be signed in to change notification settings - Fork 159
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
Approximate view matrix gradient for pose optimization #127
Approximate view matrix gradient for pose optimization #127
Conversation
Allows camera pose optimization in Nerfstudio
Is there any comparison of how well this does vs the gradient including all terms? |
Not yet, unfortunately. Adding all terms to this PR to this method would be a lot trickier, since that involves differentiating with respect to rotations and there are several different rotation representations involved (one for However, the end-to-end results (e.g. PSNR) could be compared to #123 (assuming the implementation there is correct). A good comparison would also need a non-COLMAP dataset that is agreed to be a good benchmark. |
…oject/pull/127) (#2) * Implement approximate gradient for viewmat Allows camera pose optimization in Nerfstudio * Remove projection matrix Which was redundant with the pinhole intrinsics parameters fx, fy, cx, cy. Leave the projmat parameter to ProjectGaussians for backwards compatibility. * Remove projmat also from _torch_impl to fix tests * viewmat grad: speed up and add docs --------- Co-authored-by: Otto Seiskari <otto.seiskari@gmail.com> Co-authored-by: Otto Seiskari <otto.seiskari@spectacularai.com>
@kerrj @maturk @oseiskar My tests show significant deviations between the approximated gradient and the pure torch implementation gradient:
Could you show an example of it working well? Or maybe rebasing on a commit later than 2d33520 and adding a test for |
This approach has now been independently battle tested in two different not-yet-peer-reviewed academic manuscripts:
Both approaches also use this PR #97. @jh-surh I'm not sure if the gradients are directly comparable before getting rid of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to merge this version of gradients for now since they seem to work well in practice; can re-investigate the full implementation if needed down the line.
Allows camera pose optimization in Nerfstudio. A simpler drop-in replacement for #123. Compatible with nerfstudio-project/nerfstudio#2885
This gradient is not exact, but ignores certain terms that are harder to compute. A very similar approach is described in the GS-SLAM paper https://arxiv.org/pdf/2311.11700.pdf (see §3.3)