nianticlabs / marepo

[CVPR 2024 Highlight] Map-Relative Pose Regression for Visual Re-Localization
https://nianticlabs.github.io/marepo/
Other
104 stars 8 forks source link

Difference in rotation loss between this repo and the paper. #1

Closed jubelsM closed 3 months ago

jubelsM commented 3 months ago

Hi, in the paper (eq 6). it is stated the rotation loss is L1 for both the rotation and translation, in the loss.py the PoseLossMapFree/PoseLossMapFree_C2F uses angular loss. Which loss should I use when trying to reproduce the results of fine-tuning on a single scene?

tcavallari commented 3 months ago

Hi, thank you for raising this issue.

We used the rotation loss from the MapFree paper (Arnold et al., "Map-free visual relocalization: Metric pose relative to a single image") which minimizes the angular error between the two rotation matrices. The formula should indeed look like this (with a slight abuse of notation): image

The version in the code is correct, you should be able to reproduce the fine tuning results with the scripts provided in the repository.