4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 18:44:21 +08:00

Configify

This commit is contained in:
Jake Austin jake-austin@berkeley.edu 2023-09-16 07:34:18 +00:00
parent 274d8f2215
commit f6bdfacf56

View File

@ -74,6 +74,8 @@ class GaussianSplattingModelConfig(ModelConfig):
one_up_sh_every: int = 1000
lambda_ssim: float = 0.2
use_diff_rast: bool = False # TODO (jake-austin): remove
gradient_threshold: float = 0.0002
min_opacity: float = 0.005
class GaussianSplattingModel(Model):
"""Gaussian Splatting model
@ -237,7 +239,8 @@ 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
self.densify_and_prune(0.0002, 0.005, 2.6, None)
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)
def wrapper_reset_opacity(step):
if step < self.config.prune_density_until and step > 0: