mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-16 04:43:52 +08:00
fixed bug using median depth by accident
This commit is contained in:
1 parent
a617dfa07b
commit
2d1366e1ca
2 files changed
+1
-6
No files matched your search
@@ -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
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user