VQAssessment / FAST-VQA-and-FasterVQA

[ECCV2022, TPAMI2023] FAST-VQA, and its extended version FasterVQA.
https://www.ecva.net/papers/eccv_2022/papers_ECCV/html/1225_ECCV_2022_paper.php
Other
248 stars 25 forks source link

run FAST-VQA.ipynb UnpicklingError: could not find MARK #11

Closed DAVID-Hown closed 2 years ago

DAVID-Hown commented 2 years ago

File /DATA/jupyter/share/haodawei/FAST-VQA/fastvqa/apis/fast_vqa_model.py:55, in VQAModel.load_pretrained(self, pretrained_path, device) 54 def load_pretrained(self, pretrained_path, device): ---> 55 state_dict = torch.load(pretrained_path, map_location=device) 57 if "state_dict" in state_dict: 58 state_dict = state_dict["state_dict"]

File /usr/local/python39/lib/python3.9/site-packages/torch/serialization.py:593, in load(f, map_location, pickle_module, pickle_load_args) 591 return torch.jit.load(opened_file) 592 return _load(opened_zipfile, map_location, pickle_module, pickle_load_args) --> 593 return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)

File /usr/local/python39/lib/python3.9/site-packages/torch/serialization.py:762, in _legacy_load(f, map_location, pickle_module, pickle_load_args) 756 if not hasattr(f, 'readinto') and (3, 8, 0) <= sys.version_info < (3, 8, 2): 757 raise RuntimeError( 758 "torch.load does not work with file-like objects that do not implement readinto on Python 3.8.0 and 3.8.1. " 759 f"Received object of type \"{type(f)}\". Please update to Python 3.8.2 or newer to restore this " 760 "functionality.") --> 762 magic_number = pickle_module.load(f, pickle_load_args) 763 if magic_number != MAGIC_NUMBER: 764 raise RuntimeError("Invalid magic number; corrupt file?")

UnpicklingError: could not find MARK

teowu commented 2 years ago

Maybe you can see the releases in this repo, which provides the correct download links for the pretrained weights.

DAVID-Hown commented 2 years ago

@TimothyHTimothy image Thank you for your reply, I encountered this problem when running this code, this picture is a screenshot of the errorrun FAST-VQA.ipynb

teowu commented 2 years ago

Yes I think this might be due to the broken weights file, and please download the correct one at https://github.com/TimothyHTimothy/FAST-VQA/releases/tag/v1.0.0-open-release-weights. I also recommend you use the new dev branch, where we have provided more choice of weights.

DAVID-Hown commented 2 years ago

Thanks, Wrong Branch。 Now, it works.