sconlyshootery / FeatDepth

This is the offical codes for the methods described in the "Feature-metric Loss for Self-supervised Learning of Depth and Egomotion".
MIT License
247 stars 28 forks source link

perceptional_loss in scale loop #44

Closed Darknesszlx closed 3 years ago

Darknesszlx commented 3 years ago

https://github.com/sconlyshootery/FeatDepth/blob/db7344ae9d9cefafc92983fc8c5b30920751be68/mono/model/mono_fm_joint/net.py#L114-L121

https://github.com/sconlyshootery/FeatDepth/blob/db7344ae9d9cefafc92983fc8c5b30920751be68/mono/model/mono_fm_joint/net.py#L175-L178

perceptional_loss is only computed in scale [1] (1/2 w, 1/2 h), but the code block is in the scale loop. So I think the loss is summed 5 times, and / len(self.opt.scales) at last.

sconlyshootery commented 3 years ago

Yes, the code written in this way is convenient for me to test perceptional loss' effect under different scale. I found it works best at largest scale, so I fixed scale here.

sconlyshootery commented 3 years ago

https://github.com/sconlyshootery/FeatDepth/issues/18#issuecomment-785796082 A similar issue I answered recently, you can refer to it.

sconlyshootery commented 3 years ago

I will close this issue now, if you have further question, please reopen it.