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

How the gradient of GaussianRasterization is passed to viewpoint_camera? #84

Closed
Bin-ze opened this issue Aug 11, 2023 · 1 comment
Closed

Comments

@Bin-ze
Copy link

Bin-ze commented Aug 11, 2023

I want to add pose optimization on the basis of this algorithm, but I found that GaussianRasterization will not pass the gradient to the viewpoint_camera, how can I do it?

@Snosixtyboo
Copy link
Collaborator

Since the rasterizer is a custom CUDA extension, you would have to derive and compute the gradients w.r.t. the camera in CUDA code and then return them. Depending on your familiarity with CUDA, I am afraid this can be a challenging task. But if you want to attempt it, the methods preprocess and computeCov2D are the ones you want to look at and where you would collect the gradients for the camera in the backward.

Alternatively, you could try to do any CUDA steps that the camera is involved in through pytorch (computing the 2D covariance matrix, projection of means). That would make things quite a bit slower however, but you would not need to derive camera gradients yourself.

I'm afraid that neither option is trivial, both will need a good amount of programming and math skills.

Hth,
Bernhard

@Snosixtyboo Snosixtyboo reopened this Aug 13, 2023
@Snosixtyboo Snosixtyboo closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2023
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