
NeRF
Research code that trains a small neural network on photos of one scene to render new viewpoints.
- Stars
- 11k
- Forks
- 1.4k
- Licence
- MIT
- Language
- Jupyter Notebook
- Last update
- 1.6 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
This is the official code release for NeRF, a 2020 research method. You give it photos of a single scene taken from known camera positions, and it trains a small neural network that can then render views of that scene from angles that were never photographed. People use it to study or reproduce view synthesis research, or to experiment with building 3D-like scenes from ordinary images.
- Train a low-resolution NeRF on the included Fern or Lego example scenes
- Render new camera views of a trained scene using the render_demo notebook
- Extract a triangle mesh from a trained network with the extract_mesh notebook
- Train on your own real-world scene after computing camera poses with LLFF and COLMAP
Great for
- Researchers reproducing the NeRF paper results
- Students learning how neural radiance fields work
- Developers who already work with TensorFlow and a GPU
- People experimenting with their own posed photo sets
Not ideal for
- Non-technical users wanting a point-and-click app: the project is command-line Python code with no GUI described in the README
- Anyone without a GPU, since the README says training needs a single GPU and takes hours to a day or two
- Users needing a production-ready product: the README describes it as research code
How to get it
- 1
Clone and build from source
You'll need: Python 3 · conda · TensorFlow 1.15 (installed via environment.yml) · ImageMagick (needed by the LLFF data loader) · A single GPU for practical training
Clone the repository
git clone https://github.com/bmild/nerfCreate the conda environment
conda env create -f environment.ymlActivate the environment
conda activate nerfDownload example training data
bash download_example_data.sh - 2
Run it
- Run the setup commands to create the nerf conda environment and download example data.
- Start training the Fern scene with: python run_nerf.py --config config_fern.txt
- Optionally launch TensorBoard with: tensorboard --logdir=logs/summaries --port=6006 and open localhost:6006 to watch training.
- Find the rendered video in logs/fern_test/ once training reaches the target iteration count.
- 3
Get the most out of it
- Run bash download_example_weights.sh to get a pretrained high-res Fern NeRF and try render_demo.ipynb
- Start from the configs in paper_configs/ to replicate the paper's higher-resolution results
- Use extract_mesh.ipynb with PyMCubes, trimesh, and pyrender to turn a trained NeRF into a mesh
- Use LLFF's imgs2poses.py to generate poses for your own forward-facing or 360 scenes, adding --no_ndc --spherify --lindisp for spherical captures
Downloads
Strengths
- Official, well-known reference implementation of a influential paper
- Includes example data, config files, and Jupyter notebooks for rendering and mesh extraction
- Released under the permissive MIT license
Trade-offs
- Built on TensorFlow 1.15, an old version that may be hard to install on modern systems (based on the README's stated requirement)
- Full-quality results need long training runs; the README says 200k iterations takes about 15 hours for Fern
- Custom data requires extra tools (LLFF, COLMAP, ImageMagick) and pose setup
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.