Comments (7)
Hi, great question - thanks :)
So ModelNet40 / ShapeNet is not manifold. Meshes that are not manifold do not have at most 2 incident faces - which breaks our fixed-size convolution neighborhood assumption (illustration)
I did start playing with this code which makes meshes manifold, and noticed it works pretty well. I will try to find some time soon to write some scripts to clean it up and add it to the repo. Will update this issue accordingly
from meshcnn.
It might be worth using something like pymesh
or trimesh
to load and save meshes (nice built-in functionality to detect/fix non-manifold meshes).
This would also make importing datasets of different formats easier as well, as loading a mesh would be something like mesh=module.load('file.ext')
and accessing edges, faces, and vertices is simply mesh.edges
, mesh.faces
, and mesh.vertices
.
The function fill_from_file()
in mesh_prepare.py
could be something really simple like:
import trimesh #pip3 install trimesh
mesh=trimesh.load(fpath) #loads ascii and binary stls, objs, etc...
mesh.rezero() #move to [0,0,0]
if not mesh.is_watertight or not mesh.is_volume:
raise Exception('"%s" is not manifold'%fpath)
return mesh.vertices,mesh.faces
The above code is completely untested...
from meshcnn.
@mrmoss I think the neural network would need a mesh with a single (or only a few) components. What pymesh and trimesh do for making the mesh manifold is breaking it into multiple components. So, they might not work that easily (I am not sure).
from meshcnn.
I was thinking more detection and warning/erroring rather than repairing.
As far as I can gather from both mentioned modules, other than face normals, files are parsed without any attempt to repair or fix them.
For repairing, trimesh's fill_holes() might be worth a try?
Edit: Edited for overall clarity and length.
from meshcnn.
It might be worth using something like
pymesh
ortrimesh
to load and save meshes (nice built-in functionality to detect/fix non-manifold meshes).
I tried these non-manifold fixes, and they do not work for shapenet.
This would also make importing datasets of different formats easier as well, as loading a mesh would be something like
mesh=module.load('file.ext')
and accessing edges, faces, and vertices is simplymesh.edges
,mesh.faces
, andmesh.vertices
.
The functionfill_from_file()
inmesh_prepare.py
could be something really simple like:
I do hear what you are saying, but I prefer to keep the code independent of external packages, and just have people convert to .obj format. This can be done pretty easily with Meshlab scripts. And maybe it's just me, but I think when things are written explicitly, it helps make it really clear how simple meshes really are :)
from meshcnn.
These guys seem to have processed all the ShapeNet.
Github page
repaired shapenet
from meshcnn.
Has anyone by now tried the network on the ModelNet50/ModelNet10 (classification) dataset?
from meshcnn.
Related Issues (20)
- What is the difference between dihedral_angle () and angles_from_faces()
- __remove_triplete errror HOT 1
- What do the ' other_side_a' and 'other_keys_a,' mean?
- I'm trying to apply your model to my project, but i found out that I cannot create the *.eseg and *.seseg formats! HOT 2
- What is the purposes of soft_labels in segmentation data?
- How to input a mesh file to know the classification result? HOT 2
- IndexError: index out of range
- AssertionError
- What is the relationship between your meshes and original coseg meshes?
- Segmentation of objects with different characteristic
- assert no zero face area
- Does the class "Mesh" have an attribute about face?
- Undestanding .eseg file
- Proper TensorBoard Usage
- How to prepare data for a custom dataset?
- cannot install pytorch=1.2.0 HOT 1
- How to save a segmented (colored) mesh in .obj format?
- IndexError: index out of range
- Using my own obj files for training
- The problem when I run meshcnn classification HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meshcnn.