Git Product home page Git Product logo

csg_on_nsdf's Introduction

Constructive Solid Geometry on Neural Signed Distance Fields

image

This code accompnies the paper "Constructive Solid Geometry on Neural Signed Distance Fields" by Zoë Marschner, Silvia Sellán, Derek Liu, and Alec Jacobson.

Installation

Create a virtual enviroment if desired, then install the dependencies (matplotlib and pytorch):

pip3 install torch
pip3 install matplotlib

Matplotlib is only needed for visualization, so if you want to train the model on a seperate device with a GPU, you will only need to install pytorch there.

Running

To train networks for example CSG and SV problems, run either ex_csg.py or ex_sv.py—you will likely want to train these on a GPU. The results of these are also precomputed, and can be found in the models/ and data/ folders. Results can be visualized using viz_ex.py. For example, run either:

python3 viz_ex.py swept_star -1.05 2.05 -0.9 2.2
python3 viz_ex.py circle_square_union

to visualize the precomputed results! (adding -s as an argument at the end of these commands will save the resulting images).

Organization

The core contribution of our paper is the losses defined in nsdf_csg_losses.py, where you will find the closest point loss and the editing losses.

Coming Soon

Check back soon for additional examples, including 3D examples!

csg_on_nsdf's People

Contributors

zoemarschner avatar

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.