nianticlabs / monodepth2

[ICCV 2019] Monocular depth estimation from a single image
Other
4.05k stars 949 forks source link

I don't know if auto mask works well. #471

Open WonJunPark opened 1 year ago

WonJunPark commented 1 year ago

https://github.com/nianticlabs/monodepth2/issues/264 In other issues, auto mask is mentioned to summarize the code below.

min_reprojection_loss, idx1 = torch.min(reprojection_loss, dim=1) min_identity_reprojection_loss, idx2 = torch.min(identity_reprojection_loss, dim=1) automask = (min_reprojection_loss < min_identity_reprojection_loss).float() to_optimise2 = min_reprojection_loss * automask

But looking at the results, the two values were different. line 425, to_optimise2 = [0.2001, 0.4251, 0.0000] line 439, to_optimise = [0.2001, 0.4251, 0.4891]

I don't understand what the code wrote implicitly. combined = torch.cat((identity_reprojection_loss, reprojection_loss), dim=1)

image

daniyar-niantic commented 1 year ago

Sorry, it is unclear what is in the screenshots. Could you share a self-contained code snippet please.

Shaw-Way commented 7 months ago

Good question, have you tried which solution works better?