MeshCNN icon indicating copy to clipboard operation
MeshCNN copied to clipboard

Using edge midpoints as input features

Open LiZimo opened this issue 5 years ago • 1 comments

Hi, not quite an issue, but thought appropriate to write here.

You mention in your paper that you ran some experiments using edge midpoints as input features. Is the option to do this implemented somewhere in the code? If so, how to turn it on. Thanks!

LiZimo avatar Feb 25 '20 02:02 LiZimo

Hi @LiZimo ,

We did not include it (tried to keep the code as simple as possible), but you can easily add it to the code. Here is the function that did it :

    def mid_point(mesh, features):
        for edge_id, edge in enumerate(mesh.edges):
            features[edge_id].extend(list(mesh.vs[edge[0]] + mesh.vs[edge[1]] / 2))

You can add that to mesh_prepare.py

Then also, you should add "mid_point" to the list of feature extractors in this line: https://github.com/ranahanocka/MeshCNN/blob/5af7b9c39d3e871b052f9c4c4315fb03f5f92992/models/layers/mesh_prepare.py#L316

I think that should be it.

ranahanocka avatar Mar 01 '20 17:03 ranahanocka