• Stars
    star
    116
  • Rank 302,148 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 2 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Official code repository for the paper: “GenSDF: Two-Stage Learning of Generalizable Signed Distance Functions”

GenSDF: Two-Stage Learning of Generalizable Signed Distance Functions

Paper | Supplement | Project Page | Teaser

promo_gif

This repository contains the official implementation of
GenSDF: Two-Stage Learning of Generalizable Signed Distance Functions
Gene Chou, Ilya Chugunov, Felix Heide
NeurIPS 2022

If you find our code or paper useful, please consider citing

@inproceedings{chou2022gensdf,
title={GenSDF: Two-Stage Learning of Generalizable Signed Distance Functions},
author={Chou, Gene and Chugunov, Ilya and Heide, Felix},
booktitle={Proc. of Neural Information Processing Systems (NeurIPS)},
year={2022}
}

Additionally, this repository is designed for reproduction and incorporation of SDF and Occupancy methods. Currently includes GenSDF, DeepSDF, Convolutional Occupancy Networks, and NeuralPull. Note that these methods except for GenSDF are not necessarily optimized and may require minor tweaks (e.g., hyperparameter changes) for optimal performance; we encourage users to validate with original implementations. We provide links and references below.

SDF lib
  ├── config  
  │   └── // folders for checkpoints and training configs
  ├── data  
  │   └── // folders for data; in csv format
  ├── model  
  │   ├── gensdf
  │   │   └── model.py
  │   ├── deepsdf
  │   │    └── model.py 
  │   ├── archs
  │   │    └── encoders
  │   │        └── // pointnet, auto-decoder...etc
  │   │    └── decoders
  │   │        └── // 8-layer MLP, SIREN...etc
  │   └── ... // add your own models
  ├── dataloader  
  │   └── // dataloaders for labeled and unlabeled data are provided
  ├── utils  
  │   └── // scripts for reconstruction and evaluation
  ├── environment.yml  // package requirements
  ├── train.py  // script for training; change dataloader here
  ├── test.py  // script for testing given a defined testing dataloader
  └── test_single.py  // script for testing given a single input point cloud
  

Installation

We recommend creating an anaconda environment using our provided environment.yml:

conda env create -f environment.yml
conda activate sdf

Note: you might need to install torch-scatter manually following the official instruction:

pip install torch-scatter

Demo (for GenSDF)

Run test_single.py. Load a point cloud in csv format (see data/acronym) or ply format (see data/ycb) and visualize reconstructions.

# give file path and output directory
python test_single.py -f data/acronym/Bear/52f9a230c400bddd55330ea4156a425f/sdf_data.csv -o . 

Dataset

For training, we first recenter and normalize input data. We also apply these steps for an input point cloud in test_single.py. See supplement for an explanation. For training, we preprocess all files and store results in csv format. Each csv file corresponds to one object, and each line represents a coordinate followed by its signed distance value. See data/acronym for examples.

For labeled data (i.e., meshes), we recommend first recentering and normalizing the object, then sampling point clouds and query points. The ground truth signed distance values for all points can be calculated from the mesh and stored into csv files.

We train using the Acronym dataset. Place your dataset in the data folder following the current structure, and provide the train/test split in the config spec files.

Training

We provide pretrained models for GenSDF. Users are also welcome to train from scratch using the following commands

python train.py -e config/gensdf/semi -b 64 -r last  # remove -r to train from scratch
python train.py -e config/deepsdf -b 64 -w 12        # -b for batch size, -w for workers

Feel free to modify specs.json files in config. One can also mix and match encoders and decoders that are provided.

Testing

For testing single objects, see the Demo section above. For testing on multiple objects, define a dataloader and run the test.py file

python test.py -e config/gensdf/semi -r last 

References

We adapt code from
DeepSDF: https://github.com/facebookresearch/DeepSDF
Convolutional Occupancy Networks: https://github.com/autonomousvision/convolutional_occupancy_networks
NeuralPull: https://github.com/bearprin/neuralpull-pytorch/tree/history-2

More Repositories

1

Diffusion-SDF

Official code repository for the paper: “Diffusion-SDF: Conditional Generative Modeling of Signed Distance Functions”
Python
228
star
2

SeeingThroughFog

Python
214
star
3

neural-scene-graphs

Python
164
star
4

Delta-Prox

Official code repository for ∇-Prox: Differentiable Proximal Algorithm Modeling for Large-Scale Optimization (SIGGRAPH TOG 2023)
Python
74
star
5

HNDR

Official code repository for the paper: "The Implicit Values of A Good Hand Shake: Handheld Multi-Frame Neural Depth Refinement"
Jupyter Notebook
63
star
6

DirtyPixels

Python
62
star
7

neural-point-light-fields

Jupyter Notebook
48
star
8

SoaP

Official code repository for the paper: "Shakes on a Plane: Unsupervised Depth Estimation from Unstabilized Photography"
Jupyter Notebook
33
star
9

NLOSFeatureEmbeddings

Python
30
star
10

Gated2Gated

Python
28
star
11

doppler_nlos

Jupyter Notebook
18
star
12

LITL-Optimization

Jupyter Notebook
14
star
13

MaskToF

Official code repository for the paper: "Mask-ToF: Learning Microlens Masks for Flying Pixel Correction in Time-of-Flight Imaging"
Jupyter Notebook
14
star
14

PolLidar

9
star
15

CheapSPAD

Python
8
star
16

SeeThroughObstructions

Jupyter Notebook
6
star
17

allyouneedisraw

Python
6
star
18

GHz-ToF

Official code repository for the paper: "Centimeter-Wave Free-Space Neural Time-of-Flight Imaging"
Python
4
star
19

seeingwithsound

SCSS
4
star
20

Neural-Volume-Super-Resolution

Python
3
star
21

Mitsuba2_Plenoptic_Probing

Mitsuba2 renderer extensions for light transport probing in polarization, direction, and time
C++
1
star
22

hogel-free-holography

1
star
23

holotorch_public

1
star
24

NeuLS

Official code repository for the paper "Neural Light Spheres for Implicit Image Stitching and View Synthesis"
1
star