ErlerPhilipp / points2surf

Learning Implicit Surfaces from Point Clouds (ECCV 2020)
https://www.cg.tuwien.ac.at/research/publications/2020/erler-2020-p2s/
MIT License
443 stars 46 forks source link

Reconstruction Error: "The model contains no faces." #30

Closed berkbilir closed 11 months ago

berkbilir commented 1 year ago

Hello, thank you for the great work.

I am trying to reconstruct my own 2048-point point cloud with the max model however, when I try to visualize the resulting .ply file, I encounter with the error: "The model contains no faces." What could be the reason for this?

Thanks!

ErlerPhilipp commented 1 year ago

Hi @berkbilir! Which software gives this error? A model viewer? In my experience, Meshlab is the most robust one except for some likely line ending issues with Lin/Win switches. To be absolutely sure, you can load the .ply with e.g. trimesh and check if there are indeed no faces.

Assuming the viewer is correct and there are no faces: A theoretical reason is that the point cloud is so difficult that P2S couldn't produce an SDF that crosses the 0-level set. This could happen e.g. with open surfaces but in practice, P2S should produce some (possibly useless) result or print an error message. If P2S simply doesn't work, you should try e.g. POCO.

berkbilir commented 1 year ago

Thank you for the prompt response. I think it was a problem with the viewer. I will investigate more.

I have one more question regarding reconstructing my own pcs. I get the following error for some of them:

  File "/home/points2surf-master/source/sdf.py", line 63, in get_voxel_centers_grid_smaller_pc
    query_pts_vol[pts_vs[:, 0], pts_vs[:, 1], pts_vs[:, 2]] = 1.0

Do you have any idea why?

ErlerPhilipp commented 1 year ago

No idea. What's the error? Please post the full stack trace. You have 3D point clouds, right?

berkbilir commented 1 year ago

Yes, I am working with 3D point clouds. Here is the full stack trace:

Traceback (most recent call last):
  File "full_eval.py", line 81, in <module>
    full_eval(opt=points_to_surf_eval.parse_arguments())
  File "full_eval.py", line 46, in full_eval
    points_to_surf_eval.points_to_surf_eval(opt)
  File "/home/points2surf-master/source/points_to_surf_eval.py", line 333, in points_to_surf_eval
    dataset = make_dataset(train_opt=train_opt, eval_opt=eval_opt)
  File "/home/points2surf-master/source/points_to_surf_eval.py", line 107, in make_dataset
    dataset = data_loader.PointcloudPatchDataset(
  File "/home/points2surf-master/source/data_loader.py", line 304, in __init__
    sdf.get_voxel_centers_grid_smaller_pc(
  File "/home/points2surf-master/source/sdf.py", line 63, in get_voxel_centers_grid_smaller_pc
    query_pts_vol[pts_vs[:, 0], pts_vs[:, 1], pts_vs[:, 2]] = 1.0
IndexError: index 128 is out of bounds for axis 2 with size 128
ErlerPhilipp commented 1 year ago

I see. The problem is the conversion between model space and volume space. Your point clouds need to be normalized to [-0.5, +0.5] if I remember correctly. Or maybe it was [-1, +1]. Better consider some padding (e.g. 5%) so that it doesn't touch the bounds. Did you use the point cloud preparation (see readme)? That should take care of these issues.

ErlerPhilipp commented 11 months ago

please re-open if you have other issues