Skip to content

About the gradient loss used when computing depth loss #103

@ttt-y

Description

@ttt-y

Hi, thanks for your excellent work and I learned a lot from the paper! I notice that there is a gradient loss in the depth loss

return self.depth_loss(depth_pred.reshape(1, 32, 32), (depth_gt * 50 + 0.5).reshape(1, 32, 32), mask.reshape(1, 32, 32))
 if self.__alpha > 0:
       total += self.__alpha * self.__regularization_loss(self.__prediction_ssi, target, mask)

I'm confused about this term, since in dataloader we get rays as

self.sampling_idx = torch.randperm(self.total_pixels)[:sampling_size]
ground_truth["depth"] = self.depth_images[idx][self.sampling_idx, :]

Thus, the 1024 sampled pixels are randomly selected and may not be spatially adjacent to each other. Could these pixels directly be reshaped as [32, 32] and compute gradient loss like this? I might have missed some implementation details, so I'm not sure if I understand this correctly.

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions