awesome-semantic-segmentation-pytorch
awesome-semantic-segmentation-pytorch copied to clipboard
demo, model file is not found
I run the following:
python demo.py --model psp_resnet50_voc --input-pic /Users/monolith/Desktop/data/VOCdevkit/VOC2007/JPEGImages/000009.jpg
I got
Model file /Users/monolith/.torch/models/resnet50-25c4b509.pth is not found. Downloading. Downloading /Users/monolith/.torch/models/resnet50-25c4b509.zip from https://hangzh.s3.amazonaws.com/encoding/models/resnet50-25c4b509.zip... 100%|████████████████████████████████████████████████████████████████████████████████████| 57428/57428 [00:18<00:00, 3116.00KB/s] Traceback (most recent call last): File "demo.py", line 60, in <module> demo(args) File "demo.py", line 46, in demo model = get_model(args.model, pretrained=True, root=args.save_folder).to(device) File "/Users/monolith/Documents/git_project/awesome-semantic-segmentation-pytorch/core/models/model_zoo.py", line 90, in get_model net = _models[name](**kwargs) File "/Users/monolith/Documents/git_project/awesome-semantic-segmentation-pytorch/core/models/pspnet.py", line 142, in get_psp_resnet50_voc return get_psp('pascal_voc', 'resnet50', **kwargs) File "/Users/monolith/Documents/git_project/awesome-semantic-segmentation-pytorch/core/models/pspnet.py", line 136, in get_psp model.load_state_dict(torch.load(get_model_file('psp_%s_%s' % (backbone, acronyms[dataset]), root=root), File "/Users/monolith/Documents/git_project/awesome-semantic-segmentation-pytorch/core/models/model_store.py", line 69, in get_model_file raise ValueError('Model file is not found in %s. Downloading or trainning.' %file_path) ValueError: Model file is not found in /Users/monolith/.torch/models/psp_resnet50_pascal_voc.pth. Downloading or trainning.
In the root, only one model was downloaded: /Users/monolith/.torch/models/resnet50-25c4b509.pth
I've tried to change the name of this model to psp_resnet50_pascal_voc.pth, but it wouldn't work and the program seems to need the file. Is the model the backbone ? and where should I get the higher level model?
Thank you.
Hi, please change this line to your model path.
Did you solve this problem?
I have the same question, I did not get the model file named "fcn32s_vgg16_pascal_voc.pth" but "vgg16-397923af.pth"
The vgg16-397923af.pth is the pretrained model and the fcn32s_vgg16_pascal_voc.pth is your trained model.
Thanks for your reply, I am aware of the problem, and I followed your Zhihu and blog 😊.
Thank you! Please feel free to contact me on WeChat or Zhihu if you don't mind.
Thanks, that's great!