All Projects → bmild → Nerf

bmild / Nerf

Licence: mit
Code release for NeRF (Neural Radiance Fields)

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nerf

SMPL-NeRF
Embed human pose information into neural radiance fields (NeRF) to render images of humans in desired poses 🏃 from novel views
Stars: ✭ 29 (-99.29%)
Mutual labels:  nerf, neural-radiance-fields
DSNeRF
Code release for DS-NeRF (Depth-supervised Neural Radiance Fields)
Stars: ✭ 343 (-91.56%)
Mutual labels:  nerf, neural-radiance-fields
New-View-Synthesis
Collecting papers about new view synthesis
Stars: ✭ 437 (-89.24%)
Mutual labels:  nerf, neural-radiance-fields
improved-nerfmm
Unofficial & improved implementation of NeRF--: Neural Radiance Fields Without Known Camera Parameters
Stars: ✭ 172 (-95.77%)
Mutual labels:  nerf, neural-radiance-fields
Zero to deep learning video
Repository for the Zero to Deep Learning® Video Course
Stars: ✭ 296 (-92.71%)
Mutual labels:  jupyter-notebook
Awesome Gee
A curated list of Google Earth Engine resources
Stars: ✭ 292 (-92.81%)
Mutual labels:  jupyter-notebook
Pythonscraping
The code of book: Python Scraping
Stars: ✭ 292 (-92.81%)
Mutual labels:  jupyter-notebook
Generative Query Network Pytorch
Generative Query Network (GQN) in PyTorch as described in "Neural Scene Representation and Rendering"
Stars: ✭ 294 (-92.76%)
Mutual labels:  jupyter-notebook
Tensorwatch
Debugging, monitoring and visualization for Python Machine Learning and Data Science
Stars: ✭ 3,191 (-21.44%)
Mutual labels:  jupyter-notebook
Xhamster analysis
The data analysiser and predictor of https://xhamster.com/
Stars: ✭ 297 (-92.69%)
Mutual labels:  jupyter-notebook
Human Segmentation Pytorch
Human segmentation models, training/inference code, and trained weights, implemented in PyTorch
Stars: ✭ 289 (-92.89%)
Mutual labels:  jupyter-notebook
Tf tutorial plus
Tutorials for TensorFlow APIs the official documentation doesn't cover
Stars: ✭ 293 (-92.79%)
Mutual labels:  jupyter-notebook
Master
A machine learning course using Python, Jupyter Notebooks, and OpenML
Stars: ✭ 297 (-92.69%)
Mutual labels:  jupyter-notebook
Show and tell.tensorflow
Stars: ✭ 294 (-92.76%)
Mutual labels:  jupyter-notebook
Cascaded Fcn
Source code for the MICCAI 2016 Paper "Automatic Liver and Lesion Segmentation in CT Using Cascaded Fully Convolutional NeuralNetworks and 3D Conditional Random Fields"
Stars: ✭ 296 (-92.71%)
Mutual labels:  jupyter-notebook
Pycon 2018 Tutorial
Using pandas for Better (and Worse) Data Science
Stars: ✭ 294 (-92.76%)
Mutual labels:  jupyter-notebook
Pytorch Nlp Notebooks
Learn how to use PyTorch to solve some common NLP problems with deep learning.
Stars: ✭ 293 (-92.79%)
Mutual labels:  jupyter-notebook
Amazon Forecast Samples
Notebooks and examples on how to onboard and use various features of Amazon Forecast.
Stars: ✭ 296 (-92.71%)
Mutual labels:  jupyter-notebook
Lyrics Conditioned Neural Melody Generation
Stars: ✭ 296 (-92.71%)
Mutual labels:  jupyter-notebook
Sklearn Evaluation
Machine learning model evaluation made easy: plots, tables, HTML reports, experiment tracking and Jupyter notebook analysis.
Stars: ✭ 294 (-92.76%)
Mutual labels:  jupyter-notebook

NeRF: Neural Radiance Fields

Project Page | Video | Paper | Data

Open Tiny-NeRF in Colab
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
in ECCV 2020 (Oral Presentation, Best Paper Honorable Mention)

TL;DR quickstart

To setup a conda environment, download example training data, begin the training process, and launch Tensorboard:

conda env create -f environment.yml
conda activate nerf
bash download_example_data.sh
python run_nerf.py --config config_fern.txt
tensorboard --logdir=logs/summaries --port=6006

If everything works without errors, you can now go to localhost:6006 in your browser and watch the "Fern" scene train.

Setup

Python 3 dependencies:

  • Tensorflow 1.15
  • matplotlib
  • numpy
  • imageio
  • configargparse

The LLFF data loader requires ImageMagick.

We provide a conda environment setup file including all of the above dependencies. Create the conda environment nerf by running:

conda env create -f environment.yml

You will also need the LLFF code (and COLMAP) set up to compute poses if you want to run on your own real data.

What is a NeRF?

A neural radiance field is a simple fully connected network (weights are ~5MB) trained to reproduce input views of a single scene using a rendering loss. The network directly maps from spatial location and viewing direction (5D input) to color and opacity (4D output), acting as the "volume" so we can use volume rendering to differentiably render new views.

Optimizing a NeRF takes between a few hours and a day or two (depending on resolution) and only requires a single GPU. Rendering an image from an optimized NeRF takes somewhere between less than a second and ~30 seconds, again depending on resolution.

Running code

Here we show how to run our code on two example scenes. You can download the rest of the synthetic and real data used in the paper here.

Optimizing a NeRF

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

After 200k iterations (about 15 hours), you should get a video like this at logs/fern_test/fern_test_spiral_200000_rgb.mp4:

ferngif

To optimize a low-res Lego NeRF:

python run_nerf.py --config config_lego.txt

After 200k iterations, you should get a video like this:

legogif

Rendering a NeRF

Run

bash download_example_weights.sh

to get a pretrained high-res NeRF for the Fern dataset. Now you can use render_demo.ipynb to render new views.

Replicating the paper results

The example config files run at lower resolutions than the quantitative/qualitative results in the paper and video. To replicate the results from the paper, start with the config files in paper_configs/. Our synthetic Blender data and LLFF scenes are hosted here and the DeepVoxels data is hosted by Vincent Sitzmann here.

Extracting geometry from a NeRF

Check out extract_mesh.ipynb for an example of running marching cubes to extract a triangle mesh from a trained NeRF network. You'll need the install the PyMCubes package for marching cubes plus the trimesh and pyrender packages if you want to render the mesh inside the notebook:

pip install trimesh pyrender PyMCubes

Generating poses for your own scenes

Don't have poses?

We recommend using the imgs2poses.py script from the LLFF code. Then you can pass the base scene directory into our code using --datadir <myscene> along with -dataset_type llff. You can take a look at the config_fern.txt config file for example settings to use for a forward facing scene. For a spherically captured 360 scene, we recomment adding the --no_ndc --spherify --lindisp flags.

Already have poses!

In run_nerf.py and all other code, we use the same pose coordinate system as in OpenGL: the local camera coordinate system of an image is defined in a way that the X axis points to the right, the Y axis upwards, and the Z axis backwards as seen from the image.

Poses are stored as 3x4 numpy arrays that represent camera-to-world transformation matrices. The other data you will need is simple pinhole camera intrinsics (hwf = [height, width, focal length]) and near/far scene bounds. Take a look at our data loading code to see more.

Citation

@inproceedings{mildenhall2020nerf,
  title={NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis},
  author={Ben Mildenhall and Pratul P. Srinivasan and Matthew Tancik and Jonathan T. Barron and Ravi Ramamoorthi and Ren Ng},
  year={2020},
  booktitle={ECCV},
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].