mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 15:28:49 +08:00
Merge branch 'main' into maturk/splatfacto_self_properties
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -223,7 +223,7 @@ class NGPModel(Model):
|
|||||||
return metrics_dict
|
return metrics_dict
|
||||||
|
|
||||||
def get_loss_dict(self, outputs, batch, metrics_dict=None):
|
def get_loss_dict(self, outputs, batch, metrics_dict=None):
|
||||||
image = batch["image"][..., :3].to(self.device)
|
image = batch["image"].to(self.device)
|
||||||
pred_rgb, image = self.renderer_rgb.blend_background_for_loss_computation(
|
pred_rgb, image = self.renderer_rgb.blend_background_for_loss_computation(
|
||||||
pred_image=outputs["rgb"],
|
pred_image=outputs["rgb"],
|
||||||
pred_accumulation=outputs["accumulation"],
|
pred_accumulation=outputs["accumulation"],
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ class TensoRFModel(Model):
|
|||||||
def get_loss_dict(self, outputs, batch, metrics_dict=None) -> Dict[str, torch.Tensor]:
|
def get_loss_dict(self, outputs, batch, metrics_dict=None) -> Dict[str, torch.Tensor]:
|
||||||
# Scaling metrics by coefficients to create the losses.
|
# Scaling metrics by coefficients to create the losses.
|
||||||
device = outputs["rgb"].device
|
device = outputs["rgb"].device
|
||||||
image = batch["image"][..., :3].to(device)
|
image = batch["image"].to(device)
|
||||||
pred_image, image = self.renderer_rgb.blend_background_for_loss_computation(
|
pred_image, image = self.renderer_rgb.blend_background_for_loss_computation(
|
||||||
pred_image=outputs["rgb"],
|
pred_image=outputs["rgb"],
|
||||||
pred_accumulation=outputs["accumulation"],
|
pred_accumulation=outputs["accumulation"],
|
||||||
|
|||||||
Reference in new issue
Block a user