Anttwo / SuGaR

[CVPR 2024] Official PyTorch implementation of SuGaR: Surface-Aligned Gaussian Splatting for Efficient 3D Mesh Reconstruction and High-Quality Mesh Rendering
https://anttwo.github.io/sugar/
Other
2.2k stars 166 forks source link

Error while training #77

Open briancantwe opened 9 months ago

briancantwe commented 9 months ago

Hello! I've made it this far with setup, but I'm a bit stuck as to what might be the problem here. Thanks!

Loading SfM point cloud... Traceback (most recent call last): File "/mnt/c/users/dell/documents/github/sugar/train.py", line 162, in refined_sugar_path = refined_training(refined_args) File "/mnt/c/users/dell/documents/github/sugar/sugar_trainers/refine.py", line 361, in refined_training pcd = fetchPly(ply_path) File "/mnt/c/users/dell/documents/github/sugar/gaussian_splatting/scene/dataset_readers.py", line 112, in fetchPly normals = np.vstack([vertices['nx'], vertices['ny'], vertices['nz']]).T File "/home/bc/miniconda3/envs/sugar/lib/python3.9/site-packages/plyfile.py", line 827, in getitem return self.data[key] File "/home/bc/miniconda3/envs/sugar/lib/python3.9/site-packages/numpy/core/memmap.py", line 335, in getitem res = super().getitem(index) ValueError: no field of name nx

briancantwe commented 9 months ago

So, a bit more context and the solution. I'm using my own custom data and calibrating outside of colmap. Turns out that the converter I'm using to bring my cameras into colmap wasn't including normals in the points3D.ply file. Once they were added, the error went away and I got a great result.

Anttwo commented 9 months ago

Hello @briancantwe,

Nice, I'm glad you managed to solve this problem!

Feel free to share the results you got (well, only if you want to of course, it may be something you don't want to/you can't share), as it may be interesting to see how SuGaR performs on various scenes!