INNER CODE UNIT · Python

normals_dot_b1hw

nianticlabs/simplerecon · losses.py:68

            normals_dot_b1hw = 0.5 * (
                                        1.0 - torch.einsum(
                                                "bchw, bchw -> bhw", 
                                                normals_pred_b3hw, 
                                                normals_gt_b3hw,
                                            )
                                        ).unsqueeze(1)
        normals_loss = normals_dot_b1hw.masked_select(normals_mask_b1hw).mean()

        return normals_loss

class MVDepthLoss(nn.Module):
    def __init__(self, height, width):
        super().__init__()

        self.height = height
        self.width = width

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…