xy-guo / Learning-Monocular-Depth-by-Stereo

Learning Monocular Depth by Distilling Cross-domain Stereo Networks, ECCV18
https://arxiv.org/abs/1808.06586
MIT License
94 stars 8 forks source link

what is the meaning of this code? #5

Closed sazippe closed 5 years ago

sazippe commented 5 years ago

Learning-Monocular-Depth-by-Stereo/models/monocular_model.py

110 def forward(self, x): 111 mean = Variable(torch.FloatTensor([0.485, 0.456, 0.406])).cuda() 112 var = Variable(torch.FloatTensor([0.229, 0.224, 0.225])).cuda() 113 x = (x - mean.view(1, -1, 1, 1)) / (var.view(1, -1, 1, 1))

Why is this done in monocular model, but does not done this in stereo model? Thank you.

xy-guo commented 5 years ago

I think you could get similar results after moving 111-113.

kwea123 commented 5 years ago

It's data normalization but doesn't have much influence on the final performance.

sazippe commented 5 years ago

Thank you! But why normalization is done only in monocular model? Is it because monocular model use pretrained vgg16 weight?

xy-guo commented 5 years ago

I think the normalization is not so important. You can add or remove the normalization for the mono/stereo models and the performance will not change.