Giter Site home page Giter Site logo

facebookresearch / neuralpassthrough Goto Github PK

View Code? Open in Web Editor NEW
92.0 8.0 20.0 1.1 MB

This repository provides source code, trained neural network model and dataset for our NeuralPassthrough work that is published at SIGGRAPH 2022.

License: MIT License

Python 100.00%

neuralpassthrough's Introduction

NeuralPassthrough

plot

Introduction

This repository provides source code, trained neural network model and dataset for our NeuralPassthrough work that is published at SIGGRAPH 2022. Note that the provided code is its Python implementation version, prior to customized real-time inference optimization in C++.

If you use this code, model or dataset, please cite the publication:
Lei Xiao, Salah Nouri, Joel Hegland, Alberto Garcia Garcia, and Douglas Lanman. "NeuralPassthrough Learned Real-Time View Synthesis for VR". ACM SIGGRAPH 2022.

Installation

The code has been tested with Anaconda 3 on Windows 10.

  1. Download third-party code.
    Please download RAFT-Stereo, and place the unzipped files under /code/third_party/RAFT_Stereo/. For example, the /core subfolder in the original RAFT-Stereo repo should be /code/third_party/RAFT_Stereo/core/. Please follow the instructions in the original RAFT-Stereo repo to set the code up, although you don't need to download any training or test dataset.

    A few changes about the relative paths in the RAFT-Stereo code are required for NeuralPassthrough to call their functions correctly. Specifically, in the file /code/third_party/RAFT_Stereo/core/raft_stereo.py and /code/third_party/RAFT_Stereo/core/corr.py, please remove core from all the lines like from core.xxx import xxx. For example, change from core.utils.utils import bilinear_sampler to from .utils.utils import bilinear_sampler.

    Please download their pretrained models and place them under /third_party/RAFT_Stereo/models/. For example, the model used in our NeuralPassthrough implementation should be /third_party/RAFT_Stereo/models/raftstereo-realtime.pth.

    Our method also use the softmax splatting code that can be found here. The code was minorly edited and included in our repo (i.e. /code/softsplat.py) for convenience. You don't need to download it from its original repo.

  2. Download dataset.
    The dataset is stored as a Git LFS file at /data/test.zip. Please make sure it's downloaded correctly (1.85GB). Unzip it and place its subfolders under /data/test/. For example, the /real subfolder should be /data/test/real/.

  3. Create Conda environment.
    In your Conda terminal, run the following commands to set up the Conda environment.
    conda env create -f environment.yaml
    conda activate neuralpassthrough

  4. Run.
    You should be able to run the code now. In your Conda terminal, go to folder /code. The entry files for testing with real captured examples and rendered synthetic exapmles are test_prototype.py and test_synthetic.py respectively. For example, you can run python test_prototype.py.

    You can change the specific test scenes in these files (e.g. look for "select scene" in the code). The output images will be saved to a new folder automatically created under the root directory.

License

NeuralPassthrough is MIT licensed, as found in the LICENSE file.

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.