NewsCrawler.org

Neural SDF: approximating a 3D model's distance field with a small neural network

Neural SDF
Neural SDF: approximating a 3D model's distance field with a small neural network
Neural SDF: approximating a 3D model's distance field with a small neural network
Neural SDF: approximating a 3D model's distance field with a small neural network
Image: zenn.dev

The author, an engineer at WOGO, implemented a Neural SDF, which represents a signed distance field (SDF)[1] with a neural network. An SDF stores, for each point in space, the distance to the nearest surface, with a plus sign outside the object and a minus sign inside. The network has fully connected layers of 3→64→64→64→1, with 8,641 parameters, about 34 KB in total. For comparison, a float voxel grid of 64³ takes about 1 MB, and one of 256³ takes about 64 MB.

The example uses the Stanford Bunny. A BVH[2] narrows the triangles that must be checked for each cell; for about 70,000 faces, a 1024×1024 slice took about 60 ms on an NVIDIA GeForce RTX 5070 Laptop GPU. Flood fill[3] marks inside and outside cells, and boundary cells are set to 0. The model was trained on all cells of a 64×64×64 grid for 1000 epochs with the Adam optimizer at a learning rate of 0.001, on the CPU through LibTorch, and the result was turned into a polygon mesh with Marching Cubes[4].

The author says the accuracy was better than expected for such simple code. To improve it, the author suggests fixing the resolution-dependent inside/outside test in Flood fill, keeping distance information near the surface (boundary cells set to 0 currently lose it), and giving more training cells near the mesh and fewer elsewhere. The gaps in the surface are attributed to a coarse Marching Cubes implementation built around the Stanford Bunny's bounding box.

Read the original zenn.dev

Sources

  • Zenn JA

    Neural SDF

    11 likes1 bookmark0 comments

Published: First seen: Читать по-русски

Open as a page