7#include <reusex/gsplat/GaussianCloud.hpp>
8#include <reusex/gsplat/TrainingViews.hpp>
312 const std::vector<TrainingView> &views,
cv::Mat render_view(const GaussianCloud &gaussians, const TrainingView &view)
Rasterize gaussians from view.
TrainResult train_gaussians(const GaussianCloud &init, const std::vector< TrainingView > &views, const TrainOptions &opt={})
Train Gaussians against posed views.
bool is_available()
True when this build actually contains the CUDA trainer.
TrainResult run_gsplat_stage(ProjectDB &db, const GsplatStageOptions &opt)
Load the seed cloud and views from db, train, and store the splat.
bool has_cuda_device()
True when this process can actually reach a CUDA device right now.
One held-out evaluation pass.
double holdout_psnr
dB over views it never sees
double train_psnr
dB over views the optimizer does see
std::size_t holdout_views
A set of 3D Gaussians in plain host memory.
Parameters for seeding Gaussians from a ReUseX point cloud.
End-to-end options for the rux create gsplat stage.
std::string splat_name
Name the trained splat is stored under in the project (#322).
std::string seed_cloud
ProjectDB cloud used to seed Gaussians.
TrainingViewOptions views
std::filesystem::path out_ply
Optional extra copy on disk, for a viewer outside ReUseX.
3DGS-MCMC density control (Kheradmand et al.
float noise_lr
scales the Langevin noise (paper's value)
float opacity_reg
L1 regularizers in activated space.
float min_opacity
Opacity at or below which a Gaussian counts as dead and is relocated.
int refine_start
first eligible iteration
int refine_every
iterations between relocate+grow passes
double cap_factor
Hard ceiling on the Gaussian count, as a multiple of the seed count.
double growth
Multiplicative growth per refine pass, capped by the budget.
float noise_opacity_k
noise gate sharpness
std::int64_t cap_absolute
double refine_stop_fraction
Last eligible iteration, as a fraction of the run.
float noise_opacity_t
noise gate transition point
One row of the loss history.
double psnr
dB, from the MSE of the same view
double loss
the optimized objective
double l1
mean absolute error against the target view
Optimizer / schedule parameters for the 3DGS training loop.
int eval_max_views
Upper bound on the views used per evaluation pass, per side.
const std::atomic_bool * cancel_token
Cooperative cancellation, owned by the caller and polled once per iteration.
float lambda_dssim
Weight of the D-SSIM term: loss = (1-l)*L1 + l*(1 - SSIM).
int sh_degree_interval
Iterations between unlocking one more SH band (reference 3DGS's oneUpSHdegree).
int checkpoint_keep
How many checkpoint files to keep; older ones are deleted as new ones land.
MCMCOptions mcmc
MCMC density control.
int prune_interval
iterations between prune passes
float lr_opacities
on logit-opacity
std::filesystem::path checkpoint_dir
Directory for checkpoint .ply files.
bool prune_enabled
Periodically drop Gaussians whose opacity has collapsed.
float lr_means
scaled by scene extent (see above)
unsigned seed
Seeds the per-iteration view draw, which makes the training schedule reproducible.
float prune_max_scale
drop Gaussians larger than this [m]
float lr_scales
on log-scales
int checkpoint_every
Write an intermediate .ply every N iterations (0 = off, the default).
int log_interval
iterations between progress log lines
std::size_t render_view_index
int holdout_every
Held-out split: every holdout_every-th view (indices 0, N, 2N, …) is excluded from training and used ...
std::vector< int > render_iterations
Dump a rendered PNG of render_view_index at each of these iterations (0 = the untrained seed).
float lr_sh_rest
Learning rate for SH degrees 1..GaussianInitOptions::sh_degree — the view-*dependent* colour.
int prune_start
first iteration eligible for pruning
std::filesystem::path render_dir
float lr_sh_dc
on the degree-0 SH coefficients
float lr_quats
on raw (unnormalised) quaternions
float prune_opacity
alpha below which a Gaussian is dropped
int eval_interval
Iterations between held-out evaluation passes.
std::size_t added
cumulative MCMC growth
std::vector< std::filesystem::path > checkpoints
Intermediate .ply files from the checkpoint_every schedule that are still on disk,...
std::vector< std::size_t > holdout_view_indices
std::vector< EvalMetrics > evals
Held-out evaluations, empty when TrainOptions::holdout_every is 0.
double final_holdout_psnr
Held-out PSNR at the last evaluation, 0 when there was no split.
std::vector< std::filesystem::path > renders
PNGs written by the render_iterations schedule, in write order.
double final_holdout_ssim
double final_psnr
mean PSNR over the last logged window
std::size_t relocated
cumulative MCMC relocations
int iterations_run
The last iteration actually executed.
int final_sh_degree
The highest SH degree the warm-up schedule actually unlocked, which is not always gaussians....
std::vector< std::size_t > trained_views
The view indices the optimizer actually drew during the run, sorted and deduplicated,...
std::vector< TrainMetrics > history
bool cancelled
True when the run stopped early on a cancel request rather than by reaching TrainOptions::iterations.
Selection and preprocessing knobs for building the training set.
One posed training image for the Gaussian-splatting optimizer.