Learning and Meshing From Deep Implicit Surface Networks Using an Efficient Implementation of Analytic Marching

Jiabao Lei, Kui Jia, Yi Ma

This paper introduces Analytic Marching, an algorithm that exactly recovers surface meshes from deep implicit networks (like ReLU-based MLPs) without the discretization errors inherent in traditional methods. By leveraging the inherent local linearity of ReLU networks, it identifies the precise geometric faces captured by the model, offering a significant leap in both meshing accuracy and efficiency.

What Problem Does This Paper Address?

Deep learning has revolutionized 3D surface reconstruction through implicit representations like Signed Distance Functions (SDFs) or Occupancy Fields (OFs). While these networks can model complex, smooth surfaces with high fidelity, extracting a usable polygon mesh for downstream applications (like rendering or CAD) usually requires the Marching Cubes algorithm.

Marching Cubes works by sampling the implicit field on a discrete 3D grid. This creates a fundamental "discretization gap": a coarse grid is fast but loses fine details and sharp features, while a fine grid is prohibitively expensive in terms of memory and computation. Essentially, researchers train high-precision continuous models only to degrade their quality during the final meshing step.

Methods

The authors propose Analytic Marching (AM) to bridge this gap. Their key insight is that a Multi-Layer Perceptron (MLP) using Rectified Linear Unit (ReLU) activations partitions its input space into a set of convex polyhedral regions, or "cells," within which the network's output is purely linear.

Instead of sampling a grid, AM "marches" directly between these analytic cells:

  1. Identify Analytic Cells: The algorithm starts at a point on the surface and identifies the linear region (cell) the network has defined around it.
  2. Extract Analytic Faces: Within each cell, the zero-level set of the linear function is a perfectly planar polygon face.
  3. Marching: The algorithm then moves to adjacent cells by "switching" the activation state of neurons, tracing the entire closed surface.
An illustration of the intrinsic connection between a polygon mesh and the local linearities of its capturing deep implicit surface network.

The paper also introduces AnalyticMesh, a software package that implements this algorithm with CUDA acceleration, enabling parallel marching across multiple surface points simultaneously.

Datasets

The researchers evaluated their method on:

  • ShapeNet: A standard benchmark for 3D objects, specifically using the Rifle, Chair, Airplane, Sofa, and Table categories.
  • Richly Detailed (RD) Dataset: A new collection of five geometrically and topologically complex shapes (e.g., statues, intricate mechanical parts) sourced from the Stanford 3D Scanning Repository, Artec3D, and Free3D to test the limits of the algorithm.

Key Insights and Ideas

  • The "Natural Mapping": There is a mathematical harmony between ReLU MLPs and polygon meshes. Both are piecewise linear. The zero-level isosurface of a ReLU network is a polygon mesh by definition; AM simply finds it.
  • Precision is "Free": Unlike Marching Cubes, where precision depends on grid resolution, AM's precision is limited only by the numerical floating-point accuracy of the network's weights.
  • Complexity Shift: The computational cost of AM scales with the complexity of the network (number of linear regions), not the resolution of the space. This allows for highly detailed reconstructions using relatively small, efficient networks.
  • Neural State as a Map: The activation pattern of neurons (the "neural state") acts as a unique identifier for each analytic cell, making the "marching" process a robust state-transition problem.
2D illustration for analytic cells and neural states. The states of two neighboring cells that share a boundary plane are switched at one neuron.

Key Results

  • Superior Accuracy: AM consistently outperformed Marching Cubes (MC) across metrics like Chamfer Distance (CD) and F-score. Qualitatively, it recovers sharp edges and intricate details that MC often blurs or misses entirely.
  • Efficiency Gains: With CUDA implementation, AM is significantly faster than high-resolution Marching Cubes. For example, it can achieve better accuracy than MC at a $512^3$ resolution while running much faster.
  • Mesh Simplification: Because the "exact" mesh can have millions of tiny faces, the authors integrated Quadric Edge Collapse Decimation (QECD), showing they can reduce face counts by 90% or more with negligible loss in precision.

Limitations and Future Work

  • Network Depth: The number of linear regions grows exponentially with network depth, which could lead to very high face counts for extremely deep architectures.
  • Activation Functions: The current theory is strictly for piecewise linear activations (ReLU, Leaky ReLU, etc.). It does not directly apply to smooth activations like Sine (used in SIREN) or Softplus, though the authors suggest piecewise linear approximations as a potential path forward.
  • Watertightness: While the theory guarantees a closed surface under ideal conditions, numerical noise in learned networks can sometimes lead to non-watertight results, requiring standard post-processing "hole-filling" techniques.

Summary updated

BibTeX
@article{lei2022learning,
  author = {Jiabao Lei and Kui Jia and Yi Ma},
  title = {{Learning and Meshing From Deep Implicit Surface Networks Using an Efficient Implementation of Analytic Marching}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2022},
  url = {https://openreview.net/forum?id=pvKT4OjkSW},
}

Loading related content...

Figure