NVlabs / SegFormer

Official PyTorch implementation of SegFormer
https://arxiv.org/abs/2105.15203
Other
2.53k stars 352 forks source link

Problem with loading models #69

Open Ngheissari opened 2 years ago

Ngheissari commented 2 years ago

I get this error:

I get this error while running demo/image_demo. super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading zip archive: failed finding central directory

I think it might have to do with the way models are saved (downloaded from Google drive).

I am running this command: python demo/image_demo.py demo/demo.png local_configs/segformer/B1/segformer.b1.512x512.ade.160k.py checkpoints/segformer.b1.512x512.ade.160k.pth --device cuda:0 --palette cityscapes Use load_from_local loader

Environment:

CUDA 10.1 and pytorch 1.7.1 torchvision==0.8.2 timm==0.3.2 mmcv-full==1.2.7 iopencv-python==4.5.1.48

enginksz commented 1 year ago

Hi, You may have downloaded the pth model incompletely while downloading it. you can try to download the model again.