mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-23 16:15:36 +08:00
1 parent
9b0cf2ab16
commit
f910836b8c
13 files changed
+99
-95
No files matched your search
@@ -6,9 +6,9 @@
|
||||
"source": [
|
||||
"# Spatial Distortions\n",
|
||||
"\n",
|
||||
"If you are trying to reconstruct and object floating in an empty void, you can stop reading. However if you are trying to reconstruct a scene or object from images, you may wish to consider adding a spatial distortion.\n",
|
||||
"If you are trying to reconstruct an object floating in an empty void, you can stop reading. However if you are trying to reconstruct a scene or object from images, you may wish to consider adding a spatial distortion.\n",
|
||||
"\n",
|
||||
"When rendering a target view of a scene, the camera will emit a camera ray for each pixel and query the scene at points along this ray. We can choose where to query these point using different [samplers](visualize_samplers.ipynb). These samplers have some notion of _bounds_ that define where the ray should start and terminate. If you know that everything in your scenes exists within some predefined bounds (ie. a cube that a room fits in) then the sampler will properly sample the entire space. If however the scene is unbounded (ie. an outdoor scene) defining where to stop sampling is challenging. One option to increase the far sampling distance to a large value (ie. 1km). Alternatively we can warp the space into a fixed volume. Below are supported distortions.\n"
|
||||
"When rendering a target view of a scene, the camera will emit a camera ray for each pixel and query the scene at points along this ray. We can choose where to query these points using different [samplers](visualize_samplers.ipynb). These samplers have some notion of _bounds_ that define where the ray should start and terminate. If you know that everything in your scenes exists within some predefined bounds (ie. a cube that a room fits in) then the sampler will properly sample the entire space. If however the scene is unbounded (ie. an outdoor scene) defining where to stop sampling is challenging. One option to increase the far sampling distance to a large value (ie. 1km). Alternatively we can warp the space into a fixed volume. Below are supported distortions.\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Models
|
||||
|
||||
We provide a set of preimplemented nerfactory models. One of the goals of nerfactory is to modularize the various NeRF techniques as much as possible. As a result, many of the techniqes from these preimplemented models can be mixed.
|
||||
We provide a set of pre implemented nerfactory models. One of the goals of nerfactory is to modularize the various NeRF techniques as much as possible. As a result, many of the techniques from these pre-implemented models can be mixed.
|
||||
|
||||
## Running a model
|
||||
|
||||
@@ -12,7 +12,7 @@ python scripts/run_train.py --config-name MODEL_CONFIG
|
||||
|
||||
## Guides
|
||||
|
||||
In addition to their implementations, we have provided guides that walk through each of these method.
|
||||
In addition to their implementations, we have provided guides that walk through each of these method.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 1
|
||||
|
||||
+5
-6
@@ -18,7 +18,7 @@ python scripts/run_train.py --config-name=graph_vanilla_nerf.yaml
|
||||
|
||||
### Overview
|
||||
|
||||
If you have arrived to this site, it is likely that you have atleast heard of NeRFs. This page will discuss the original NeRF paper, _"NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis"_ by Mildenhall, Srinivasan, Tancik et al. (2020). For most tasks, using the original NeRF model is likely not a good choice and hence we provide implementations of various other NeRF related models. It is however useful to understand how NeRF's work as most follow ups follow a similar structure.
|
||||
If you have arrived to this site, it is likely that you have at least heard of NeRFs. This page will discuss the original NeRF paper, _"NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis"_ by Mildenhall, Srinivasan, Tancik et al. (2020). For most tasks, using the original NeRF model is likely not a good choice and hence we provide implementations of various other NeRF related models. It is however useful to understand how NeRF's work as most follow ups follow a similar structure.
|
||||
|
||||
The goal is to optimize a volumetric representation of a scene that can be rendered from novel viewpoints. This representation is optimized from a set of images and associated camera poses.
|
||||
|
||||
@@ -42,7 +42,7 @@ If any of the following assumptions are broken, the reconstructions may fail com
|
||||
:class: only-dark
|
||||
```
|
||||
|
||||
Here is an overview pipeline for NeRF, we will walk though each component in this guide.
|
||||
Here is an overview pipeline for NeRF, we will walk through each component in this guide.
|
||||
|
||||
### Field Representation
|
||||
|
||||
@@ -81,7 +81,7 @@ field_fine = NeRFField(position_encoding=pos_enc, direction_encoding=dir_enc)
|
||||
|
||||
#### Positional Encoding
|
||||
|
||||
An extra trick is necessary to making the neural network expressive enough to represent fine details in the scene. The input coordinates $(x,y,z,\theta,\phi)$ need to be encoded to a higher dimensional space prior to being input into the network. You can learn more about encodings [here](../model_components/visualize_encoders.ipynb).
|
||||
An extra trick is necessary to make the neural network expressive enough to represent fine details in the scene. The input coordinates $(x,y,z,\theta,\phi)$ need to be encoded to a higher dimensional space prior to being input into the network. You can learn more about encodings [here](../model_components/visualize_encoders.ipynb).
|
||||
|
||||
```python
|
||||
from nerfactory.fields.modules.encoding import NeRFEncoding
|
||||
@@ -137,7 +137,7 @@ rgb = renderer_rgb(
|
||||
:class: only-dark
|
||||
```
|
||||
|
||||
How we sample points along rays in space is an important design decision. Various sampling strategies can be used which are dicussed in detail in the [Ray Samplers](../model_components/visualize_samplers.ipynb) guide. In NeRF we take advantage of a hierarchical sampling scheme that first uses a _uniform sampler_ and is followed by a _PDF sampler_. The uniform sampler distributes samples evenly between a predefined distance range from the camera. These are then used to compute an initial render of the scene. The renderer optionally produces _weights_ for each sample that correlate with how important each sample was to the final renderer. The PDF sampler uses these _weights_ to generate a new set of samples that are biased to regions of higher weight. In practice, these regions are near the surface of the object.
|
||||
How we sample points along rays in space is an important design decision. Various sampling strategies can be used which are discussed in detail in the [Ray Samplers](../model_components/visualize_samplers.ipynb) guide. In NeRF we take advantage of a hierarchical sampling scheme that first uses a _uniform sampler_ and is followed by a _PDF sampler_. The uniform sampler distributes samples evenly between a predefined distance range from the camera. These are then used to compute an initial render of the scene. The renderer optionally produces _weights_ for each sample that correlate with how important each sample was to the final renderer. The PDF sampler uses these _weights_ to generate a new set of samples that are biased to regions of higher weight. In practice, these regions are near the surface of the object.
|
||||
|
||||
Associated code:
|
||||
|
||||
@@ -153,9 +153,8 @@ weights_coarse = ray_samples_uniform.get_weights(field_outputs_coarse[FieldHeadN
|
||||
ray_samples_pdf = sampler_pdf(ray_bundle, ray_samples_uniform, weights_coarse)
|
||||
```
|
||||
|
||||
|
||||
```{warning}
|
||||
Described above is specific to scenes that have known bounds (ie. the Blender Sythetic dataset). For unbounded scenes, the original NeRF paper uses Normalized Device Coordinates (NDC) to warp space, along with a _linear in disparity_ sampler. We do not support NDC, for unbounded scenes consider using [Spatial Distortions](../model_components/visualize_spatial_distortions.ipynb).
|
||||
Described above is specific to scenes that have known bounds (ie. the Blender Synthetic dataset). For unbounded scenes, the original NeRF paper uses Normalized Device Coordinates (NDC) to warp space, along with a _linear in disparity_ sampler. We do not support NDC, for unbounded scenes consider using [Spatial Distortions](../model_components/visualize_spatial_distortions.ipynb).
|
||||
```
|
||||
|
||||
```{tip}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Contributing to nerfactory workflow
|
||||
|
||||
The project is set up for development in VSCode, we reccomend using it if you plan to contribute.
|
||||
The project is set up for development in VSCode, we recommend using it if you plan to contribute.
|
||||
|
||||
## TLDR
|
||||
|
||||
@@ -11,7 +11,7 @@ The project is set up for development in VSCode, we reccomend using it if you pl
|
||||
| Docs | Sphinx |
|
||||
| Docstring style | Google |
|
||||
|
||||
## Commiting
|
||||
## Committing
|
||||
|
||||
1. Make your modifications
|
||||
2. Perform local checks
|
||||
@@ -57,7 +57,7 @@ Run the following to build the documentation:
|
||||
python scripts/docs/build_docs.py
|
||||
```
|
||||
|
||||
Rerun `make html` when documentation changes are made, `make clean` is necissary if the documentation structure changes.
|
||||
Rerun `make html` when documentation changes are made, `make clean` is necessary if the documentation structure changes.
|
||||
|
||||
### Notebooks
|
||||
|
||||
@@ -66,7 +66,7 @@ We support jupyter notbooks in our documentation. To improve the readability, th
|
||||
| Tag | Effect |
|
||||
| ------------- | ---------------------------------------------------- |
|
||||
| # HIDDEN | Hide code block and output |
|
||||
| # COLLAPSED | Collapse the code in a dropdown but show the restuls |
|
||||
| # COLLAPSED | Collapse the code in a dropdown but show the results |
|
||||
| # OUTPUT_ONLY | Only show the cell's output |
|
||||
|
||||
### Auto build
|
||||
|
||||
Reference in new issue
Block a user