GithubHelp home page GithubHelp logo

sanowar-raihan / meta-neus Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 15 KB

Meta-Learning for Neural Implicit Surface of Object Categories

License: MIT License

Python 100.00%
3d-reconstruction meta-learning view-synthesis signed-distance-fields

meta-neus's Introduction

MetaNeuS: Meta-Learning for Neural Implicit Surface of Object Categories

MetaNeuS uses Meta-Learning to learn a template shape of an object category from a database of multiview images. This category template is encoded in the weights of the network as a signed distance function(SDF). Starting from this meta-learned template, we can quickly reconstruct a novel object at test time using a small number of views.

This project builds on the NeurIPS'21 paper "NeuS: Learning Neural Implicit Surfaces by Volume Rendering for Multi-view Reconstruction". NeuS is a scene-specific method that requires a large number of multiview inputs. This work extends NeuS using meta-learning to handle unseen objects at test time, and also enables sparse view 3d reconstruction.

MetaNeuS.mp4

Initializing with meta-learned weights also allows other applications like:

Geometry Interpolation

NeuS already disentangles the geometry and appearance of an object into two separate networks. However, when the optimization starts from a standard initialization, weight space interpolation doesn't produce any meaningful result. But when it starts from a meta-learned initialization, we can interpolate the object geometry by interpolating the weights of the SDF network (while keeping the appearance constant).

Geometry-Interpolation.mp4

Appearance Interpolation

Similarly, with meta-initialized networks, we can interpolate the object appearance by interpolating the weights of the color network while keeping the geometry fixed.

Appearance-Interpolation.mp4

Usage

Environment

  • Python 3.8
  • PyTorch 1.9
  • NumPy, PyMCubes, imageio, imageio-ffmpeg

Data

Download the dataset from this drive link. This is a modified version of the learnit dataset; I have normalized the scenes such that the objects are located inside a unit sphere.

Train

Train the NeuS model on a particular ShapeNet class with meta-learning:

python train.py --config ./configs/$class.json

Evaluate

Optimize the meta-trained model on sparse views of unseen objects and report test results on held-out views:

python test.py --config ./configs/$class.json --meta-weight META_WEIGHT_PATH

It also saves the scene weights, the extracted 3D mesh and a 360-degree video for each test object in the ./results directory.

Interpolation

Interpolate the geometry or appearance of two test objects:

python interpolate.py --config ./configs/$class.json --first-weight FIRST_PATH --second-weight SECOND_PATH --property PROPERTY

It will generate an interpolation video in the ./results directory. Here FIRST_PATH / SECOND_PATH is the path to the weight file for any two test objects. PROPERTY is the property to interpolate, either geometry or appearance.

Acknowledgments

I have used the following repositories as a reference for this implementation:

Thanks to the authors for releasing their code!

meta-neus's People

Contributors

sanowar-raihan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.