MeshCNN icon indicating copy to clipboard operation
MeshCNN copied to clipboard

Verification on other Data Sets

Open h00shi opened this issue 6 years ago • 8 comments

This is more a question rather than an issue, so apologies if it is not the right place to ask it.

Have you also tried the network on the de facto ModelNet50 (classification) and ShapeNet Core (segmentation) datasets?

h00shi avatar May 13 '19 21:05 h00shi

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

ranahanocka avatar May 14 '19 12:05 ranahanocka

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...

mrmoss avatar Sep 09 '19 18:09 mrmoss

@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).

h00shi avatar Sep 09 '19 18:09 h00shi

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.

mrmoss avatar Sep 09 '19 18:09 mrmoss

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).

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 simply mesh.edges, mesh.faces, and mesh.vertices. The function fill_from_file() in mesh_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 :)

ranahanocka avatar Sep 16 '19 19:09 ranahanocka

These guys seem to have processed all the ShapeNet. Github page repaired shapenet

h00shi avatar Oct 30 '19 19:10 h00shi

Has anyone by now tried the network on the ModelNet50/ModelNet10 (classification) dataset?

KS-MA avatar Jan 10 '20 09:01 KS-MA