dcharatan / pixelsplat

[CVPR 2024 Oral, Best Paper Runner-Up] Code for "pixelSplat: 3D Gaussian Splats from Image Pairs for Scalable Generalizable 3D Reconstruction" by David Charatan, Sizhe Lester Li, Andrea Tagliasacchi, and Vincent Sitzmann
http://davidcharatan.com/pixelsplat/
MIT License
830 stars 56 forks source link

How to vis pointcloud? #43

Closed zhongqiu1245 closed 6 months ago

zhongqiu1245 commented 6 months ago

Hello Thank you for your amazing job? When generate_point_cloud_figure.py was runing, I got *.ply file and some pictures (depth, angle).

python3 -m src.paper.generate_point_cloud_figure.py +experiment=re10k checkpointing.load=checkpoints/re10k.ckpt

But when I tried to vis '*.ply' with

pcd = o3d.io.read_point_cloud('point_clouds/000000_2c52d9d606a3ece2/gaussians.ply')
o3d.visualization.draw_geometries([pcd])

This error came out:

[Open3D WARNING] Read PLY failed: unable to open file: point_clouds/000000_2c52d9d606a3ece2/gaussians.ply
RPly: Unable to open file
[Open3D WARNING] The number of points is 0 when creating axis-aligned bounding box.

1、How could I vis this *.ply in correct way? 2、Could you tell me how to calculate or get context 1, context 2, far plane in line 36 of https://github.com/dcharatan/pixelsplat/blob/main/src/paper/generate_point_cloud_figure.py. for example, in line 39, ("2c52d9d606a3ece2", 87, 112, 35.0, [105]), how to get 87, 112, 35.0, [105]? Are there some rules to get context 1, context 2, far plane? Sorry for my limitation of gs and thank you in advance!

dcharatan commented 6 months ago
  1. In theory, any viewer that accepts .ply files in the format of the original Gaussian splatting paper should work. In practice, it seems the existing online viewers all give slightly different results. We found that the Polycam Gaussian viewer works well.
  2. We chose these parameters manually. We chose the scenes and corresponding context view indices by looking at printed test set images and choosing ones that looked like they would create cool-looking point clouds. We chose the far plane via trial and error to get rid of far-away points that weren't relevant to the scene/point cloud being visualized.
zhongqiu1245 commented 6 months ago

Like this? image Why is there a hole? Unlike 3D region...

dcharatan commented 6 months ago

This is an example where filtering based on the Z plane is useful. For some scenes, the model places Gaussians at far-away background locations that aren't visible in the rendered image. When this happens, the 3D-consistent "true" scene is generally at the tip of the frustum when you zoom in. The Z filtering should get rid of this repeated background effect.

ArisWayne commented 6 months ago

“("2c52d9d606a3ece2", 87, 112, 35.0, [105]), how to get 87, 112, 35.0, [105]” Regarding this question, Could you please tell me the meaning of each parameter and how to get them?

dcharatan commented 5 months ago

Those parameters are:

Since this code was just used to generate figures, we chose the last 2 parameters to best show the point clouds. If I'm not mistaken, the first 3 come from the test set (evaluation indices).