From 8c2b1b8535315ca7d4a6251e008cf4d0fb159624 Mon Sep 17 00:00:00 2001 From: "Jake Austin jake-austin@berkeley.edu" Date: Sat, 16 Sep 2023 07:38:02 +0000 Subject: [PATCH] Configifying scene extent --- nerfstudio/models/gaussian_splatting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nerfstudio/models/gaussian_splatting.py b/nerfstudio/models/gaussian_splatting.py index d859dd9a9..e2d33e15e 100644 --- a/nerfstudio/models/gaussian_splatting.py +++ b/nerfstudio/models/gaussian_splatting.py @@ -76,6 +76,7 @@ class GaussianSplattingModelConfig(ModelConfig): use_diff_rast: bool = False # TODO (jake-austin): remove gradient_threshold: float = 0.0002 min_opacity: float = 0.005 + scene_extent: float = 2.6 class GaussianSplattingModel(Model): """Gaussian Splatting model @@ -239,8 +240,7 @@ class GaussianSplattingModel(Model): if step >= self.config.prune_density_after and step < self.config.prune_density_until: size_threshold = None#20 if iteration > opt.opacity_reset_interval else None self.optimizer = training_callback_attributes.optimizers - extent = torch.abs(self.render_aabb.aabb).max() if self.render_aabb is not None else 1000 - self.densify_and_prune(self.config.gradient_threshold, self.config.min_opacity, extent, None) + self.densify_and_prune(self.config.gradient_threshold, self.config.min_opacity, self.config.scene_extent, None) def wrapper_reset_opacity(step): if step < self.config.prune_density_until and step > 0: