hustvl/GaussianDreamer

About initializing point clouds

ch1998 opened this issue · 2 comments

Hi,
in your project page,your use the point clouds with the added ground to initialize the 3D Gaussians.
If I want to modify the initialized point cloud similarly, how should I import the point cloud?

Regards

Hi, you can see this code:

def add_bg(self,coords,rgb):
        num_pts = 30000
        bound = 0.4
        xy = 5.0
        z_coords = coords[:, 2] 
        min_value = np.min(z_coords)  
        xyz = np.random.random((num_pts, 3)) * np.array([[xy, xy, bound]]) - np.array([[xy/2.0,xy/2.0, 4.0 * bound/5.0]])+ np.array([[0,0,min_value]])
        shs = np.random.random((num_pts, 3)) / 255.0
        colors = SH2RGB(shs)
        all_coords = np.concatenate([coords,xyz],axis=0)
        all_rgb = np.concatenate([rgb,colors],axis=0)
        return all_coords,all_rgb

And you can use this function in

Thank you very much, I am eager to start trying it