mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 15:28:49 +08:00
bug fix for splatfacto (#3367)
* bug fix for splatfacto * fix core tests * Remove ipynb exclude for ruff, will fix in #3369 --------- Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
1 parent
096116097a
commit
a281d99eac
2 files changed
+2
-1
No files matched your search
@@ -472,9 +472,9 @@ class SplatfactoModel(Model):
|
|||||||
avg_grad_norm = (self.xys_grad_norm / self.vis_counts) * 0.5 * max(self.last_size[0], self.last_size[1])
|
avg_grad_norm = (self.xys_grad_norm / self.vis_counts) * 0.5 * max(self.last_size[0], self.last_size[1])
|
||||||
high_grads = (avg_grad_norm > self.config.densify_grad_thresh).squeeze()
|
high_grads = (avg_grad_norm > self.config.densify_grad_thresh).squeeze()
|
||||||
splits = (self.scales.exp().max(dim=-1).values > self.config.densify_size_thresh).squeeze()
|
splits = (self.scales.exp().max(dim=-1).values > self.config.densify_size_thresh).squeeze()
|
||||||
|
splits &= high_grads
|
||||||
if self.step < self.config.stop_screen_size_at:
|
if self.step < self.config.stop_screen_size_at:
|
||||||
splits |= (self.max_2Dsize > self.config.split_screen_size).squeeze()
|
splits |= (self.max_2Dsize > self.config.split_screen_size).squeeze()
|
||||||
splits &= high_grads
|
|
||||||
nsamps = self.config.n_split_samples
|
nsamps = self.config.n_split_samples
|
||||||
split_params = self.split_gaussians(splits, nsamps)
|
split_params = self.split_gaussians(splits, nsamps)
|
||||||
|
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ lint.ignore = [
|
|||||||
"PLR0912", # Too many branches.
|
"PLR0912", # Too many branches.
|
||||||
"PLW0603", # Globa statement updates are discouraged.
|
"PLW0603", # Globa statement updates are discouraged.
|
||||||
"PLW2901", # For loop variable overwritten.
|
"PLW2901", # For loop variable overwritten.
|
||||||
|
"PLR1730", # Replace if statement with min/max
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.ruff.lint.isort]
|
[tool.ruff.lint.isort]
|
||||||
|
|||||||
Reference in new issue
Block a user