Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'weights' while using sfd2+imp #59

Closed
eyildiz-ugoe opened this issue Aug 20, 2024 · 3 comments
Closed

KeyError: 'weights' while using sfd2+imp #59

eyildiz-ugoe opened this issue Aug 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@eyildiz-ugoe
Copy link

🐛 Bug Report

[2024/08/20 16:30:50 hloc INFO] Testing sfd2+imp ...
Traceback (most recent call last):
  File "/home/username/image-matching-webui/test_app_cli.py", line 124, in <module>
    test_all(config)
  File "/home/username/image-matching-webui/test_app_cli.py", line 29, in test_all
    api = ImageMatchingAPI(conf=v, device=DEVICE)
  File "/home/username/image-matching-webui/ui/api.py", line 63, in __init__
    self._init_models()
  File "/home/username/image-matching-webui/ui/api.py", line 121, in _init_models
    self.matcher = get_model(self.match_conf)
  File "/home/username/image-matching-webui/ui/utils.py", line 175, in get_model
    model = Model(match_conf["model"]).eval().to(DEVICE)
  File "/home/username/image-matching-webui/hloc/utils/base_model.py", line 17, in __init__
    self._init(conf)
  File "/home/username/image-matching-webui/hloc/matchers/imp.py", line 37, in _init
    self.net = GIM(self.conf).eval().to(DEVICE)
  File "/home/username/image-matching-webui/hloc/utils/base_model.py", line 17, in __init__
    self._init(conf)
  File "/home/username/image-matching-webui/hloc/matchers/gim.py", line 35, in _init
    conf["model_name"] = str(conf["weights"])
KeyError: 'weights'

🔬 How To Reproduce

Enable all methods in the config file and run python test_app_cli.py

Environment

  • OS: Ubuntu 22
  • Python version: 3.10.10
@eyildiz-ugoe eyildiz-ugoe added the bug Something isn't working label Aug 20, 2024
@Vincentqyw
Copy link
Owner

Yes, these are known bugs, so some algorithms are temporarily disabled in the config file. There are conflicts in importing packages. I will fix it in the future. By the way, if you have already found a solution, please submit a PR.
Another known bug: #57

@eyildiz-ugoe
Copy link
Author

So I tried all combinations in the config file, and so far I was able to get all running except for these:

###############THESE WONT WORK FOR NOW#####################
  gluestick:
    enable: false
    matcher: gluestick
    dense: true
    info:
      name: GlueStick #dispaly name
      source: "ICCV 2023"
      github: https://github.com/cvg/GlueStick
      paper: https://arxiv.org/abs/2304.02008
      project: https://iago-suarez.com/gluestick
      display: true
  sold2:
    enable: false
    matcher: sold2
    dense: true
    info:
      name: SOLD2 #dispaly name
      source: "CVPR 2021"
      github: https://github.com/cvg/SOLD2
      paper: https://arxiv.org/abs/2104.03362
      project: null
      display: true
  sfd2+imp:
    enable: false
    skip_ci: true
    matcher: imp
    feature: sfd2
    dense: false
    info:
      name: SFD2+IMP #dispaly name
      source: "CVPR 2023"
      github: https://github.com/feixue94/imp-release
      paper: https://arxiv.org/pdf/2304.14837
      project: https://feixue94.github.io/
      display: true
#########################################################

These threw some error regarding visualization, and I couldn't fix it as I had to delve deeper. Perhaps I can share those bugs too as separate issues.

@Vincentqyw
Copy link
Owner

Fixed sfd2+imp: #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants