germain-hug / S2DHM

Sparse-to-Dense Hypercolumn Matching for Long-Term Visual Localization (3DV 2019)
https://arxiv.org/abs/1907.03965
69 stars 15 forks source link

Intrinsics used for RANSAC PnP #6

Closed lxxue closed 4 years ago

lxxue commented 4 years ago

Hi,

Thanks for the well-written and organized code. I have a question here:

https://github.com/germain-hug/S2DHM/blob/0b9df9c60393528c58957db0cc13ec7813bd2ecc/s2dhm/pose_prediction/sparse_to_dense_predictor.py#L90-L104

Here we are using the matched 2D points in the query image and corresponding 3D points to estimate the camera pose. Since it is about the query image, I feel like we should use the intrinsics and distortion coefficients of the query image, instead of the local reconstruction ones (probably belongs to the reference image)?

germain-hug commented 4 years ago

Hi and apologies for the late reply, Indeed you are correct the query camera parameters should be used, this is an error I had corrected locally but forgot to update on this repository.

lxxue commented 4 years ago

Hi Hugo,

we tried fixing this bug but we found that with this bug, the performance is significantly better than the fixed version on the robotcar's night split:

with reference intrinsics:

28.4 / 69.5 / 94.6

with query intrinsics:

21.5 / 61.3 / 94.5 (similar to the figures in the paper)

Do you have any idea about the reason behind this?

germain-hug commented 4 years ago

Hi,

This is indeed quite strange and unexpected, were you able to compare the query intrinsics with the ones from the database to check if they're correct?

Le mar. 7 juil. 2020 à 16:18, Lixin Xue notifications@github.com a écrit :

Hi Hugo,

we tried fixing this bug but we found that with this bug, the performance is significantly better than the fixed version on the robotcar's night split:

with reference intrinsics:

28.4 / 69.5 / 94.6

with query intrinsics:

21.5 / 61.3 / 94.5 (similar to the figures in the paper)

Do you have any idea about the reason behind this?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/germain-hug/S2DHM/issues/6#issuecomment-654895305, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECUPAO2HQ3KUJGWVTXU4VLR2MVB5ANCNFSM4ODL7CRQ .

lxxue commented 4 years ago

Hi,

They are different but I don't know which one is correct. I also evaluate these two on the cmu dataset:

with reference intrinsics:

      urban                 suburban                 park

47.2 / 71.5 / 93.3 | 39.3 / 63.8 / 91.5 | 26.0 / 47.5 / 80.2 (far below the figures in the paper)

with query intrinsics:

      urban                 suburban                 park

3.3 / 11.9 / 87.0 | 2.0 / 9.6 / 87.6 | 1.8 / 8.5 / 73.9

I wonder if you can reproduce the results in the paper with the default setting or there are some crucial changes not in repo? Also, this result suggests using reference image's intrinsics/distortion coefficients, which is quite strange.