nerfstudio-project / gsplat

CUDA accelerated rasterization of gaussian splatting
https://docs.gsplat.studio/
Apache License 2.0
1.36k stars 164 forks source link

Question about rasterization function. #265

Closed InFistLee closed 2 weeks ago

InFistLee commented 3 weeks ago

Thanks for the great work! I have two questions about the rasterization function.

  1. What is the difference between "expected depth" and "accumulated depth", as illustrated in the description of argument render_mode.
  2. The shape of render_colors is described as **render_colors**: The rendered colors. [C, width, height, X]. in rendering.py. However, what we actually get seems like [C, height, width, X]?
    render_colors, render_alphas, info = rasterization(
        means=means,
        quats=quats,
        scales=scales,
        opacities=opacities,
        colors=colors,
        Ks=Ks,  
        viewmats=w2c_mat,
        width=width,
        height=height,
        sh_degree=sh_degree,
        packed=False,
        absgrad=False,
        sparse_grad=False,
        rasterize_mode=rasterize_mode,
        render_mode='RGB',
    )
    print("width:", width, "\nheight:", height, "\nrender_colors:", render_colors.shape)
    # width: 1600 
    # height: 662 
    # render_colors: torch.Size([1, 662, 1600, 3]) 
Atticuszz commented 3 weeks ago

hi here the official explanation gsplat

InFistLee commented 2 weeks ago

hi here the official explanation gsplat

Thanks!That solves all my questions.