zgojcic / Rigid3DSceneFlow

[CVPR 2021, Oral] "Weakly Supervised Learning of Rigid 3D Scene Flow"
137 stars 18 forks source link

Question about computing Rotation matrix #6

Closed hi-zhengcheng closed 3 years ago

hi-zhengcheng commented 3 years ago

Hi, thanks for the nice work.

When computing the rotation matrix after SVD, the following line transposes both V and U: https://github.com/zgojcic/Rigid3DSceneFlow/blob/7fa57e3ddccf605dca63ded04825bba2272cae4a/lib/utils.py#L335 But I think only U should be transposed here. Is this an error?

I find another implementation in the source code: https://github.com/zgojcic/Rigid3DSceneFlow/blob/7fa57e3ddccf605dca63ded04825bba2272cae4a/lib/model/minkowski/MinkowskiFlow.py#L344 Here only U is transposed.

zgojcic commented 3 years ago

Hi @hi-zhengcheng,

it should indeed be only u^t, but as this is only the computation of the determinant it actually does not matter as det(v) = det(v^t) and det(vu) = det(v) * det(u)

The rotation matrix is computed here: https://github.com/zgojcic/Rigid3DSceneFlow/blob/7fa57e3ddccf605dca63ded04825bba2272cae4a/lib/utils.py#L339

and here only U is transposed.

I hope this makes sense.

Best Zan

hi-zhengcheng commented 3 years ago

Solved my question, thanks for your answer.