Giter VIP home page Giter VIP logo

Comments (7)

ranahanocka avatar ranahanocka commented on May 19, 2024 3

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.

mrmoss avatar mrmoss commented on May 19, 2024

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.

h00shi avatar h00shi commented on May 19, 2024

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

mrmoss avatar mrmoss commented on May 19, 2024

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.

ranahanocka avatar ranahanocka commented on May 19, 2024

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

from meshcnn.

h00shi avatar h00shi commented on May 19, 2024

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

from meshcnn.

KS-MA avatar KS-MA commented on May 19, 2024

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

from meshcnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.