dontLoveBugs / DORN_pytorch

PyTorch implementation of Deep Ordinal Regression Network for Monocular Depth Estimation
298 stars 67 forks source link

How to deal with depth = 0 ? #23

Closed Fangyh09 closed 4 years ago

Fangyh09 commented 4 years ago

Hello, when depth is zero, then log(depth) is illegal. How to deal with it ? https://github.com/dontLoveBugs/DORN_pytorch/blob/4fed3629282849af66f2d7fff12e12a06fb68b7e/utils.py#L91-L115

LiZhenLiangLee commented 4 years ago

@Fangyh09 Hi, I think you can find the answer in Section 3.2 of this paper. They add a shift to both alpha and beta to apply SID .

dontLoveBugs commented 4 years ago

You need add a valid mask(gt > 0.) to make all ground truth values are valid, so torch.log(depth) is illegal but doesn't make a difference.