Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encountering error at coarse mesh extraction #20

Open
AbnerVictor opened this issue Dec 19, 2023 · 5 comments
Open

encountering error at coarse mesh extraction #20

AbnerVictor opened this issue Dec 19, 2023 · 5 comments

Comments

@AbnerVictor
Copy link

AbnerVictor commented Dec 19, 2023

Hi, I encountered the following error when I was trying to run the second stage of your code, here is the error message.

Could you kindly give me some suggestions to fix this problem? Thanks!

To be clear, I use the Nerf synthetic dataset and generate the gs checkpoint using your code.

Traceback (most recent call last):
File "train.py", line 136, in
coarse_mesh_args = AttrDict({
File "SuGaR-main/sugar_extractors/coarse_mesh.py", line 410, in extract_mesh_from_coarse_sugar
o3d_bg_mesh, o3d_bg_densities = o3d.geometry.TriangleMesh.create_from_point_cloud_poisson(
RuntimeError: [Open3D Error] (static std::tuple<std::shared_ptropen3d::geometry::TriangleMesh, std::vector<double, std::allocator > > open3d::geometry::TriangleMesh::CreateFromPointCloudPoisson(const open3d::geometry::PointCloud&, size_t, float, float, bool, int)) /root/Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:732: Point cloud has no normals

@Anttwo
Copy link
Owner

Anttwo commented Dec 19, 2023

Hello AbnerVictor,

Thank you for noticing this!

This may be due to an empty background, are you using a synthetic dataset?
As I explain in this issue (#19), since we were interested in full, real scenes only, there was always a background in my scenes and I forgot to handle the case of an empty background, that could be useful for synthetic datasets.
I'm sorry for that!

I just changed the coarse_mesh.py script. I did not re-test the code because this change is really minor (it was just a few 'if's to add), but it should work with empty backgrounds now. Feel free to tell me if you meet another error related to this.

Thank you!

@AbnerVictor
Copy link
Author

Hello AbnerVictor,

Thank you for noticing this!

This may be due to an empty background, are you using a synthetic dataset? As I explain in this issue (#19), since we were interested in full, real scenes only, there was always a background in my scenes and I forgot to handle the case of an empty background, that could be useful for synthetic datasets. I'm sorry for that!

I just changed the coarse_mesh.py script. I did not re-test the code because this change is really minor (it was just a few 'if's to add), but it should work with empty backgrounds now. Feel free to tell me if you meet another error related to this.

Thank you!

Thank you. I suppose it is because of the empty background, I'm using a synthetic dataset with a pure black background. I will try your new code!

It is a great work!

@yuedajiong
Copy link

My case is without background, like this:

000001

@Freeverc
Copy link

It occured on drone collected dataset by 231218 commit :c2d1c1c6839dd96fcd153a1bd129a138e5dee79e
Loading the coarse SuGaR model from path
./output/coarse/1121222212333331/sugarcoarse_3Dgs7000_sdfestim02_sdfnorm02/15000.pt...
Use min to initialize scales.
Initialized radiuses for 3D Gauss Rasterizer
Coarse model loaded.
Coarse model parameters:
_points
torch.Size([183672, 3])
True
all_densities
torch.Size([183672, 1])
True
_scales
torch.Size([183672, 3])
True
_quaternions
torch.Size([183672, 4])
True
_sh_coordinates_dc
torch.Size([183672, 1, 3])
True
_sh_coordinates_rest
torch.Size([183672, 15, 3])
True
Number of gaussians: 183672
Opacities min/max/mean: tensor(5.1140e-14, device='cuda:0') tensor(1., device='cuda:0') tensor(0.9421, device='cuda:0')
Quantile 0.0: 5.114017323222357e-14
Quantile 0.1: 0.7956185936927795
Quantile 0.2: 0.9892562031745911
Quantile 0.3: 0.9988507032394409
Quantile 0.4: 0.9995555281639099
Quantile 0.5: 0.999764621257782
Quantile 0.6: 0.9998601675033569
Quantile 0.7: 0.9999138116836548
Quantile 0.8: 0.9999490976333618
Quantile 0.9: 0.9999756813049316

Starting pruning low opacity gaussians...
WARNING! During optimization, you should use a densifier to prune low opacity points.
This function does not preserve the state of an optimizer, and sets requires_grad=False to all parameters.
Number of gaussians left: 176499
Opacities min/max/mean: tensor(0.5001, device='cuda:0') tensor(1., device='cuda:0') tensor(0.9697, device='cuda:0')
Quantile 0.0: 0.5001183748245239
Quantile 0.1: 0.896555483341217
Quantile 0.2: 0.996113657951355
Quantile 0.3: 0.9991563558578491
Quantile 0.4: 0.9996246099472046
Quantile 0.5: 0.999788224697113
Quantile 0.6: 0.9998703002929688
Quantile 0.7: 0.9999186992645264
Quantile 0.8: 0.9999513626098633
Quantile 0.9: 0.999976634979248
Processing frame 0/84...
Current point cloud for level 1.0 has 0 points.
Processing frame 30/84...
Current point cloud for level 1.0 has 0 points.
Processing frame 60/84...
Current point cloud for level 1.0 has 0 points.

========== Processing surface level 1.0 ==========
Final point cloud for level 1.0 has 0 points.
Using default, camera based bounding box.
Centering bounding box.
Foreground points:
torch.Size([0, 3])
torch.Size([0, 3])
torch.Size([0, 3])
Background points:
torch.Size([0, 3])
torch.Size([0, 3])
torch.Size([0, 3])

-----Foreground mesh-----
Computing points, colors and normals...
Cleaning Point Cloud...
Finished computing points, colors and normals.
Now computing mesh...
Traceback (most recent call last):
File "/home/code/SuGaR/train.py", line 145, in
coarse_mesh_path = extract_mesh_from_coarse_sugar(coarse_mesh_args)[0]
File "/home/code/SuGaR/sugar_extractors/coarse_mesh.py", line 387, in extract_mesh_from_coarse_sugar
o3d_fg_mesh, o3d_fg_densities = o3d.geometry.TriangleMesh.create_from_point_cloud_poisson(
RuntimeError: [Open3D Error] (static std::tuple<std::shared_ptropen3d::geometry::TriangleMesh, std::vector<double, std::allocator > > open3d::geometry::TriangleMesh::CreateFromPointCloudPoisson(const open3d::geometry::PointCloud&, size_t, float, float, bool, int)) /root/Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:732: Point cloud has no normals

@hughkhu
Copy link

hughkhu commented Jan 15, 2024

same problem. How to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants