fixed bug using median depth by accident

This commit is contained in:
AdamRashid96 committed 2023-06-20 00:00:18 +00:00
1 parent a617dfa07b
commit 2d1366e1ca
2 files changed
+1 -6

No files matched your search

+1 -1
View File
@@ -105,7 +105,7 @@ class DepthNerfactoModel(NerfactoModel):
loss_dict["depth_loss"] = self.config.depth_loss_mult * metrics_dict["depth_loss"]
else:
loss_dict["depth_ranking"] = np.interp(self.step, [0, 2000], [0, 0.2]) * depth_ranking_loss(
outputs["depth"], batch["depth_image"]
outputs["expected_depth"], batch["depth_image"]
)
# Else use depth ranking loss
-5
View File
@@ -45,7 +45,6 @@ from nerfstudio.model_components.losses import (
orientation_loss,
pred_normal_loss,
scale_gradients_by_distance_squared,
depth_ranking_loss,
)
from nerfstudio.model_components.ray_samplers import (
ProposalNetworkSampler,
@@ -359,10 +358,6 @@ class NerfactoModel(Model):
loss_dict["pred_normal_loss"] = self.config.pred_normal_loss_mult * torch.mean(
outputs["rendered_pred_normal_loss"]
)
if "depth_image" in batch:
loss_dict["depth_ranking"] = np.interp(self.step, [0, 2000], [0, 0.2]) * depth_ranking_loss(
outputs["depth"], batch["depth_image"]
)
return loss_dict
def get_image_metrics_and_images(