Giter Site home page Giter Site logo

ouasfi / fs-sdf Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 4.31 MB

[ECCV'22] "Few 'Zero Level Set'-Shot Learning of Shape Signed Distance Functions in Feature Space"

Python 100.00%
3d 3d-reconstruction deep-learning eccv2022 neuralfields point-cloud surface-reconstruction implicit-neural-representation

fs-sdf's Introduction

Few 'Zero Level Set'-Shot Learning of Shape Signed Distance Functions in Feature Space

Amine Ouasfi, Adnane Boukhayma.
ECCV 2022

Install

Please follow the instructions detailed in IF-Net. Then, install the required packages for this project by running:

pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html

Demo (New)

To run our pretrained model on your own shapes, place them in a directory and create a .lst file containing your file names. Then run ,

python demo.py -data_path [path to your data directory]  -exp <exp_name> -checkpoint <checkpoint> -inner_steps 5  -pc_samples 3000 -res 128 -batch_size 8 -save_path gen_dir/

where res is the resolution of the encoder's grid and exp_name is the path to the folder containing the trained model checkpoints.

Data Preparation

The data preparation process is the same as in IF-Net.

To generate ground truth Signed distance values instead of occupancies run:

python data_processing/boundary_sampling_sdf.py -sigma 0.1
python data_processing/boundary_sampling_sdf.py -sigma 0.01

Training

To start a training please run the following command:

python train.py -res 128 -pc_samples 3000 -epochs 100 -inner_steps 5 -batch_size 8

You can add the following options -p_enc and _p_dec to initialize the encoder and/or the decoder with a pretrained model. Also, you can freeze the encoder during the training by adding the option -freeze to your command.

Generation

The command:

python generate.py -res 128 -pc_samples 3000 -batch_size 8 -inner_steps 5 -exp <exp_name> -checkpoint <checkpoint>  

Where exp_name is the path to the folder containing the trained model checkpoints.

Evaluation

The evaluation process is the same as in IF-Net.

Pretrained Models

Pretrained models can be found here.

Contact

For questions and comments regarding the code please contact Amine Ouasfi via mail. (See Paper)

fs-sdf's People

Contributors

boukhayma avatar ouasfi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

gvkr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.