Previously, it was possible (albeit unlikely) to generate an inconsistent MeshSummary from a learned deep support convex network. In the extract_mesh function, a mesh is generated by querying a multitude of directions and obtaining their corresponding support points. If any of the returned support points were redundant with one another, the resulting MeshSummary.vertices attribute would contain all of these redundant vertices (in support_points), but its faces attribute would reference indices of a different list of non-redundant vertices (in vertices).
Solution
The simple fix is to store the list of non-redundant vertices in the MeshSummary.vertices attribute instead of the original list of possibly redundant vertices.
Discovery
While it is extremely unlikely to obtain the exact same output from a neural network given different inputs (which is what extract_mesh does), we caught this code error when using the same MeshSummary generation logic with data in which identical inputs were likely to be present.
Failure Case
Previously, it was possible (albeit unlikely) to generate an inconsistent
MeshSummary
from a learned deep support convex network. In theextract_mesh
function, a mesh is generated by querying a multitude of directions and obtaining their corresponding support points. If any of the returned support points were redundant with one another, the resultingMeshSummary.vertices
attribute would contain all of these redundant vertices (insupport_points
), but itsfaces
attribute would reference indices of a different list of non-redundant vertices (invertices
).Solution
The simple fix is to store the list of non-redundant vertices in the
MeshSummary.vertices
attribute instead of the original list of possibly redundant vertices.Discovery
While it is extremely unlikely to obtain the exact same output from a neural network given different inputs (which is what
extract_mesh
does), we caught this code error when using the sameMeshSummary
generation logic with data in which identical inputs were likely to be present.