graphdeco-inria / gaussian-splatting

Original reference implementation of "3D Gaussian Splatting for Real-Time Radiance Field Rendering"
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
Other
14.76k stars 1.93k forks source link

A minor question #1045

Open M11pha opened 3 weeks ago

M11pha commented 3 weeks ago

Hello, on the line 155 of gaussian_model.py, should features[:, 3:, 1:] = 0.0 be features[:, :3, 1:] = 0.0 instead?

def create_from_pcd(self, pcd : BasicPointCloud, cam_infos : int, spatial_lr_scale : float):
        self.spatial_lr_scale = spatial_lr_scale
        fused_point_cloud = torch.tensor(np.asarray(pcd.points)).float().cuda()
        fused_color = RGB2SH(torch.tensor(np.asarray(pcd.colors)).float().cuda())
        features = torch.zeros((fused_color.shape[0], 3, (self.max_sh_degree + 1) ** 2)).float().cuda()
        features[:, :3, 0 ] = fused_color
        features[:, 3:, 1:] = 0.0
AsherJingkongChen commented 2 weeks ago

The line is even redundant.

M11pha commented 2 weeks ago

The line is even redundant.

Yes, I think it was originally written this way to deliberately emphasize the point.