• Stars
    star
    220
  • Rank 180,392 (Top 4 %)
  • Language
    Python
  • Created about 4 years ago
  • Updated almost 3 years ago

Reviews

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

Repository Details

Code for "MeshSDF: Differentiable Iso-Surface Extraction", NeurIPS2020, SpotLight

MeshSDF

This is a PyTorch implementation of the NeurIPS'20 SpotLight paper "MeshSDF: Differentiable Iso-Surface Extraction". You can find the paper here.

Installation

To get started, simply clone the repo and run the setup bash script, which will take care of installing all packages and dependencies.

git clone https://github.com/cvlab-epfl/MeshSDF.git
cd MeshSDF
./setup.sh

Data

In our project, we store data according to the following structure:

data/
  <dataset_name>/
      samples/
          <instance_name>.npz
      meshes/
          <instance_name>.obj
      renders/
          <instance_name>/
              00.png
              ...
              rendering_metadata.txt

We provide pre-processed and subsampled ShapeNet data for cars and chairs to get you started. Simply download it and unzip it in the data/ folder to get going.

In case you are interested in using different data, below we detail how to obtain and pre-process the ShapeNet data we used in our project. Do not forget to cite the authors of the respective papers if you find this data useful for your research.

Mesh data

We use data from ShapeNetCore.v1. Specifically, we use cleaned surface meshes from here. Please refer to their repo to download ShapeNetCore.v1 clean models.

SDF data

Once you have downloaded cleaned ShapeNetCore.v1 models, we generate SDF training data using the pre-processing script from DeepSDF. Please refer to their repo for more info on how to generate SDF samples.

Image data

We use rendered ShapeNetCore.v1 models from DISN. Please refer to their repo for more info on how to generate synthetic renders.

Differentiable iso-surface extraction

We show how to backpropagate gradient information from mesh vertices to latent vector while modifying surface mesh topology through a simple toy-experiment.

As an example of a loss function defined on an explicit surface mesh, we consider silhouette distance, obtained through differentiable rasterization. For this experiment, we consider a dataset consisting of two shapes, bob, a genus-1 rubber duck, and spot, a genus-0 cow.

To get started, first learn a deep signed distance function representation for this dataset by running

python train_deep_sdf.py -e experiments/bob_and_spot

You can then exploit our differentiability result to minimize silhouette distance between spot and bob

python demo_optimizer.py -e experiments/bob_and_spot/

In our paper, we also propose an heuristic to accelerate iso-surface extraction when performing optimization in an iterative fashion, which results in a noticeable speed-up. You can use our heuristic by running

python demo_optimizer.py -e experiments/bob_and_spot/ --fast

Single-view reconstruction

You can train a SVR model for cars by running

python train_svr.py -e experiments/cars_svr/

Once the model is trained, you can run silhouette based refinement, as presented in our work, by running

python reconstruct_svr.py -e experiments/cars_svr/

Finally, to gather results and compute metrics, run

python metrics_svr.py -e experiments/cars_svr/

Cite us

If you find MeshSDF useful for your research, please cite our paper:

@inproceedings{remelli2020meshsdf,
 author = {Remelli, Edoardo and Lukoianov, Artem and Richter, Stephan and Guillard, Benoit and Bagautdinov, Timur and Baque, Pierre and Fua, Pascal},
 booktitle = {Advances in Neural Information Processing Systems},
 editor = {H. Larochelle and M. Ranzato and R. Hadsell and M. F. Balcan and H. Lin},
 pages = {22468--22478},
 publisher = {Curran Associates, Inc.},
 title = {MeshSDF: Differentiable Iso-Surface Extraction},
 url = {https://proceedings.neurips.cc/paper/2020/file/fe40fb944ee700392ed51bfe84dd4e3d-Paper.pdf},
 volume = {33},
 year = {2020}
}

More Repositories

1

gaussian-splatting-web

TypeScript
536
star
2

LIFT

Code release for the ECCV 2016 paper
Python
485
star
3

disk

Disk code release
Python
303
star
4

EPnP

EPnP: Efficient Perspective-n-Point Camera Pose Estimation
MATLAB
263
star
5

tf-lift

Tensorflow port of LIFT (ECCV 2016), with training code.
Python
196
star
6

segmentation-driven-pose

Segmentation-driven 6D Object Pose Estimation. CVPR 2019.
Python
184
star
7

MeshUDF

Fast and Differentiable Meshing of Unsigned Distance Field Networks
Cython
136
star
8

voxel2mesh

Voxel2Mesh: 3D Mesh Model Generation from Volumetric Data
Python
113
star
9

single-stage-pose

Single-Stage 6D Object Pose Estimation, CVPR 2020
Python
104
star
10

sketch2mesh

Reconstructing and Editing 3D Shapes from Sketches
Python
78
star
11

Power-Iteration-SVD

Backpropagation-Friendly-Eigendecomposition
Python
72
star
12

pyKSP

This is a Python wrapper for the K-Shortest Path tracking algorithm.
C++
66
star
13

social-scene-understanding

Source code for the CVPR 2017 paper
Python
63
star
14

wide-depth-range-pose

Wide-Depth-Range 6D Object Pose Estimation in Space, CVPR 2021
Python
61
star
15

log-polar-descriptors

Public implementation of "Beyond Cartesian Representations for Local Descriptors", ICCV 2019
Jupyter Notebook
60
star
16

detecting-the-unexpected

Detecting the Unexpected via Image Resynthesis
Python
56
star
17

balltracking

Tracking of the ball and the players in team sports
MATLAB
46
star
18

perspective-flow-aggregation

Perspective Flow Aggregation for Data-Limited 6D Object Pose Estimation. ECCV 2022.
Python
38
star
19

LabelGrab

Annotation tool for semantic and instance segmentation, with automated help from the GrabCut implemented in OpenCV.
Python
28
star
20

densecrf

a fork of the densecrf package implementing alternative inference scheme
C++
27
star
21

multiview_calib

Single and multiple view camera calibration tool
Jupyter Notebook
26
star
22

deepdesc-release

Code for the ICCV 2015 paper "Discriminative Learning of Deep Convolutional Feature Point Descriptors"
Lua
25
star
23

adv_param_pose_prior

Adversarial Parametric Pose Prior
Python
23
star
24

multicam-gt

Our Webapp to annotate multi-camera pedestrian detection datasets.
JavaScript
20
star
25

diff-nrsfm

MATLAB
18
star
26

cvlab-kubernetes-guide

Instructions and utilities for use of EPFL's compute cluster.
Python
15
star
27

MVFlow

Python
13
star
28

iter_unc

Official code for "Enabling Uncertainty Estimation in Iterative Neural Networks" (ICML 2024)
Jupyter Notebook
12
star
29

gecco

Code release for GECCO: Geometrically-Conditioned Point Diffusion Models
Python
11
star
30

zigzag

Official code for "ZigZag: Universal Sampling-free Uncertainty Estimation Through Two-Step Inference" (TMLR 2024)
Jupyter Notebook
10
star
31

PA-net

Probabilistic Atlases to Enforce Topological Constraints
Python
9
star
32

mot3d

Fast Single View and Multiview Multi Object Tracking Using Minimum Cost Maximum Flow Formulation
Jupyter Notebook
7
star
33

MVAug

Python
7
star
34

erasing-road-obstacles

Detecting Road Obstacles by Erasing Them
6
star
35

UCLID-Net

Implementation of UCLID-Net (NeurIPS 2020)
Python
5
star
36

n-queens-benchmark

C++
3
star
37

mf-mrf

Parallel mean-field inference web page
HTML
2
star
38

MARMOT

Multi-Aspect Reconstruction and Multi-Object Tracking
Jupyter Notebook
1
star
39

MAGE

Multi-Aspect Groundplane Estimation
Python
1
star
40

UDA-Hand-Object

Unsupervised Domain Adaptation with Temporal Consistency for 3D Joint Hand-Object Reconstruction
Python
1
star