nerf
Code release for NeRF (Neural Radiance Fields)
NeRF is the original research code from UC Berkeley and Google that turns a set of photos of a scene into a trained neural network capable of generating photorealistic views from any new camera angle, a Best Paper runner-up at ECCV 2020.
NeRF (Neural Radiance Fields) is research code released alongside an academic paper from UC Berkeley and Google Research, published at the ECCV 2020 conference where it received a Best Paper Honorable Mention. The project introduces a method for generating new views of a scene from photos taken from different angles, using a neural network trained on those photos.
The core idea is that you give the system a set of photos of the same physical scene taken from various positions. It trains a small neural network (about 5MB in size) that learns to represent that scene in 3D. Once trained, the network can generate a realistic photo from any new camera angle that was never actually photographed. The result is a smooth video that appears to fly through or around the scene.
Training takes anywhere from a few hours to a day or two depending on the image resolution, and requires a single GPU. Rendering a new image from the trained model can take anywhere from under a second to about 30 seconds, also depending on resolution. The code includes example scenes (a fern plant and a Lego model) so you can run a demonstration without your own data.
The code is implemented using TensorFlow 1.15 and runs in Python 3. Setup is handled through a conda environment file. If you want to use your own photos rather than the included examples, you need to compute camera positions using additional tools (LLFF and COLMAP) that are separate projects referenced in the README. The repository also includes a notebook for extracting 3D geometry as a mesh from a trained model.
This is the original reference implementation from the paper's authors. It is primarily useful for researchers or technically proficient users who want to reproduce the paper's results or experiment with the method. Casual use requires comfort with Python environments, the command line, and GPU hardware.
Where it fits
- Reproduce the original NeRF paper results on the included fern or Lego scenes to validate your GPU environment before experimenting.
- Train a NeRF model on your own set of photos to generate a smooth fly-through video of a real-world scene from novel angles.
- Extract a 3D mesh from a trained NeRF model using the included notebook to use in a 3D application or game engine.
- Use this reference implementation as a baseline to benchmark a new neural rendering method against the original paper.