-
Notifications
You must be signed in to change notification settings - Fork 1
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
how do you simplfy the ModelNet40 #1
Comments
BackgroundThe original ModelNet40 data set contain non-manifold meshes. Therefore, pre-processing them to have a fixed number of faces is non-trivial. Some other works decimate meshes as a quadratic energy minimization problem. However, their decimation strategy had some issues, and I wanted to avoid them Rough DirectionFirstly, I converted the .off files in ModelNet40 into .obj files using this library. And to ensure all .obj files were triangle meshes, I used the "Turn into a Pure-Triangular mesh" filter in MeshLab. These operations did not change the meshes' topology (except when a mesh was not a triangle mesh) but ensured all further pre-processing went smoothly. Next, as mentioned in the paper, I used Watertight Manifold. In most cases, Watertight Manifold decimated meshes to have 1024 faces. Sometimes, if the decimation was unsuccessful, I used Watertight Manifold iteratively. However, for a select few meshes, Watertight Manifold does not work. Thus, for those meshes, I utilized Blender to add volume to them before using Watertight Manifold. I have the scripts for these, but as you can imagine, decimation occurs on a per-instance basis. Thus, for reproducibility purposes, you should only use the link I have shared on the GitHub page. Code:We will not add the pre-processing code to the official repo. However, I have copied the scripts/code required to pre-process the meshes here. It's in the zip file called ModelNet40_utils.zip. You'll need to install the following software before you run the scripts.
Please note you will have to change the relative paths in the provided Python scripts based on how you create the folders. Please find the steps below:
The above steps will give you errors for some meshes because they have no volume, and some are just hard to decimate for Watertight Manifold. The trick to converting the failed meshes is to rerun waterlight.py on the meshes in ModelNet40-waterlight (not ModelNet40-decimate-1024) folder that have been unable to decimate. Sometimes you have to do this multiple times. Then run decimate.py on these failed meshes, and it should work. If you don't necessarily need 1024 faces and 5096 faces is ok for your datasets, steps 1-5 usually work without failing. Please let me know if you have any further questions. If these instructions resolve your question, please close this issue. |
thanks for this repo. how do you simplify the meshes in modelnet40? do you plan to publish the code? if not, could you provide a rough direction? thanks.
The text was updated successfully, but these errors were encountered: