8000 GitHub - iszihan/stochastic-preconditioning
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

iszihan/stochastic-preconditioning

Repository files navigation

Stochastic Preconditioning for Neural Field Optimization [Siggraph 2025]

Selena Ling, Merlin Nimier-David, Alec Jacobson, Nicholas Sharp
ACM Transaction on Graphics (Proceedings of SIGGRAPH North America 2025)

Stochastic preconditioning adds spatial noise to query locations during neural field optimization; it can be formalized as a stochastic estimate for a blur operator. This simple technique eases optimization and significantly improves quality for neural fields optimization, matching or outperforming custom-designed policies and coarse-to-fine schemes.

Get started

You can set up a conda environment with all dependencies like so:

conda create --name stcp python=3.8
conda activate stcp
python -m pip install --upgrade pip
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
pip install -r requirements.txt

Adding stochastic preconditioning to your training code is easy!

You probably don't even need to run this repo to try adding our method. Look here for the few lines of code you need for adding stochastic preconditioning.

For example,


class Model(nn.Module):
    def __init__(self):
        ...
        
    def forward(self, coord):
        if self.stochastic_preconditioning_enabled:
            noise = self.alpha * torch.normal(torch.zeros_like(coords[0]), torch.ones_like(coords[0]))
            coord = coord + noise
            # reflect around boundary as described in paper Section 4.1 
            coords = coords % 2 
            coords[coords>1] = 2 - coords[coords>1]
        output = self.net(coord)
        return output

SDF from Oriented Point Cloud Experiment

We provide code for the SDF fitting from Oriented Point Cloud experiment as described in Section 5.1.1.

For this experiment, we show benefits with a variety of neural field representations:

Hash Grid Encoding

Run train_hashgrid.sh for training with hash grid encoding without and with stochastic preconditioning.

Fourier Feature Encoding

Run train_fourier.sh for training with fourier feature encoding without and with stochastic preconditioning:

Triplane-based Feature Encoding

Run train_pet.sh for training with triplane-based feature encoding without and with stochastic preconditioning:

Sinusoidal INR (FINER)

Run train_finer.sh for training with FINER network without and with stochastic preconditioning.

The training scripts above always extract a mesh at the end of training.

Credits

This repo is built from existing codes from Siren, SDFStudio, PET-NeuS and FINER. We thank the maintainers for their contribution to the community!

Contact

If you have any questions, please feel free to email the authors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0