baegwangbin / surface_normal_uncertainty

[ICCV 2021 Oral] Estimating and Exploiting the Aleatoric Uncertainty in Surface Normal Estimation
MIT License
217 stars 22 forks source link

_pickle.UnpicklingError: invalid load key, '<' #9

Open atzshjh opened 8 months ago

atzshjh commented 8 months ago

(test) jiehu@jiehu-Z490-AORUS-MASTER:/media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty$ python test.py --pretrained scannet --architecture BN loading checkpoint... /media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty/checkpoints/scannet.pt Using cache found in /home/jiehu/.cache/torch/hub/rwightman_gen-efficientnet-pytorch_master Downloading: "https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b5_ap-9e82fae8.pth" to /home/jiehu/.cache/torch/hub/checkpoints/tf_efficientnet_b5_ap-9e82fae8.pth Loading base model ()...ffff: <_io.BufferedReader name='/home/jiehu/.cache/torch/hub/checkpoints/tf_efficientnet_b5_ap-9e82fae8.pth'> Done. Removing last two layers (global_pool & classifier). fpath: /media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty/checkpoints/scannet.pt ffff: <_io.BufferedReader name='/media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty/checkpoints/scannet.pt'> Traceback (most recent call last): File "test.py", line 97, in model = utils.load_checkpoint(checkpoint, model) File "/media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty/utils/utils.py", line 49, in load_checkpoint ckpt = torch.load(fpath, map_location='cpu')['model'] File "/home/jiehu/anaconda3/envs/test/lib/python3.8/site-packages/torch/serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "/home/jiehu/anaconda3/envs/test/lib/python3.8/site-packages/torch/serialization.py", line 920, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) _pickle.UnpicklingError: invalid load key, '<'.

maybe the checkpoint file is not correct, please help check it, thanks.

Genshin-Impact-king commented 8 months ago

have you solved this?

Genshin-Impact-king commented 8 months ago

it may be helpful for you #4

baegwangbin commented 7 months ago

Sorry for the delayed response.

Are you still experiencing this issue?

johanna0626 commented 6 months ago

This is because the model downloaded by download.py is incomplete (you can check the *.pt file yourself). Downloading the complete file from the author's Google Drive and putting it in the corresponding data folders can solve this problem.