This is an implementation of a Implicit Neural Representations with Periodic Activation Functions in C++ and Vulkan. The SIREN (Sinusoidal Representation Networks) model enables the representation of complex signals and shapes using periodic activation functions.
- C++ Compiler (C++17 or higher)
- Vulkan SDK
make
To train a neural SDF, run the following command:
./neural_sdf --train -i <input.obj> -n <layers> -s <layer_size> -o <out_weights>
Note: The input mesh must be watertight and triangulated before training.
The weights are saved in a float array in sequence by layers (float[3]
3D point and the output is a scalar float
distance to surface. Activation function for all layers is sin(
To render using the trained weights, run:
./neural_sdf --render -m <path_to_weights> -n <layers> -s <layer_size>
Example usage:
./neural-sdf --render -m data/sdf1_weights.bin -n 2 -s 64
Rendered image will be saved in the output
directory.
This project is licensed under the MIT License - see the LICENSE file for details.
SIREN: Implicit Neural Representations with Periodic Activation Functions - Link