MeshCNN icon indicating copy to clipboard operation
MeshCNN copied to clipboard

Technical details in edge feature calculation

Open MaroonAmor opened this issue 5 years ago • 3 comments

Hi, @ranahanocka thanks for sharing your nice work.

I have a question about the edge feature calculation in the "mesh_prepare.py" file.

Is there any reason that you use the function fixed_division(to_div, epsilon) with epsilon=0.1 for the division (in the mesh_prepare.py)? Is it too large?

In the current version, this division strategy exists in functions angles_from_faces(mesh, edge_faces, faces), get_opposite_angles(mesh, edge_points, side), and get_ratios(mesh, edge_points, side) followed by clip(-1, 1). The epsilon value of 0.1 is added to all the vectors to be normalized.

Also, I think it is not correct to calculate the angle by clipping the cos value in [-1, 1]. Is it gonna affect the angle value a lot after modifying the cos value?

Is it better for the dihedral angle of two neighbor faces to differentiate between the concave and convex cases? In the current vision, the angle is always positive (no difference between such two cases above), right?

Could you give me more details on the reason or advantages in your implementation?

Thank you

MaroonAmor avatar Jul 10 '20 15:07 MaroonAmor

Hi @MaroonAmor ,

Arc cosine is defined between -1 ≤ x ≤1, and so due to any floating point arithmetic, we ensure this is the case with the clip, here: https://github.com/ranahanocka/MeshCNN/blob/15b83cc6a4db968baf6cf595df78995a9c2dcee3/models/layers/mesh_prepare.py#L412-L413 and here: https://github.com/ranahanocka/MeshCNN/blob/15b83cc6a4db968baf6cf595df78995a9c2dcee3/models/layers/mesh_prepare.py#L222-L223

The reason for the fixed_division is to handle the degenerate case when the denominator is zero, so we add a fixed value to the denominator for numerical stability.

ranahanocka avatar Aug 10 '20 18:08 ranahanocka

Hi @ranahanocka,

Thanks a lot for your explanation about the numeric stability during division.

Could you introduce more details about the dihedral angle between two neighbor faces? Why all angles are positive?

I am wondering if signed angles could further help improve the segmentation accuracy. Thanks. :)

MaroonAmor avatar Aug 10 '20 18:08 MaroonAmor

Hi @MaroonAmor ,

I think that signed angles will be sensitive to order. Since we don't have a way to consistently define which face comes first, this just tells us if an angle is sharp, or not. I would guess that adding signed angles will hurt the performance for this reason, but feel free to try it out and let us know :)

ranahanocka avatar Sep 19 '20 11:09 ranahanocka