Field Heads#

Collection of render heads

class nerfstudio.field_components.field_heads.DensityFieldHead(in_dim: Optional[int] = None, activation: Optional[Module] = Softplus(beta=1.0, threshold=20.0))[source]#

Bases: FieldHead

Density output

Parameters:
  • in_dim – input dimension. If not defined in constructor, it must be set later.

  • activation – output head activation

class nerfstudio.field_components.field_heads.FieldHead(out_dim: int, field_head_name: FieldHeadNames, in_dim: Optional[int] = None, activation: Optional[Union[Module, Callable]] = None)[source]#

Bases: FieldComponent

Base field output

Parameters:
  • out_dim – output dimension for renderer

  • field_head_name – Field type

  • in_dim – input dimension. If not defined in constructor, it must be set later.

  • activation – output head activation

forward(in_tensor: Shaped[Tensor, '*bs in_dim']) Shaped[Tensor, '*bs out_dim'][source]#

Process network output for renderer

Parameters:

in_tensor – Network input

Returns:

Render head output

set_in_dim(in_dim: int) None[source]#

Set input dimension of Field Head

class nerfstudio.field_components.field_heads.FieldHeadNames(value)[source]#

Bases: Enum

Possible field outputs

class nerfstudio.field_components.field_heads.PredNormalsFieldHead(in_dim: Optional[int] = None, activation: Optional[Module] = Tanh())[source]#

Bases: FieldHead

Predicted normals output.

Parameters:
  • in_dim – input dimension. If not defined in constructor, it must be set later.

  • activation – output head activation

forward(in_tensor: Float[Tensor, '*bs in_dim']) Float[Tensor, '*bs out_dim'][source]#

Needed to normalize the output into valid normals.

class nerfstudio.field_components.field_heads.RGBFieldHead(in_dim: Optional[int] = None, activation: Optional[Module] = Sigmoid())[source]#

Bases: FieldHead

RGB output

Parameters:
  • in_dim – input dimension. If not defined in constructor, it must be set later.

  • activation – output head activation

class nerfstudio.field_components.field_heads.SHFieldHead(in_dim: Optional[int] = None, levels: int = 3, channels: int = 3, activation: Optional[Module] = None)[source]#

Bases: FieldHead

Spherical harmonics output

Parameters:
  • in_dim – input dimension. If not defined in constructor, it must be set later.

  • levels – Number of spherical harmonics layers.

  • channels – Number of channels. Defaults to 3 (ie RGB).

  • activation – Output activation.

class nerfstudio.field_components.field_heads.SemanticFieldHead(num_classes: int, in_dim: Optional[int] = None)[source]#

Bases: FieldHead

Semantic output

Parameters:
  • num_classes – Number of semantic classes

  • in_dim – input dimension. If not defined in constructor, it must be set later.

  • activation – output head activation

class nerfstudio.field_components.field_heads.TransientDensityFieldHead(in_dim: Optional[int] = None, activation: Optional[Module] = Softplus(beta=1.0, threshold=20.0))[source]#

Bases: FieldHead

Transient density output

Parameters:
  • in_dim – input dimension. If not defined in constructor, it must be set later.

  • activation – output head activation

class nerfstudio.field_components.field_heads.TransientRGBFieldHead(in_dim: Optional[int] = None, activation: Optional[Module] = Sigmoid())[source]#

Bases: FieldHead

Transient RGB output

Parameters:
  • in_dim – input dimension. If not defined in constructor, it must be set later.

  • activation – output head activation

class nerfstudio.field_components.field_heads.UncertaintyFieldHead(in_dim: Optional[int] = None, activation: Optional[Module] = Softplus(beta=1.0, threshold=20.0))[source]#

Bases: FieldHead

Uncertainty output

Parameters:
  • in_dim – input dimension. If not defined in constructor, it must be set later.

  • activation – output head activation