class

GS::GaussianSplatting::Gaussian3D

Inherits Reference < Object

3D Gaussian parameters All stored as Variables for gradient computation

Constructors

from_points(points : Tensor, colors : Tensor | Nil = nil, device : Tensor::Device = Tensor::Device::GPU) : Gaussian3D

Initialize from point cloud

Source
new(count : Int32, device : Tensor::Device = Tensor::Device::GPU)
Source

Instance methods

clone_gaussians(indices : Array(Int32)) : Gaussian3D

Clone Gaussians (for densification)

Source
concat!(other : Gaussian3D) : Nil

Concatenate another Gaussian set

Source
count

Number of Gaussians

Source
log_scale

Log-scale for covariance [N, 3] Actual scale = exp(log_scale)

Source
log_scale=(log_scale : Autograd::Variable)

Log-scale for covariance [N, 3] Actual scale = exp(log_scale)

Source
logit_opacity

Opacity in logit space [N, 1] Actual opacity = sigmoid(logit_opacity)

Source
logit_opacity=(logit_opacity : Autograd::Variable)

Opacity in logit space [N, 1] Actual opacity = sigmoid(logit_opacity)

Source
normalize_rotations!

Normalize quaternions to unit length

Source
opacity

Get actual opacity values (sigmoid of logit_opacity)

Source
parameters

Get all trainable parameters

Source
position

Position in world space [N, 3]

Source
position=(position : Autograd::Variable)

Position in world space [N, 3]

Source
remove!(indices_to_remove : Set(Int32)) : Nil

Remove Gaussians by indices (for pruning)

Source
reset_opacity!(value : Float32 = -2.0_f32) : Nil

Reset opacity for all Gaussians (used periodically during training)

Source
rotation

Rotation as quaternion [N, 4] (w, x, y, z) Normalized to unit quaternion

Source
rotation=(rotation : Autograd::Variable)

Rotation as quaternion [N, 4] (w, x, y, z) Normalized to unit quaternion

Source
scale

Get actual scale values (exp of log_scale)

Source
sh_coeffs

Spherical harmonics coefficients [N, SH_COEFFS, 3] For view-dependent color

Source
sh_coeffs=(sh_coeffs : Autograd::Variable)

Spherical harmonics coefficients [N, SH_COEFFS, 3] For view-dependent color

Source
stats

Statistics for debugging

Source