zju3dv / LoFTR

Code for "LoFTR: Detector-Free Local Feature Matching with Transformers", CVPR 2021, T-PAMI 2022

Home Page:https://zju3dv.github.io/loftr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to reproduce inference results

howard5758 opened this issue · comments

Hi,

First I'd like to sincerely thank the author for sharing this amazing work.
When I tried the provided colab with default setting (indoor), the resulting plot was quite poor.
Screenshot 2021-08-16 185650

Similar problem occurred when I cloned the repo and tested on both indoor and outdoor pairs on
indoor_ds.ckpt and outdoor_ds.ckpt

Can anyone advise on this?
Thank you very much!

Hi @howard5758, a recent bug fix (3955e99 and #41) breaks the compatibility of the released model weights. We will fix this issue very soon and release the new models, thanks for the heads up.

Understood. Thank you so much for the quick response and the information :)

commented

Hi, this issue has been fixed in the most recent commit.

Hi, thanks for the prompt actions.

I cloned the repo again and first encountered the following error:
loftr_error1
I removed the line "temp_bug_fix=config['coarse']['temp_bug_fix'])" and it still gave similar inference result as yesterday.
I then downloaded the new indoor_ds model you shared earlier, but saw a bunch of missing keys in state_dict and was unable to perform inference.
loftr_error2

Really appreciate your help :)

commented

Hi @howard5758, can you share the script(mytest.py) and the config you are using? I think this relates to a misconfiguration of the project (e.g. mixing old & new files🤔).

Hi @angshine , mytest.py is basically the exact same code from demo_single_pair.ipynb
The only part I modified is commenting out "temp_bug_fix=config['coarse']['temp_bug_fix'])" in src/loftr/loftr.py
Currently the provided colab is still giving me the keyerror:
loftr_error3
Can you kindly double check the colab maybe then I can directly follow the steps there.
Thank you very much!

commented

Hi, sorry for the inconvenience, and thank you for your time! I have updated the code and tested the colab and demo_single_pair.ipynb results, and they all work appropriately now. Just make sure you use temp_buf_fix=True with the new ckpt. We will polish the logic in later releases.

Hi, I can confirm the provided colab work appropriately. Thank you so much for the help!

commented

Hi! Just wonder if the new trained weight is updated ?

The updated weight is in the google drive folder here
image

commented

Thanks! Such a good news. Are they all updated ? All the cases?

@JiamingSuen Can you also update outdoor_ds.ckpt? I still see the problem mentioned above with outdoor_ds.ckpt.