czq142857/implicit-decoder

Questions about preparing data

FrozenSilent opened this issue · 4 comments

Hi, thank you very much for sharing the code of your great work. I am trying to prepare my own data for training and I use vox2pointvaluepair_from_binvox.py. I also visualize those h5py data using test_vox.py. However, I find that some shapes are good, some are not very satisfactory.
image
image
I use binvox.exe to change the original shape from segmented data of ShapeNetV2 to voxels. I have visualized these binvox data and they look good. The shapes have been normalized to the unit box. I am wondering what causes the result in figure 2. Thanks a lot again!

It seems you have modified the code to visualize the sampled points instead of the original 64^3 voxel model. In that case, your second figure is showing sampled points (which are inside the shape), and it should be correct.

I recommend you to normalize each shape so that the diagonal of its bounding box equals to unit length. If you use binvox you are likely to place the shape in a unit cube so that the longest edge in its bounding box is unit length. This could cause some trouble since in the code we do not sample points near the cube border.

Thanks for your quick reply. I did modify the visualization code, changing the visualization of the original 64^3 voxel model to the model obtained by those sampling points at different resolutions. I thought this would show a mesh model of sampling points at different resolutions using marching cube. I look through the pdf of data preparation in your website and the code again. Those sample points in data preparation seem to be not very regular, so if I use these points to reconstruct the surface of the model by marching cube, it will obtain an unsatisfactory result. So you get test coords in model.py, and these test coords contain all grid points, the reconstruction results based on them should be more satisfactory. Am I right?

I originally scaled the shapes into the unit cube. At your suggestion, I scale the diagonal of their bounding box to unit length instead. Thanks for your kind help again!

It is a trade-off between training time and accuracy. More sampled points will improve accuracy but make training time longer.

Yes, I got it. Thanks for your kind help!