mesh_to_sdf icon indicating copy to clipboard operation
mesh_to_sdf copied to clipboard

mesh_to_voxel - incorrect

Open wbjang opened this issue 4 years ago • 8 comments

Dear Marian,

Thank you very much for releasing the code. I've tried to pre-process the ShapeNet objects using your library. When I use mesh_to_voxel, the voxel representation is slightly different from the original object as below, or it has some unnecessary stuff appearing on edges.

Screenshot 2020-03-19 at 14 47 54 Screenshot 2020-03-19 at 14 51 38 Screenshot 2020-03-19 at 14 47 45 Screenshot 2020-03-19 at 14 51 58

I tried to tackle down what the problem was..(I guess it is probably related to getting the point clouds from the depth images during Scan) but I could not figure it out. So, I raise this issue to you.

Kind regards,

WB

wbjang avatar Mar 19 '20 14:03 wbjang

Hi! Sorry for the trouble. I used this implementation with the ShapeNet dataset and I found that unfortunately not all of the meshes can be processed. In some cases, this is because the meshes are too far from anything that resembles a watertight mesh (although this approach can handle meshes with holes to an extent).

You can improve the results somewhat by tweaking the parameters (this is a tradeoff between quality and computation time) and you can also try the depth-buffer based approach (this is a tradeoff between accuracy and number of blob artifacts).

If you want to process the entire ShapeNet dataset, you can set the check_result parameter to True and it will throw an exception for voxel volumes with artifacts so that you can discard them.

If you can provide the mesh files (or Shapenet ids) for these particular meshes, I can try to debug the process for them.

marian42 avatar Mar 20 '20 18:03 marian42

I will try as you suggest! Thank you for your quick response and sorry for the late reply.

wbjang avatar Mar 26 '20 11:03 wbjang

I think that the new version works much better - great work!!

wbjang avatar May 08 '20 11:05 wbjang

Dear Marian,

I would like to re-open the issue. I have a watertight mesh(hand mesh) and I tried to use mesh_to_vox(). But it gave unwanted reconstructions near the wrist. I tried to debug(but not successful) and what I found is that few of the voxel grid point's sdf values are miscalculated, this eventually makes marching cubes to wrongly reconstruct the surface.

It would be a really great help if you could help me debug this issue. looking forward to hearing from you.

Thank you!

anilesec avatar Oct 02 '20 13:10 anilesec

Dear Marian,

Thanks a lot for re-opening the issue. I have attached the input mesh(hand mesh) that I used. Perhaps it might be useful to help us.

HandMesh.zip

anilesec avatar Oct 02 '20 15:10 anilesec

@anilesec I faced a similar problem. When using the sign_method="depth" parameter, the artefacts disappear in your example mesh. The surface seems to be more rough though: comparison

sraimund avatar Sep 10 '21 12:09 sraimund

Does someone know which shape classes from ShapeNet work well with mesh_to_voxels ? The planes class (02691156) for instance does not work at all (all conversions fail).

philippwulff avatar Feb 22 '23 22:02 philippwulff

FYI, using sign_method="depth" greatly increases the number of meshes that can be preprocessed.

philippwulff avatar Feb 23 '23 20:02 philippwulff