mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-12 19:04:03 +08:00
params
This commit is contained in:
1 parent
c92ff1c8a2
commit
b5672dd6fd
2 files changed
+8
-8
No files matched your search
@@ -602,7 +602,7 @@ method_configs["splatfacto"] = TrainerConfig(
|
||||
pipeline=VanillaPipelineConfig(
|
||||
datamanager=FullImageDatamanagerConfig(
|
||||
_target=FullImageDatamanager[DepthDataset],
|
||||
dataparser=NerfstudioDataParserConfig(load_3D_points=True,depth_unit_scale_factor=1.0),
|
||||
dataparser=NerfstudioDataParserConfig(load_3D_points=True,depth_unit_scale_factor=1.0,train_split_fraction=.5),
|
||||
cache_images_type="uint8",
|
||||
),
|
||||
model=SplatfactoModelConfig(
|
||||
@@ -630,14 +630,14 @@ method_configs["splatfacto"] = TrainerConfig(
|
||||
"scheduler": None,
|
||||
},
|
||||
"scales": {
|
||||
"optimizer": AdamOptimizerConfig(lr=0.005, eps=1e-15),
|
||||
"optimizer": AdamOptimizerConfig(lr=0.003, eps=1e-15),
|
||||
"scheduler": None,
|
||||
},
|
||||
"quats": {"optimizer": AdamOptimizerConfig(lr=0.001, eps=1e-15), "scheduler": None},
|
||||
"camera_opt": {
|
||||
"optimizer": AdamOptimizerConfig(lr=2e-5, eps=1e-15),
|
||||
"optimizer": AdamOptimizerConfig(lr=1e-5, eps=1e-15),
|
||||
"scheduler": ExponentialDecaySchedulerConfig(
|
||||
lr_final=5e-7, max_steps=30000, warmup_steps=3000, lr_pre_warmup=0
|
||||
lr_final=5e-7, max_steps=30000, warmup_steps=6000, lr_pre_warmup=0
|
||||
),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -145,7 +145,7 @@ class SplatfactoModelConfig(ModelConfig):
|
||||
"""below this size, gaussians are *duplicated*, otherwise split"""
|
||||
n_split_samples: int = 2
|
||||
"""number of samples to split gaussians into"""
|
||||
sh_degree_interval: int = 3000
|
||||
sh_degree_interval: int = 2000
|
||||
"""every n intervals turn on another sh degree"""
|
||||
split_screen_size: float = 0.05
|
||||
"""if a gaussian is more than this percent of screen space, split it"""
|
||||
@@ -820,7 +820,7 @@ class SplatfactoModel(Model):
|
||||
#convert to float32
|
||||
mask = self._downscale_if_required(batch["mask"].float())
|
||||
mask = mask.to(self.device)
|
||||
mask[mask<1]=0.0
|
||||
mask[mask<1] = 0.0
|
||||
assert mask.shape[:2] == gt_img.shape[:2] == pred_img.shape[:2]
|
||||
gt_img = gt_img * mask
|
||||
pred_img = pred_img * mask
|
||||
@@ -842,8 +842,8 @@ class SplatfactoModel(Model):
|
||||
if 'depth_image' in batch:
|
||||
gt_depth = self.get_gt_img(batch['depth_image'])
|
||||
ignores = gt_depth <= .001
|
||||
# if "mask" in batch:
|
||||
# ignores = ignores | (mask == 0)
|
||||
if "mask" in batch:
|
||||
ignores = ignores | (mask == 0)
|
||||
depth_loss = (gt_depth - outputs['depth'])[~ignores].abs().mean()
|
||||
else:
|
||||
depth_loss = torch.tensor(0.0).to(self.device)
|
||||
|
||||
Reference in new issue
Block a user