Coder Social home page Coder Social logo

bruinxiong / neuraltexture Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ssrsgjyd/neuraltexture

0.0 1.0 0.0 59 KB

Unofficial implementation of the paper "Deferred Neural Rendering: Image Synthesis using Neural Textures" in Pytorch.

Python 100.00%

neuraltexture's Introduction

Neural Texture

This repository implements Deferred Neural Rendering: Image Synthesis using Neural Textures .

Requirements

  • Python 3.6+
    • argparse
    • nni
    • NumPy
    • Pillow
    • pytorch
    • tensorboardX
    • torchvision
    • tqdm

File Organization

The root directory contains several subdirectories and files:

dataset/ --- custom PyTorch Dataset classes for loading included data
model/ --- custom PyTorch Module classes
util.py --- useful procedures
render.py --- render using texture and U-Net
render_texture.py --- render from RGB texture or neural texture
train.py --- optimize texture and U-Net jointly
train_texture.py --- optimize only texture
train_unet.py --- optimize U-Net using pretrained 3-channel texture

How to Use

Set up Environment

Install python >= 3.6 and create an environment.

Install requirements:

pip install -r requirements.txt

Prepare Data

We need 3 folders of data:

  • /data/frame/ with video frames .png files
  • /data/uv/ with uv-map .npy files, each shaped (H, W, 2)
  • /data/extrinsics/ with normalized camera extrinsics in .npy files, each shaped (3)

Each frame corresponds to one uv map and corresponding camera extrinsic parameters. They are named sequentially, from 0000 to xxxx .

We demonstrate 2 ways to prepare data. One way is to render training data, the code is at https://github.com/A-Dying-Pig/OpenGL_NeuralTexture. The other way is to reconstruct from real scene, the code is at https://github.com/gerwang/InfiniTAM .

Configuration

Rename config_example.py as config.py and set the parameters for training and rendering.

Train Jointly

python train.py [--args]

Train Texture

python train_texture.py [--args]

Train U-Net

python train_unet.py [--args]

Render by Texture

python render_texture.py [--args]

Render by Texture and U-Net Jointly

python render.py [--args]

neuraltexture's People

Contributors

ssrsgjyd avatar

Watchers

James Cloos 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.