Scaffold-GS
Scaffold-GS copied to clipboard
How to initialization with a random point cloud in my own datasets?
How to initialization with a random point cloud in my own datasets?
Two ways: 1. you can refer to https://github.com/city-super/Scaffold-GS/blob/da97ef8257b46d51c432df0df8b62f7c3a3c1079/scene/dataset_readers.py#L307-L319 to give a rand init during loading data;
- replace https://github.com/city-super/Scaffold-GS/blob/da97ef8257b46d51c432df0df8b62f7c3a3c1079/scene/gaussian_model.py#L237 with a rand init.
to give a rand init during loading data
So what should I do, just delete points3D.txt from the dataset? Or, how can I modify this code? my dataset is "Colmap" Because my dataset was taken by myself, the point cloud extracted using SFM performs poorly, so I want to test it with a randomly initialized point cloud.
To do so, you can replace https://github.com/city-super/Scaffold-GS/blob/da97ef8257b46d51c432df0df8b62f7c3a3c1079/scene/dataset_readers.py#L191-L194 with
num_pts = 100_000
print(f"Generating random point cloud ({num_pts})...")
xyz = np.random.random((num_pts, 3)) * 2.6 - 1.3 # adjust 2.6 and 1.3 to match your custom scene
rgb = np.random.random((num_pts, 3))
BTW, since your point cloud from Colmap is poor, I'm afraid that your pose is poor as well.
To do so, you can replace
https://github.com/city-super/Scaffold-GS/blob/da97ef8257b46d51c432df0df8b62f7c3a3c1079/scene/dataset_readers.py#L191-L194
with
num_pts = 100_000 print(f"Generating random point cloud ({num_pts})...") xyz = np.random.random((num_pts, 3)) * 2.6 - 1.3 # adjust 2.6 and 1.3 to match your custom scene rgb = np.random.random((num_pts, 3))
BTW, since your point cloud from Colmap is poor, I'm afraid that your pose is poor as well.
Thank you for your answer. I still want to give it a try. The data I am using is poor, so the pose matched with colmap is very poor, and I don't know how to solve it. Do you have any good suggestions?
Can you obtain the gt pose through other method, rather than Comap?