ClementPinard / SfmLearner-Pytorch

Pytorch version of SfmLearner from Tinghui Zhou et al.
MIT License
1.01k stars 224 forks source link

two small questions about PoseExpNet #100

Closed xhnie closed 2 years ago

xhnie commented 4 years ago

Hi Clement,

Thanks so much for publishing the code! I have two questions about PoseExpNet:

The first is about this line https://github.com/ClementPinard/SfmLearner-Pytorch/blob/ae63049a95ec35bfaccce67142d1ae381c484389/models/PoseExpNet.py#L74 Why do you multiple the output of the network by 0.01? Is this a trick and how important is it?

The second is that have you tried using activation function such sigmoid for the rotation output? Will the normalization help the learning?

ClementPinard commented 4 years ago

Short answer : because the original author did so Long answer : Typical results, at least for Kitti are less than 1 or 2° rotation because frames are temporally very close (1/10th of a second), and typical output of a convolutional layer with Xavier initialization is around 1, which is far too much here, because output is expected in gradients. As for sigmoid, it's not clear, had some tests myself back in 2017/2018, and got worse results with it.