ranahanocka / MeshCNN

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

Data-Processing - Is it mandatory to simplify the meshes to same number of faces? #59

Open christinezuzart opened 4 years ago

christinezuzart commented 4 years ago

Hi,

I am trying to MeshCNN to classify 3D CAD models. However I have following queries.

  1. Is it mandatory to pre-process the mesh to reduce to same number of faces for the all CAD Models of the data set, as mentioned in the Simplifying to the same number of facessection in the following link - https://github.com/ranahanocka/MeshCNN/wiki/Data-Processing ?

  2. How should the target num_faces be chosen?

ranahanocka commented 4 years ago

Hi @christinezuzart ,

  1. Is it mandatory to pre-process the mesh to reduce to same number of faces for the all CAD Models of the data set, as mentioned in the Simplifying to the same number of facessection in the following link - https://github.com/ranahanocka/MeshCNN/wiki/Data-Processing ?

It is advised. As written in the wiki, it is similar to resizing images to the same size before training an image CNN: it will make the network faster and require less parameters. I at least suggest trying this route first, to make sure it will work on your data. If you do not pre-process, the network performance may degrade (not sure).

  1. How should the target num_faces be chosen?

I wrote a small explanation here. Basically the last number in the --pool_res list should not be less than the minimum amount of edges that can possibly be collapsed for your dataset. You should be able to get to 50% of the largest number of mesh edges in the dataset. For example, if the largest mesh in your set has 3000 edges, so the last number in pooling res could be 1500.

dhirajsuvarna commented 4 years ago

Basically the last number in the --pool_res list should not be less than the minimum amount of edges that can possibly be collapsed for your dataset.

Hi @ranahanocka, I have read multiple issues where you have stated, to find out minimum number of edges that can be collapsed. I would like to know how would one come to know what is the minimum number of edges that can be collapsed for a particular dataset.

Is there some mathematical formula to find out this? or some method which can help us determine this.

ranahanocka commented 4 years ago

Hi @dhirajsuvarna ,

As a rule of thumb, it seems to be possible to collapse most datasets to 50% of the original edge count. There is no mathematical formula, I suggest trying to collapse to at most 50% at first -- if that does not work, then you can try to increase the amount of edges to collapse until you find a stable number that works for your dataset.