You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The name of the checkpoint (dirtorch/data/Resnet101-AP-GeM.pt) is wrong and needs to be replaced with dirtorch/data/Resnet-101-AP-GeM.pt.
Besides, $ conda install -c anaconda scikit-learn installs the latest version v0.24.1 as in March 2021 which returns the following error:
Traceback (most recent call last):
File "/home/alijani/.conda/envs/py37/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/alijani/.conda/envs/py37/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/alijani/WS_Farid/OxfordRobotCar/AP-GeM/dirtorch/test_dir.py", line 214, in <module>
net = load_model(args.checkpoint, args.iscuda)
File "/home/alijani/WS_Farid/OxfordRobotCar/AP-GeM/dirtorch/test_dir.py", line 168, in load_model
checkpoint = common.load_checkpoint(path, iscuda)
File "/home/alijani/WS_Farid/OxfordRobotCar/AP-GeM/dirtorch/utils/common.py", line 121, in load_checkpoint
checkpoint = torch.load(filename, map_location=lambda storage, loc: storage)
File "/home/alijani/.conda/envs/py37/lib/python3.7/site-packages/torch/serialization.py", line 595, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/alijani/.conda/envs/py37/lib/python3.7/site-packages/torch/serialization.py", line 774, in _legacy_load
result = unpickler.load()
ModuleNotFoundError: No module named 'sklearn.decomposition.pca'
The text was updated successfully, but these errors were encountered:
Hi @mrgransky! First of all, sorry for the late reply.
Thanks for catching the typo in the README! I'll update it.
PCA whitening was trained with an older version of sklearn, and the code is currently not compatible with 0.24 and above. I need to update the code to fix this bug, but in the meantime you can run the code using an older version of sklearn (eg 0.22, which I know it should work fine).
Hi @almazan, we have integrated DIR into our localization toolbox hloc and this sklearn error is a little annoying. We have a workaround for recent sklearn versions but it is brittle. It would be great to have a permanent fix, e.g. by updating the checkpoints to not pickle PCA but only its parameters. Thanks :)
In the section reproducing results in
README.md
, you have:The name of the checkpoint (
dirtorch/data/Resnet101-AP-GeM.pt
) is wrong and needs to be replaced withdirtorch/data/Resnet-101-AP-GeM.pt
.Besides,
$ conda install -c anaconda scikit-learn
installs the latest versionv0.24.1
as inMarch 2021
which returns the following error:The text was updated successfully, but these errors were encountered: