Better camera alignment to 3DGS #6
Merged
+109
−138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
There is feedback (issue1, issue2) that 2DGS doesn't works for non-ideal pinhole camera, while 3DGS works by modifying the projmat. For better alignment, I change the code accordingly. I keep minimal changes to the original code and validate it through some experiments.
Method
3DGS uses ndc projection matrix while 2DGS uses intrinsic matrix. For better alignment, I change the intrinsic to a projection matrix and simplify the projection process. Now it should work for non-ideal pinhole cameras by modifying the projmat.
I also implemented and tested trans_precomp so people can use pytorch for pre-compute transformation matrix.
Disadvantage: not well aligned to
cov3D_precomp
, where only scaling and rotations are involved.Advantage: trans_precomp involves the camera outside the render, so it natively supports gradient flow to the camera using Pytorch. This would be useful for projects that require camera pose optimization.
Experiments
test on the data nerf-synthetic chair, without regularizations, using an RTX 3090.
Conclusion
trans_precomp
does not support normal rendering currently. One possible minimal change is to rewrite thetrans_precomp
to a3x4
matrix and do so totransMat
. But this requires refactoring the geometry buffer for clarity. Leave to future works.Future works
Improve
trans_precomp
to support normal rendering.