Tensorflow implementation of optimizing a neural representation for a single scene and rendering new views.
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
Ben Mildenhall*1,
Pratul P. Srinivasan*1,
Matthew Tancik*1,
Jonathan T. Barron2,
Ravi Ramamoorthi3,
Ren Ng1
1UC Berkeley, 2Google Research, 3UC San Diego
*denotes equal contribution
Python 3 dependencies:
- Tensorflow 1.15
- matplotlib
- numpy
- imageio
- configargparse
The LLFF data loader requires ImageMagick.
You will also need the LLFF code (and COLMAP) set up to compute poses if you want to run on your own real data.
Run
bash download_example_data.sh
to get the our synthetic Lego dataset and the LLFF Fern dataset. To optimize a low-res Fern NeRF:
python run_nerf.py --config config_fern.txt
To optimize a low-res Lego NeRF:
python run_nerf.py --config config_lego.txt
Run
bash download_example_weights.sh
to get a pretrained high-res NeRF for the Fern dataset. Now you can use the render_demo.ipynb
to render new views.