mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-24 08:35:41 +08:00
Remove defaults from docstrings. (#480)
This commit is contained in:
1 parent
f796a9f468
commit
8b388a3e5c
25 files changed
+106
-112
No files matched your search
@@ -68,8 +68,8 @@ class ScalingAndOffset(Encoding):
|
||||
|
||||
Args:
|
||||
in_dim: Input dimension of tensor
|
||||
scaling: Scaling applied to tensor. Defaults to 1.0.
|
||||
offset: Offset applied to tensor. Defaults to 0.0.
|
||||
scaling: Scaling applied to tensor.
|
||||
offset: Offset applied to tensor.
|
||||
"""
|
||||
|
||||
def __init__(self, in_dim: int, scaling: float = 1.0, offset: float = 0.0) -> None:
|
||||
@@ -127,7 +127,7 @@ class NeRFEncoding(Encoding):
|
||||
|
||||
Args:
|
||||
in_tensor: For best performance, the input tensor should be between 0 and 1.
|
||||
covs: Covariances of input points. Defaults to None.
|
||||
covs: Covariances of input points.
|
||||
Returns:
|
||||
Output values will be between -1 and 1
|
||||
"""
|
||||
@@ -186,7 +186,7 @@ class RFFEncoding(Encoding):
|
||||
|
||||
Args:
|
||||
in_tensor: For best performance, the input tensor should be between 0 and 1.
|
||||
covs: Covariances of input points. Defaults to None.
|
||||
covs: Covariances of input points.
|
||||
|
||||
Returns:
|
||||
Output values will be between -1 and 1
|
||||
@@ -212,12 +212,12 @@ class HashEncoding(Encoding):
|
||||
"""Hash encoding
|
||||
|
||||
Args:
|
||||
num_levels: Number of feature grids. Defaults to 16.
|
||||
min_res: Resolution of smallest feature grid. Defaults to 16.
|
||||
max_res: Resolution of largest feature grid. Defaults to 1024.
|
||||
hash_table_size: Size of hash table. Defaults to 2**19.
|
||||
features_per_level: Number of features per level. Defaults to 2.
|
||||
hash_init_scale: Value to initialize hash grid. Defaults to 0.001.
|
||||
num_levels: Number of feature grids.
|
||||
min_res: Resolution of smallest feature grid.
|
||||
max_res: Resolution of largest feature grid.
|
||||
hash_table_size: Size of hash table.
|
||||
features_per_level: Number of features per level.
|
||||
hash_init_scale: Value to initialize hash grid.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
@@ -313,9 +313,9 @@ class TensorCPEncoding(Encoding):
|
||||
"""Learned CANDECOMP/PARFAC (CP) decomposition encoding used in TensoRF
|
||||
|
||||
Args:
|
||||
resolution: Resolution of grid. Defaults to 256.
|
||||
num_components: Number of components per dimension. Defaults to 24.
|
||||
init_scale: Initialization scale. Defaults to 0.1.
|
||||
resolution: Resolution of grid.
|
||||
num_components: Number of components per dimension.
|
||||
init_scale: Initialization scale.
|
||||
"""
|
||||
|
||||
def __init__(self, resolution: int = 256, num_components: int = 24, init_scale: float = 0.1) -> None:
|
||||
@@ -363,9 +363,9 @@ class TensorVMEncoding(Encoding):
|
||||
"""Learned vector-matrix encoding proposed by TensoRF
|
||||
|
||||
Args:
|
||||
resolution: Resolution of grid. Defaults to 256.
|
||||
num_components: Number of components per dimension. Defaults to 24.
|
||||
init_scale: Initialization scale. Defaults to 0.1.
|
||||
resolution: Resolution of grid.
|
||||
num_components: Number of components per dimension.
|
||||
init_scale: Initialization scale.
|
||||
"""
|
||||
|
||||
plane_coef: TensorType[3, "num_components", "resolution", "resolution"]
|
||||
@@ -427,7 +427,7 @@ class SHEncoding(Encoding):
|
||||
"""Spherical harmonic encoding
|
||||
|
||||
Args:
|
||||
levels: Number of spherical hamonic levels to encode. Defaults to 4.
|
||||
levels: Number of spherical hamonic levels to encode.
|
||||
"""
|
||||
|
||||
def __init__(self, levels: int = 4) -> None:
|
||||
|
||||
@@ -117,9 +117,9 @@ class SHFieldHead(FieldHead):
|
||||
|
||||
Args:
|
||||
in_dim: input dimension. If not defined in constructor, it must be set later.
|
||||
levels: Number of spherical harmonics layers. Defaults to 3.
|
||||
levels: Number of spherical harmonics layers.
|
||||
channels: Number of channels. Defaults to 3 (ie RGB).
|
||||
activation: Output activation. Defaults to None.
|
||||
activation: Output activation.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
|
||||
@@ -31,9 +31,9 @@ class MLP(FieldModule):
|
||||
in_dim: Input layer dimension
|
||||
num_layers: Number of network layers
|
||||
layer_width: Width of each MLP layer
|
||||
out_dim: Ouput layer dimension. Defaults to layer_width
|
||||
activation: intermediate layer activation function. Defaults to nn.ReLU.
|
||||
out_activation: output activation function. Defaults to None.
|
||||
out_dim: Ouput layer dimension. Uses layer_width if None.
|
||||
activation: intermediate layer activation function.
|
||||
out_activation: output activation function.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
|
||||
@@ -38,15 +38,15 @@ class NeRFField(Field):
|
||||
"""NeRF Field
|
||||
|
||||
Args:
|
||||
position_encoding: Position encoder. Defaults to Identity(in_dim=3).
|
||||
direction_encoding: Direction encoder. Defaults to Identity(in_dim=3).
|
||||
base_mlp_num_layers: Number of layers for base MLP. Defaults to 8.
|
||||
base_mlp_layer_width: Width of base MLP layers. Defaults to 256.
|
||||
head_mlp_num_layers: Number of layer for ourput head MLP. Defaults to 2.
|
||||
head_mlp_layer_width: Width of output head MLP layers. Defaults to 128.
|
||||
skip_connections: Where to add skip connection in base MLP. Defaults to (4,).
|
||||
use_integrated_encoding: Used integrated samples as encoding input, Defaults to False.
|
||||
spatial_distortion: Spatial distortion. Defaults to None.
|
||||
position_encoding: Position encoder.
|
||||
direction_encoding: Direction encoder.
|
||||
base_mlp_num_layers: Number of layers for base MLP.
|
||||
base_mlp_layer_width: Width of base MLP layers.
|
||||
head_mlp_num_layers: Number of layer for ourput head MLP.
|
||||
head_mlp_layer_width: Width of output head MLP layers.
|
||||
skip_connections: Where to add skip connection in base MLP.
|
||||
use_integrated_encoding: Used integrated samples as encoding input.
|
||||
spatial_distortion: Spatial distortion.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
|
||||
@@ -40,15 +40,15 @@ class VanillaNerfWField(Field):
|
||||
|
||||
Args:
|
||||
num_images: How many images exist in the dataset.
|
||||
position_encoding: Position encoder. Defaults to Identity(in_dim=3).
|
||||
direction_encoding: Direction encoder. Defaults to Identity(in_dim=3).
|
||||
base_mlp_num_layers: Number of layers for base MLP. Defaults to 8.
|
||||
base_mlp_layer_width: Width of base MLP layers. Defaults to 256.
|
||||
head_mlp_num_layers: Number of layer for ourput head MLP. Defaults to 2.
|
||||
head_mlp_layer_width: Width of output head MLP layers. Defaults to 128.
|
||||
appearance_embedding_dim:: Dimension of appearance embedding. Defaults to 48.
|
||||
transient_embedding_dim:: Dimension of transient embedding. Defaults to 16.
|
||||
skip_connections: Where to add skip connection in base MLP. Defaults to (4,).
|
||||
position_encoding: Position encoder.
|
||||
direction_encoding: Direction encoder.
|
||||
base_mlp_num_layers: Number of layers for base MLP.
|
||||
base_mlp_layer_width: Width of base MLP layers.
|
||||
head_mlp_num_layers: Number of layer for ourput head MLP.
|
||||
head_mlp_layer_width: Width of output head MLP layers.
|
||||
appearance_embedding_dim:: Dimension of appearance embedding.
|
||||
transient_embedding_dim:: Dimension of transient embedding.
|
||||
skip_connections: Where to add skip connection in base MLP.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
@@ -121,7 +121,7 @@ class VanillaNerfWField(Field):
|
||||
|
||||
Args:
|
||||
ray_samples (RaySamples): Ray samples.
|
||||
density_embedding (TensorType[..., "embedding_size"], optional): Density embedding. Defaults to None.
|
||||
density_embedding (TensorType[..., "embedding_size"], optional): Density embedding.
|
||||
|
||||
Returns:
|
||||
Dict[FieldHeadNames, TensorType]: Outputs of the NeRF-W field.
|
||||
|
||||
@@ -38,13 +38,13 @@ class SemanticNerfField(Field):
|
||||
|
||||
Args:
|
||||
num_semantic_classes: Number of distinct semantic classes.
|
||||
position_encoding: Position encoder. Defaults to Identity(in_dim=3).
|
||||
direction_encoding: Direction encoder. Defaults to Identity(in_dim=3).
|
||||
base_mlp_num_layers: Number of layers for base MLP. Defaults to 8.
|
||||
base_mlp_layer_width: Width of base MLP layers. Defaults to 256.
|
||||
head_mlp_num_layers: Number of layer for ourput head MLP. Defaults to 2.
|
||||
head_mlp_layer_width: Width of output head MLP layers. Defaults to 128.
|
||||
skip_connections: Where to add skip connection in base MLP. Defaults to (4,).
|
||||
position_encoding: Position encoder.
|
||||
direction_encoding: Direction encoder.
|
||||
base_mlp_num_layers: Number of layers for base MLP.
|
||||
base_mlp_layer_width: Width of base MLP layers.
|
||||
head_mlp_num_layers: Number of layer for ourput head MLP.
|
||||
head_mlp_layer_width: Width of output head MLP layers.
|
||||
skip_connections: Where to add skip connection in base MLP.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
|
||||
Reference in new issue
Block a user