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

result = unpickler.load(), ModuleNotFoundError: No module named 'admin.local' #30

Closed
liyuan-repo opened this issue Jul 28, 2023 · 2 comments

Comments

@liyuan-repo
Copy link

When running the demo_single_pair.py, there report an assert error:

Traceback (most recent call last):
File "D:/PyProjects/DenseMatching-main/demos/demo_single_pair.py", line 103, in
network, estimate_uncertainty = select_model(
File "D:\PyProjects\DenseMatching-main\model_selection.py", line 234, in select_model
network = load_network(network, checkpoint_path=checkpoint_fname)
File "D:\PyProjects\DenseMatching-main\model_selection.py", line 28, in load_network
checkpoint_dict = torch.load(checkpoint_path)
File "E:\ProgramData\anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 592, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "E:\ProgramData\anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 851, in _load
result = unpickler.load()
ModuleNotFoundError: No module named 'admin.local'

network = load_network(network, checkpoint_path=checkpoint_fname)
checkpoint_dict = torch.load(checkpoint_path, map_location='cpu')

I set pre_trained_models path as path_to_pre_trained_models = '../pre_trained_models/PDCNet_plus_megadepth.pth.tar'.
how to fix it?

@scott-vsi
Copy link
Contributor

Did you run

from admin.environment import create_default_local_file
create_default_local_file()

per https://github.com/PruneTruong/DenseMatching#1-installation-

@liyuan-repo
Copy link
Author

Thank you very much ,you are right.
The problem has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants