/sdf_playground

Research Signed Distance Functions

Primary LanguageJupyter Notebook

SDF with NN


The task is to simulate the SFD function for transforming the mesh 3D data format into the SFD.


Input data (mesh)

Chair Cube
Alt text Alt text
Pyramid Teddy
Alt text Alt text

I used fully-connected and convolutional neural networks to model SDF functions for input data.

Models:

  • Net7 - NN with with seven fully-connected layers
  • Net12 - NN with with twelve fully-connected layers
  • ConvNet - NN with with three convolutional layers
  • ConvNet2 - NN with with six convolutional layers

Below comparison is the result of training four models for four input mesh figures.

Cube Mesh Pyramid Mesh Teddy Mesh Chair Mesh
Alt text Alt text Alt text Alt text
SDF heat map for Cube SDF heat map for Pyramid SDF heat map for Teddy SDF heat map for Chair
Alt text Alt text Alt text Alt text
Net7 output for Cube Net7 output for Pyramid Net7 output for Teddy Net7 output for Chair
Alt text Alt text Alt text Alt text
Net12 output for Cube Net12 output for Pyramid Net12 output for Teddy Net12 output for Chair
Alt text Alt text Alt text Alt text
CNN output for Cube CNN output for Pyramid CNN output for Teddy CNN output for Chair
Alt text Alt text Alt text Alt text
CNN2 output for Cube CNN2 output for Pyramid CNN2 output for Teddy CNN2 output for Chair
Alt text Alt text Alt text Alt text

Conclusions:

  • Even the simplest fully-connected models with a small number of layers are able to simulate SFD functions.
  • One-dimensional convolution is an effective method for this task. Even without normalization, it describes the mesh well, and the weight of the model is less than the mesh file.
  • After a large number of experiments, such models will describe mesh objects well using less resources.
  • This is a great area for research ;)

TODO:

  • Improve loss func (e.g. from DeepSDF)
  • Improve visualization
  • Parallelize inference models
  • More convolution network experiments
  • Add nn.BatchNorm1d
  • Use a model for group mesh objects
  • Etc