Thank you for your great work! I tried to generate the category embedding using the provided checkpoint promptdet_resources/prompt_learner/lvis/model.pth.tar-6 in the following command
# stage-I: generate the category embeddings
python tools/promptdet/gen_category_embedding.py --model-file promptdet_resources/prompt_learner/lvis/model.pth.tar-6 --name-file promptdet_resources/lvis_category_and_description.txt --out-file promptdet_resources/reproduce_lvis_category_embeddings.pt
However, it shows error RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
The same error also occurs when I directly load the checkpoint file using torch.load():
>>> import torch
>>> x = torch.load("promptdet_resources/prompt_learner/lvis/model.pth.tar-6")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/weijianxu/anaconda3/envs/dassl/lib/python3.8/site-packages/torch/serialization.py", line 705, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/home/weijianxu/anaconda3/envs/dassl/lib/python3.8/site-packages/torch/serialization.py", line 242, in __init__
super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
Based on the above observations, I think the error probably comes from the corrupted model.pth.tar-6 file. My PyTorch version is 1.12.1 but I also tried PyTorch 1.9.0 and got the same error message. Thus, I wonder if the authors could check the completeness of the checkpoint and may provide an updated version. Thanks!
Thank you for your great work! I tried to generate the category embedding using the provided checkpoint
promptdet_resources/prompt_learner/lvis/model.pth.tar-6in the following command# stage-I: generate the category embeddings python tools/promptdet/gen_category_embedding.py --model-file promptdet_resources/prompt_learner/lvis/model.pth.tar-6 --name-file promptdet_resources/lvis_category_and_description.txt --out-file promptdet_resources/reproduce_lvis_category_embeddings.ptHowever, it shows error
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directoryThe same error also occurs when I directly load the checkpoint file using
torch.load():Based on the above observations, I think the error probably comes from the corrupted
model.pth.tar-6file. My PyTorch version is 1.12.1 but I also tried PyTorch 1.9.0 and got the same error message. Thus, I wonder if the authors could check the completeness of the checkpoint and may provide an updated version. Thanks!