-
Notifications
You must be signed in to change notification settings - Fork 470
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
_pickle.UnpicklingError: invalid load key, '<'. #180
Comments
I had this issue, but I fixed it by using the version of This version differs with the version specified in the I'm on linux and not using anaconda, so hopefully this fix will still work for you. |
Hey @ashrewdmint , despite the fact that in |
Hey @Balthus1989 and @ashrewdmint ! This has nothing to do with the version of I recommend you download the desired configuration file at this link and change the Dropbox URL to the address of the model on your computer. And then provide the address of your config.yaml file when initializing the Ex.: |
Hey @pedrohavay , unfortunately this method still doesn't work for me. Edit: installing detectron2==0.5 solved the issue. Using detectron2==0.6 always fails. |
@junxi-liu is it possible to install an older version from source? Edit: I found it out by myself. |
Really appreciate the help! |
I am facing error while building the detectron2 base model from the example given in github and I receive the following error. Couldnt find any solution. Is there anyone facing this issue as well?
PLATFORM : Windows 10
model_final.pth: 942kB [00:02, 436kB/s]
Traceback (most recent call last):
File "C:\Users\Alexander\layoutTest\main.py", line 3, in
model = lp.Detectron2LayoutModel(
File "C:\Users\Alexander\anaconda3\envs\detectron_env\lib\site-packages\layoutparser\models\detectron2\layoutmodel.py", line 119, in init
self._create_model()
File "C:\Users\Alexander\anaconda3\envs\detectron_env\lib\site-packages\layoutparser\models\detectron2\layoutmodel.py", line 122, in _create_model
self.model = detectron2.engine.DefaultPredictor(self.cfg)
File "C:\Users\Alexander\layoutTest\detectron2\detectron2\engine\defaults.py", line 288, in init
checkpointer.load(cfg.MODEL.WEIGHTS)
File "C:\Users\Alexander\layoutTest\detectron2\detectron2\checkpoint\detection_checkpoint.py", line 62, in load
ret = super().load(path, *args, **kwargs)
File "C:\Users\Alexander\anaconda3\envs\detectron_env\lib\site-packages\fvcore\common\checkpoint.py", line 155, in load
checkpoint = self._load_file(path)
File "C:\Users\Alexander\layoutTest\detectron2\detectron2\checkpoint\detection_checkpoint.py", line 99, in _load_file
loaded = self._torch_load(filename)
File "C:\Users\Alexander\layoutTest\detectron2\detectron2\checkpoint\detection_checkpoint.py", line 114, in _torch_load
return super()._load_file(f)
File "C:\Users\Alexander\anaconda3\envs\detectron_env\lib\site-packages\fvcore\common\checkpoint.py", line 252, in _load_file
return torch.load(f, map_location=torch.device("cpu"))
File "C:\Users\Alexander\anaconda3\envs\detectron_env\lib\site-packages\torch\serialization.py", line 815, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "C:\Users\Alexander\anaconda3\envs\detectron_env\lib\site-packages\torch\serialization.py", line 1033, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: