Git Product home page Git Product logo

stylenerf's Introduction

styleNeRF

Style transfer for neural radiance fields, based on a PyTorch Lightning implementation and official PyTorch implementation of fast neural style transfer.

Download the blender dataset

Download nerf_synthetic.zip from here and extract the content under ./datasets

Train the model

From the command line:

python train.py --dataset_name blender --root_dir $BLENDER_DIR --N_importance 64 --img_wh 400 400 --noise_std 0 --num_epochs 20 --batch_size 1024 --optimizer adam --lr 5e-4 --lr_scheduler cosine --exp_name exp

Add --encode_a for appearance embedding, --encode_t for transient embedding.

You can monitor the training process by tensorboard --logdir runs and go to localhost:6006 in your browser.

Pretrained models and logs

You can download the pretrained models and training logs in release.

Testing

Use eval.py to create the whole sequence of moving views. E.g.

python eval.py \
   --root_dir $BLENDER \
   --dataset_name blender --scene_name lego \
   --img_wh 400 400 --N_importance 64 --ckpt_path $CKPT_PATH

It will create folder results/{dataset_name}/{scene_name} and run inference on all test data, finally create a gif out of them.

nerf-u

Notes on differences with the paper

  • Current base MLP uses 8 layers of 256 units as the original NeRF, while NeRF-W uses 512 units each.
  • Current static head uses 1 layer as the original NeRF, while NeRF-W uses 4 layers.
  • Softplus activation for sigma (reason explained here) while NeRF-W uses relu.

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.