4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-10 18:17:31 +08:00

Tancik/update docs (#12)

Update docs structure.
This commit is contained in:
Matthew Tancik 2022-06-03 11:44:39 -07:00 committed by GitHub
parent 1a26e845b0
commit 230e13adbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 198 additions and 181 deletions

View File

@ -18,9 +18,9 @@ sys.path.insert(0, os.path.abspath(".."))
# -- Project information -----------------------------------------------------
project = "pyrad"
copyright = "2022, pyrad Team"
author = "pyrad Team"
project = "pyRad"
copyright = "2022, pyRad Team"
author = "pyRad Team"
# The full version, including alpha/beta/rc tags
release = "0.0.0"
@ -52,3 +52,4 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# a list of builtin themes.
#
html_theme = "furo"
html_title = "pyRad"

View File

@ -1,38 +0,0 @@
.. _field_modules:
============
Embeddings
----------------
.. automodule:: pyrad.nerf.field_modules.embedding
:members:
:show-inheritance:
Encodings
----------------
.. automodule:: pyrad.nerf.field_modules.encoding
:members:
:show-inheritance:
Field Heads
----------------
.. automodule:: pyrad.nerf.field_modules.field_heads
:members:
:show-inheritance:
Field Losses
----------------
.. automodule:: pyrad.nerf.field_modules.field_losses
:members:
:show-inheritance:
MLP
----------------
.. automodule:: pyrad.nerf.field_modules.mlp
:members:
:show-inheritance:

View File

@ -1,23 +1,20 @@
.. pyrad documentation master file, created by
sphinx-quickstart on Tue May 31 11:49:30 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Pyrad |:metal:|
pyRad |:metal:|
====================================
Neural Volumetric Rendering
----------------------------------
.. toctree::
:caption: Quickstart
quickstart/installation
quickstart/getting_around
.. toctree::
:maxdepth: 4
:caption: Contents:
:caption: Reference:
pyrad
quickstart
reference/index
Indices and tables
==================

View File

@ -1,64 +0,0 @@
.. _pyrad:
Reference
============
Dataset
-------------------------------
.. toctree::
:maxdepth: 2
dataset
Image Samplers
-------------------------------
.. automodule:: pyrad.nerf.image_sampler
:members:
:show-inheritance:
Pixel Samplers
-------------------------------
.. automodule:: pyrad.nerf.pixel_sampler
:members:
:show-inheritance:
Field Modules
-------------------------------
.. toctree::
:maxdepth: 2
field_modules
Fields
-------------------------------
.. toctree::
:maxdepth: 2
fields
Graphs
-------------------------------
.. toctree::
:maxdepth: 2
graphs
Renderers
-------------------------------
.. automodule:: pyrad.nerf.renderers
:members:
:show-inheritance:
Ray Samplers
-------------------------------
.. automodule:: pyrad.nerf.ray_sampler
:members:
:show-inheritance:

View File

@ -1,69 +1,7 @@
.. _quickstart:
Quickstart
============
Installation
-------------------------------
Clone the repo::
git clone --recurse-submodules git@github.com:ethanweber/pyrad.git
Create the python environment::
conda create --name pyrad python=3.8.13
conda activate pyrad
pip install -r environment/requirements.txt
Install pyrad as a library::
pip install -e .
Install library with CUDA support. Change setup.py to ``USE_CUDA = True`` and then::
python setup.py develop
Running the test cases::
pytest tests
Field Modules
Getting the data
-------------------------------
Download the original NeRF dataset and put it in the following format.::
- data/
- blender/
- fern/
- lego/
Training a model
-------------------------------
Run with default config::
python scripts/run_train.py
Run with config changes::
python scripts/run_train.py machine_config.num_gpus=1
python scripts/run_train.py data.dataset.downscale_factor=1
Run with different datasets::
python scripts/run_train.py data/dataset=blender_lego
python scripts/run_train.py data/dataset=friends_TBBT-big_living_room
Run with different datasets and config changes::
python scripts/run_train.py data/dataset=friends_TBBT-big_living_room graph.network.far_plane=14
.. _getting_around:
Getting around the codebase
-------------------------------
=====================================
The entry point for training starts at ``scripts/run_train.py``, which spawns instances of our ``Trainer()`` class (in ``nerf/trainer.py``). The ``Trainer()`` is responsible for setting up the datasets and NeRF graph depending on the config specified. If you are planning on just using our codebase to build a new NeRF method or use an existing implementation, we've abstracted away the training routine in these two files and chances are you will not need to touch them.

View File

@ -0,0 +1,59 @@
.. _installation:
Installation
=================
Clone the repo::
git clone --recurse-submodules git@github.com:ethanweber/pyrad.git
Create the python environment::
conda create --name pyrad python=3.8.13
conda activate pyrad
pip install -r environment/requirements.txt
Install pyrad as a library::
pip install -e .
Install library with CUDA support. Change setup.py to ``USE_CUDA = True`` and then::
python setup.py develop
Running the test cases::
pytest tests
Field Modules
Getting the data
------------------
Download the original NeRF dataset and put it in the following format.::
- data/
- blender/
- fern/
- lego/
Training a model
------------------
Run with default config::
python scripts/run_train.py
Run with config changes::
python scripts/run_train.py machine_config.num_gpus=1
python scripts/run_train.py data.dataset.downscale_factor=1
Run with different datasets::
python scripts/run_train.py data/dataset=blender_lego
python scripts/run_train.py data/dataset=friends_TBBT-big_living_room
Run with different datasets and config changes::
python scripts/run_train.py data/dataset=friends_TBBT-big_living_room graph.network.far_plane=14

View File

@ -1,5 +1,6 @@
.. _dataset:
Dataset
============
Colmap Utils

View File

@ -0,0 +1,8 @@
.. _embeddings:
Embeddings
===================
.. automodule:: pyrad.nerf.field_modules.embedding
:members:
:show-inheritance:

View File

@ -0,0 +1,8 @@
.. _encodings:
Encodings
===================
.. automodule:: pyrad.nerf.field_modules.encoding
:members:
:show-inheritance:

View File

@ -0,0 +1,8 @@
.. _field_heads:
Field Heads
===================
.. automodule:: pyrad.nerf.field_modules.field_heads
:members:
:show-inheritance:

View File

@ -0,0 +1,8 @@
.. _field_losses:
Field Losses
===================
.. automodule:: pyrad.nerf.field_modules.field_losses
:members:
:show-inheritance:

View File

@ -0,0 +1,14 @@
.. _field_modules:
Field Modules
===================
TODO: High level description of field modules and how they connect together.
.. toctree::
encodings
embeddings
field_heads
field_losses
mlp

View File

@ -0,0 +1,8 @@
.. _mlp:
MLP
===================
.. automodule:: pyrad.nerf.field_modules.mlp
:members:
:show-inheritance:

View File

@ -1,5 +1,6 @@
.. _fields:
Fields
============
Base

View File

@ -1,5 +1,6 @@
.. _graphs:
Graphs
============
Base

34
docs/reference/index.rst Normal file
View File

@ -0,0 +1,34 @@
.. _reference:
API
============
TODO: Explanation of each component
.. toctree::
:hidden:
dataset
samplers
field_modules/index
renderers
fields
graphs
Hydra config structure
========================
Logging, debugging utilities
===================================
Benchmarking, other tooling
===================================
Running other repos with our data
===================================
Speeding up the code
===================================
Setting up Jupyter
========================

View File

@ -0,0 +1,8 @@
.. _renderers:
Renderers
============
.. automodule:: pyrad.nerf.renderers
:members:
:show-inheritance:

View File

@ -0,0 +1,25 @@
.. _samplers:
Samplers
============
Image Samplers
-------------------------------
.. automodule:: pyrad.nerf.image_sampler
:members:
:show-inheritance:
Pixel Samplers
-------------------------------
.. automodule:: pyrad.nerf.pixel_sampler
:members:
:show-inheritance:
Ray Samplers
-------------------------------
.. automodule:: pyrad.nerf.ray_sampler
:members:
:show-inheritance:

View File

@ -1,4 +1,4 @@
furo==2022.4.7
readthedocs-sphinx-search==0.1.2
sphinx==4.5.0
furo==2022.4.7
sphinxemoji==0.2.0