GithubHelp home page GithubHelp logo

slothfulxtx / diff-gaussian-rasterization Goto Github PK

View Code? Open in Web Editor NEW
102.0 102.0 5.0 136 KB

Differentiable gaussian rasterization with depth, alpha, normal map and extra per-Gaussian attributes, also support camera pose gradient

License: Other

CMake 1.23% C++ 17.85% Cuda 70.42% C 0.55% Python 9.96%

diff-gaussian-rasterization's People

Contributors

slothfulxtx avatar snosixtyboo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

diff-gaussian-rasterization's Issues

Rasterization Question - Meaning of radii

Hello. I am confused about the meaning of variable radii from this code:

from diff_gauss import GaussianRasterizationSettings, GaussianRasterizer

rendered_image, rendered_depth, rendered_alpha, radii = rasterizer(
    means3D = means3D,
    means2D = means2D,
    shs = shs,
    colors_precomp = colors_precomp,
    opacities = opacity,
    scales = scales,
    rotations = rotations,
    cov3D_precomp = cov3D_precomp
)

Could you please explain me what is the meaning of radii for each Gaussian and what its value represent in context of one Gaussian? I see that output of this variable is:

tensor([15,  7, 15,  ...,  4,  5,  3], device='cuda:0', dtype=torch.int32)

So for each Gaussian in the scene, there will be one radii value. What does this value represent?

P.S. It seems that radii is plural of radius, which I didn't know :D.

But still I am confused about what value represent? Radius of Gaussian in which unit and in which space (2D/3D)? What is this value if Gaussian is non-isotropic? Maybe none of this is true, so I am confused about this variable meaning.

Question about renderCUDA

Thanks for your great job!
I want to know why added the accum_rea = last_alpha + (1.f - last_alpha) * accum_rea; dL_dalpha += (1 - accum_rea) * dL_dpixel_alpha; in renderCUDA backward.cu You know that in the gaussian-splatting's code ,this isn't be added. and how can I get the formula about this part.

the range of `colors_precomp`

Hello, thanks for the wonderful work!

I have a question regarding the range of the parameter colors_precomp. I have a color_raw which ranges from 0 to 300. When I clamp it using:

color = torch.clamp(color_raw, 0.0, 256.)
out = rasterizer(
          means3D = means3D,
          means2D = means2D,
          shs = None,
          colors_precomp = color,
          opacities = ones,
          scales = scales,
          rotations = rotations,
          cov3D_precomp = None)[0]

I get a more white image, compared with:

color = torch.clamp(color_raw, 0.0, 1.)

I'm wondering would this function clamp the colors_precomp between 0-1? If yes, why does it get a more white image when clamping this term using a wider range?

I hope you could give me a hint about it. Thank you very much!

Just single pixel rendering

Hello,
Is it possible to render just single pixel which returns the color of each single ray from different colmap camera positions using depth/diff-gaussian-rasterization?

I am interested in getting final color at particular location for different view directions, by providing: 3DGS pointcloud, colmap camera poses, "location of target pixel for tracking in first fully rasterized image using first colmap camera pose from colmap pose sequence" or "3D location in scene (how to find it?)".
Can you please guide me to achieve this?

about depth map

hi, thanks for your work, Did your transform the depth map to point3ds for visualization? I test the depth map on bicycle (mip360-datasets), the depths seem are not consistent on multi-view and in some views the bicyle seems distorted.
Looking forward to your reply, thanks! @slothfulxtx

Can you please explain how the backward is derived in preprocessCUDA()??

Hello!

Thank you for allowing the amazing implementation to public!

I was studying over your implementations and had some questions on how to compute loss gradient w.r.t 3D means due to gradients of depth from rendering procedure, which is implemented in preprocessCUDA() of backward... The code snippet is

glm::vec3 dL_dmean2;
float mul3 = view[2] * m.x + view[6] * m.y + view[10] * m.z + view[14];
dL_dmean2.x = (view[2] - view[3] * mul3) * dL_ddepth[idx];
dL_dmean2.y = (view[6] - view[7] * mul3) * dL_ddepth[idx];
dL_dmean2.z = (view[10] - view[11] * mul3) * dL_ddepth[idx];
  1. Can you please explain how this part is derivated?

  2. Why use world2view matrix (view), not projective transform matrix (proj) as was used to calculate loss gradient w.r.t. 3D means due to gradients of 2D means? It was a bit confusing for me because the points go through projective transformation to get rasterized, meaning that the backward process to depth info should inevitably encounter projective transformation??

Again, thank you so much for your implementation!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.