Coder Social home page Coder Social logo

nerf-meta's Introduction

NeRF Meta Learning With PyTorch

nerf-meta is a PyTorch re-implementation of NeRF experiments from the paper "Learned Initializations for Optimizing Coordinate-Based Neural Representations". Simply by initializing NeRF with meta-learned weights, we can achieve:

Be sure to check out the original resources from the authors:

Environment

  • Python 3.8
  • PyTorch 1.8
  • NumPy, imageio, imageio-ffmpeg

Photo Tourism

Starting from a meta-initialized NeRF, we can interpolate between camera pose, focal length, aspect ratio and scene appearance. The videos below are generated with a 5 layer only NeRF, trained for ~100k iterations.

BrandenburgGate.mp4
TreviFountain.mp4

Data

Train and Evaluate

  1. Train NeRF on a single landmark scene using Reptile meta-learning:
    python tourism_train.py --config ./configs/tourism/$landmark.json
  2. Test Photo Tourism performance and generate an interpolation video of the landmark:
    python tourism_test.py --config ./configs/tourism/$landmark.json --weight-path $meta_weight.pth

View Synthesis from Single Image

Given a single input view, meta-initialized NeRF can generate a 360-degree video. The following ShapeNet video is generated with a class-specific NeRF (5 layers deep), trained for ~100k iterations.

ShapeNet.mp4

Data

Train and Evaluate

  1. Train NeRF on a particular ShapeNet class using Reptile meta-learning:
    python shapenet_train.py --config ./configs/shapenet/$shape.json
  2. Optimize the meta-trained model on a single view and test on other held-out views. It also generates a 360 video for each test object:
    python shapenet_test.py --config ./configs/shapenet/$shape.json --weight-path $meta_weight.pth

Acknowledgments

I referenced several open-source NeRF and Meta-Learning code base for this implementation. Specifically, I borrowed/modified code from the following repositories:

Thanks to the authors for releasing their code.

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.