HarborYuan / ovsam

[ECCV 2024] The official code of paper "Open-Vocabulary SAM".
https://www.mmlab-ntu.com/project/ovsam
Other
945 stars 28 forks source link

_pickle.UnpicklingError: invalid load key, 'v'. #4

Closed CVHub520 closed 10 months ago

CVHub520 commented 10 months ago

Hello,

When I attempt to execute the test case using the following command:

python tools/test.py seg/configs/ovsam/ovsam_coco_rn50x16_point.py

I encountered the following error. Could you please guide me on how to resolve it? Any assistance would be greatly appreciated.

Error Details:

Traceback (most recent call last):
  File "tools/test.py", line 177, in <module>
    main()
  File "tools/test.py", line 141, in main
    runner = Runner.from_cfg(cfg)
  ...
  ...
  ...
  _pickle.UnpicklingError: invalid load key, 'v'.

Thank you!

CVHub520 commented 10 months ago

It seems like I've identified the issue; it appears that the model wasn't downloaded completely.

HarborYuan commented 10 months ago

The inference command should look like this:

bash tools/dist.sh test seg/configs/ovsam/ovsam_coco_rn50x16_point.py 8

where 8 is your number of GPUs.

Your issue is because python considers ./tools as the project path and cannot find the config path. If you insist on your command, which only supports single-gpu inference, you can add PYTHONPATH=. before your command.

HarborYuan commented 10 months ago

It seems like I've identified the issue; it appears that the model wasn't downloaded completely.

That sounds reasonable. Please let me know if you have any other questions.