Style transfer for neural radiance fields, based on a PyTorch Lightning implementation and official PyTorch implementation of fast neural style transfer.
Download nerf_synthetic.zip
from here and extract the content under ./datasets
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.
You can download the pretrained models and training logs in release.
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.
- 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.