ranahanocka / MeshCNN

Convolutional Neural Network for 3D meshes in PyTorch
MIT License
1.56k stars 314 forks source link

Code fails when attempting to remove an edge. #98

Open DandiC opened 3 years ago

DandiC commented 3 years ago

Hi.

I have a problem when attempting to train a network for segmentation in my own dataset. The error is thrown in this line of code and it happens only in one mesh of the dataset. Basically, the code attempts to remove an edge from the ve list, but the edge is not present in the list and throws ValueError: list.remove(x): x not in list.

The code seems to work when I remove that mesh from the dataset, so that has been my temporary fix. However, I noticed that in your code you have an if statement for when this actually happens (edge not present in the ve list), so I'm assuming that you have encountered this problem before and I was wondering if you have some insights of what could be done to fix it.

Thank you!

ranahanocka commented 3 years ago

Hi @DandiC --

did you check if your mesh is non-manifold? A simple way to do that is described here.

DandiC commented 3 years ago

Hi @ranahanocka,

Yes, the mesh is manifold. The mesh is actually from the coseg_aliens dataset that is provided with the code. I did some modifications to the code so it is likely that the error is thrown because of them. However, it seems to work with every other mesh, and I have still not found a solution for it. Since you have that if statement for this specific case, I was wondering if you would have some insight about when something like this happens. If you don't that's OK, it is very likely that the code is failing because of my edits so I don't want to bother you about it :)

Thanks!