2d-gaussian-splatting icon indicating copy to clipboard operation
2d-gaussian-splatting copied to clipboard

IndexError: index -1000 is out of bounds for axis 0 with size 0

Open yanghbcodes opened this issue 9 months ago • 2 comments

CUDA_VISIBLE_DEVICES=0 python render.py -m outputs/backpack -s datas/backpack -r 2 --depth_ratio 1 --depth_trunc 3 --voxel_size 0.004 --skip_test --skip_train

Looking for config file in outputs/backpack/cfg_args Config file found: outputs/backpack/cfg_args Rendering outputs/backpack Loading trained model at iteration 15000 Reading camera 29/29 Loading Training Cameras Loading Test Cameras export mesh ... reconstruct radiance fields: 29it [00:01, 25.22it/s] Running tsdf volume integration ... voxel_size: 0.004 sdf_trunc: 0.02 depth_truc: 3.0 TSDF integration progress: 29it [00:00, 71.96it/s] [Open3D WARNING] Write PLY failed: mesh has 0 vertices. mesh saved at outputs/backpack/train/ours_15000/fuse.ply post processing the mesh to have 1000 clusterscluster_to_kep [Open3D DEBUG] [ClusterConnectedTriangles] Compute triangle adjacency [Open3D DEBUG] [ClusterConnectedTriangles] Done computing triangle adjacency [Open3D DEBUG] [ClusterConnectedTriangles] Done clustering, #clusters=0 Traceback (most recent call last): File "/remote-home/hbyang/codes/3DV/2d-gaussian-splatting/render.py", line 102, in mesh_post = post_process_mesh(mesh, cluster_to_keep=args.num_cluster) File "/remote-home/hbyang/codes/3DV/2d-gaussian-splatting/utils/mesh_utils.py", line 35, in post_process_mesh n_cluster = np.sort(cluster_n_triangles.copy())[-cluster_to_keep] IndexError: index -1000 is out of bounds for axis 0 with size 0

yanghbcodes avatar May 07 '24 12:05 yanghbcodes

It tells that you are producing 0 vertices mesh, which can be related to the scaling of your data. Maybe you should adjust the depth_trunc or you can try --unbounded mode if you are using 360 surrounded views.

hbb1 avatar May 07 '24 14:05 hbb1

I can confirm, scaling depth_trunc as per the scene solves this in the bounded setting:)

pani-vishal avatar May 07 '24 14:05 pani-vishal