ranahanocka / MeshCNN

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

Technical details in edge pooling strategy #89

Open MaroonAmor opened 4 years ago

MaroonAmor commented 4 years ago

Hi, @ranahanocka I have another question about the edge pooling strategy related to files "mesh_pool.py" and "mesh.py".

In the function "remove_triplete", we first mask out three edges "mask[edge_key] = False" and remove the center vertex "mesh.remove_vertex(vertex[0])". But I don't understand why we don't need to remove three edges using "mesh.remove_edge()". I found that we remove edges using "mesh.remove_edge()" in the function "self.__pool_side", which makes sense. Why not use it in "remove_triplete" Could you give more insights about the reason here?

Also, if we don't use "mesh.remove_edge()" in the function "remove_triplete", we have a problem that the "ve" attributes of these connected vertices (of the triplete) are not updated. This would be an issue when we update "new_ve" in function "mesh.clean(mask, edge_groups)" in the "mesh.py" file. As a result, there would be several zero values of edge indices for some vertices in "new_ve", which will further affect the pooling behavior "self.is_one_ring_valid(mesh, edge_id)", right? Could you explain more pooling details in this scenario?

Please correct me if I misunderstand the pipeline. Thanks.