diff --git a/nerfstudio/model_components/losses.py b/nerfstudio/model_components/losses.py index 7fcfe0419..6a981d664 100644 --- a/nerfstudio/model_components/losses.py +++ b/nerfstudio/model_components/losses.py @@ -291,7 +291,7 @@ def depth_loss( Depth loss scalar. """ if not is_euclidean: - termination_depth = termination_depth / directions_norm + termination_depth = termination_depth * directions_norm steps = (ray_samples.frustums.starts + ray_samples.frustums.ends) / 2 if depth_loss_type == DephtLossType.DS_NERF: diff --git a/nerfstudio/models/depth_nerfacto.py b/nerfstudio/models/depth_nerfacto.py index da4c59002..ac0768fdf 100644 --- a/nerfstudio/models/depth_nerfacto.py +++ b/nerfstudio/models/depth_nerfacto.py @@ -108,7 +108,7 @@ class DepthNerfactoModel(NerfactoModel): metrics, images = super().get_image_metrics_and_images(outputs, batch) ground_truth_depth = batch["depth_image"] if not self.config.is_euclidean_depth: - ground_truth_depth = ground_truth_depth / outputs["directions_norm"] + ground_truth_depth = ground_truth_depth * outputs["directions_norm"] ground_truth_depth_colormap = colormaps.apply_depth_colormap(ground_truth_depth) predicted_depth_colormap = colormaps.apply_depth_colormap(