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

Could you share the preprocessing code? #4

Open
spk921 opened this issue Jul 2, 2019 · 9 comments
Open

Could you share the preprocessing code? #4

spk921 opened this issue Jul 2, 2019 · 9 comments

Comments

@spk921
Copy link

spk921 commented Jul 2, 2019

I would like to try running ModelNet40 classification task and hard to find preprocessing the data.
Could you share the code for the preprocessing?
Thank you.

@jiangzhongshi
Copy link
Owner

Hi,

The preprocessing you need would be Laplacian and Dirac matrix for every mesh.
A python version is implemented here and I suggest to try out the Laplacian version first since it's faster.
https://github.com/jiangzhongshi/SurfaceNetworks/blob/master/src/utils/mesh.py#L114

Also, if you are familiar with C++ python binding, you can also use the more efficient one from libigl
https://github.com/jiangzhongshi/libigl/blob/pyigl/python/py_igl/py_cotmatrix.cpp for Laplacian
and https://github.com/jiangzhongshi/libigl/blob/pyigl/python/py_igl/py_dirac_operator.cpp for Dirac

@jiangzhongshi
Copy link
Owner

On a side note, some meshes in ModelNet40 may contain degenerate triangles etc and in that case Laplacian will contain entries that are NaN.
In that case, you can also try the intrinsic laplacian as the operator:
https://github.com/libigl/libigl/blob/master/include/igl/cotmatrix_intrinsic.h

@SimonPig
Copy link

SimonPig commented Nov 5, 2019

On a side note, some meshes in ModelNet40 may contain degenerate triangles etc and in that case Laplacian will contain entries that are NaN.
In that case, you can also try the intrinsic laplacian as the operator:
https://github.com/libigl/libigl/blob/master/include/igl/cotmatrix_intrinsic.h

When i run add_laplacian.py an error pop up at train_data =np.load: '' _pickle.UnpicklingError:invalid load key,' ' ''...is this related to the issue above?

@jiangzhongshi
Copy link
Owner

@SimonPig No, I think it is most likely to be the version incompatibility between python 2 and 3. In np.load, supply the additional parametre encoding=latin1 and see if that helps.

@SimonPig
Copy link

SimonPig commented Nov 7, 2019

@jiangzhongshi i've re-produced train.npy with create_data.py,but the size of my train.py is 4.5GB which is too big for np.load() in add_laplacian(EOFError: Ran out of input), i dont understand why yours are only 1GB? :::(

@jiangzhongshi
Copy link
Owner

@SimonPig I am really not familiar with the storage scheme. But a solution for the size is to save different sequence to different .npy files and I believe we did it for as_rigid_as_possible

@SimonPig
Copy link

SimonPig commented Nov 8, 2019

@jiangzhongshi Perhaps one module called ‘seism’ is missing?it‘s supposed to be imported in utils.mesh,line 138

@SimonPig
Copy link

SimonPig commented Nov 8, 2019

@jiangzhongshi No problem,thank you for keeping replying ;)so u will upload it later?

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

3 participants