PruneTruong/DenseMatching

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

Closed this issue · 2 comments

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?

Did you run

from admin.environment import create_default_local_file
create_default_local_file()

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

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