Skip to content

Commit 55001e4

Browse files
author
KevinXu02
committed
update config
1 parent 0715323 commit 55001e4

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

nerfstudio/configs/method_configs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@
723723
strategy="mcmc",
724724
mcmc_opacity_reg=0.01,
725725
mcmc_scale_reg=0.01,
726+
stop_split_at=25000,
726727
),
727728
),
728729
optimizers={

nerfstudio/data/dataparsers/colmap_dataparser.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,17 @@ def _generate_dataparser_outputs(self, split: str = "train", **kwargs):
254254
if not colmap_path.exists():
255255
# Try detecting the colmap path automatically
256256
possible_colmap_paths = ["colmap/sparse/0", "sparse/0", "sparse"]
257-
for colmap_path in possible_colmap_paths:
258-
colmap_path = self.config.data / colmap_path
257+
for path in possible_colmap_paths:
258+
colmap_path = self.config.data / path
259259
if colmap_path.exists():
260-
break
260+
from rich.prompt import Confirm
261+
262+
if Confirm.ask(
263+
f"Detected colmap path {colmap_path}. Do you want to use this path?"
264+
):
265+
self.config.colmap_path = path
266+
break
267+
261268
assert colmap_path.exists(), f"Colmap path {colmap_path} does not exist."
262269

263270
meta = self._get_all_images_and_cameras(colmap_path)

nerfstudio/models/splatfacto.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,10 @@ class SplatfactoModelConfig(ModelConfig):
158158
"""If True, apply color correction to the rendered images before computing the metrics."""
159159
strategy: Literal["default", "mcmc"] = "default"
160160
"""The default strategy will be used if strategy is not specified. Other strategies, e.g. mcmc, can be used."""
161-
cap_max: int = 1_000_000
161+
max_gs_num: int = 1_000_000
162162
"""Maximum number of GSs. Default to 1_000_000."""
163163
noise_lr: float = 5e5
164164
"""MCMC samping noise learning rate. Default to 5e5."""
165-
min_opacity: float = 0.005
166-
"""GSs with opacity below this value will be pruned. Default to 0.005."""
167-
verbose: bool = False
168-
"""Whether to print verbose information. Default to False."""
169-
max_steps: int = 30_000
170-
"""Number of training steps"""
171165
mcmc_opacity_reg: float = 0.01
172166
"""Regularization term for opacity in MCMC strategy. Only enabled when using MCMC strategy"""
173167
mcmc_scale_reg: float = 0.01
@@ -287,13 +281,13 @@ def populate_modules(self):
287281
self.strategy_state = self.strategy.initialize_state(scene_scale=1.0)
288282
elif self.config.strategy == "mcmc":
289283
self.strategy = MCMCStrategy(
290-
cap_max=self.config.cap_max,
284+
cap_max=self.config.max_gs_num,
291285
noise_lr=self.config.noise_lr,
292286
refine_start_iter=self.config.warmup_length,
293287
refine_stop_iter=self.config.stop_split_at,
294288
refine_every=self.config.refine_every,
295-
min_opacity=self.config.min_opacity,
296-
verbose=self.config.verbose,
289+
min_opacity=self.config.cull_alpha_thresh,
290+
verbose=False,
297291
)
298292
self.strategy_state = self.strategy.initialize_state()
299293
else:

0 commit comments

Comments
 (0)