pytorch3d.implicitron.models.implicit_function.idr_feature_field

idr_feature_field

class pytorch3d.implicitron.models.implicit_function.idr_feature_field.IdrFeatureField(*args, **kwargs)[source]

Bases: ImplicitFunctionBase, Module

Implicit function as used in http://github.com/lioryariv/idr.

Members:

d_in: dimension of the input point. n_harmonic_functions_xyz: If -1, do not embed the point.

If >=0, use a harmonic embedding with this number of harmonic functions. (The harmonic embedding includes the input itself, so a value of 0 means the point is used but without any harmonic functions.)

d_out and feature_vector_size: Sum of these is the output

dimension. This implicit function thus returns a concatenation of d_out signed distance function values and feature_vector_size features (such as colors). When used in GenericModel, feature_vector_size corresponds is automatically set to render_features_dimensions.

dims: list of hidden layer sizes. geometric_init: whether to use custom weight initialization

in linear layers. If False, pytorch default (uniform sampling) is used.

bias: if geometric_init=True, initial value for bias subtracted

in the last layer.

skip_in: List of indices of layers that receive as input the initial

value concatenated with the output of the previous layers.

weight_norm: whether to apply weight normalization to each layer. pooled_feature_dim: If view pooling is in use (provided as

fun_viewpool to forward()) this must be its number of features. Otherwise this must be set to 0. (If used from GenericModel, this config value will be overridden automatically.)

encoding_dim: If global coding is in use (provided as global_code

to forward()) this must be its number of featuress. Otherwise this must be set to 0. (If used from GenericModel, this config value will be overridden automatically.)

feature_vector_size: int = 3
d_in: int = 3
d_out: int = 1
dims: Tuple[int, ...] = (512, 512, 512, 512, 512, 512, 512, 512)
geometric_init: bool = True
bias: float = 1.0
skip_in: Tuple[int, ...] = ()
weight_norm: bool = True
n_harmonic_functions_xyz: int = 0
pooled_feature_dim: int = 0
encoding_dim: int = 0
forward(*, ray_bundle: ImplicitronRayBundle | None = None, rays_points_world: Tensor | None = None, fun_viewpool=None, global_code=None, **kwargs)[source]