Vincentqyw/image-matching-webui

ModuleNotFoundError: No module named nets.sfd2

Closed this issue ยท 2 comments

๐Ÿ› Bug Report

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 126, in _init_models
    self.extractor = get_feature_model(self.conf["feature"])
  File "/home/username/image-matching-webui/ui/utils.py", line 189, in get_feature_model
    Model = dynamic_load(extractors, conf["model"]["name"])
  File "/home/username/image-matching-webui/hloc/utils/base_model.py", line 39, in dynamic_load
    module = __import__(module_path, fromlist=[""])
  File "/home/username/image-matching-webui/hloc/extractors/sfd2.py", line 13, in <module>
    from nets.sfd2 import load_sfd2
ModuleNotFoundError: No module named 'nets.sfd2'

๐Ÿ”ฌ 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

I found a solution to it already, change:

from nets.sfd2 import load_sfd2 in sfd2.py to:

from third_party.pram.nets.sfd2 import load_sfd2

Fixed: #63