wuhuikai / FastFCN

FastFCN: Rethinking Dilated Convolution in the Backbone for Semantic Segmentation.
http://wuhuikai.me/FastFCNProject
Other
838 stars 148 forks source link

RuntimeError: Failed downloading #71

Closed bufferXia closed 4 years ago

bufferXia commented 4 years ago

Hi, thanks for your work. I try to run your code to train a model on the pascalContext dataset.But I got the following error: RuntimeError: Failed downloading url https://hangzh.s3.amazonaws.com/encoding/models/resnet50-ebb6acbb.zip I find the problem is I can not download the pretrained model. I find the author no longer provide the pretrained resnet model. https://github.com/zhanghang1989/PyTorch-Encoding/issues/273

So, How can I solve this problem. Thanks for your consideration.

wuhuikai commented 4 years ago

Please try this link: https://hangzh.s3.amazonaws.com/encoding/gluoncvth/resnet50-0ef8ed2d.zip. You can download other models by modifying the above link according to this.

bufferXia commented 4 years ago

Please try this link: https://hangzh.s3.amazonaws.com/encoding/gluoncvth/resnet50-0ef8ed2d.zip. You can download other models by modifying the above link according to this.

Think you for you reply,I update the download url according to the link you given.But the problem still exit. I can not got the pretrained model from the server. RuntimeError: Failed downloading url https://hangzh.s3.amazonaws.com/encoding/models/resnet50-0ef8ed2d.zip

I try to solve this problem by setting deep_base = False and download the pretrained resnet from pytorch. But I think this will reduce model performance.

wuhuikai commented 4 years ago

Replace L11-L27 in this file to L9-L24 in this file.

E18301194 commented 4 years ago

Hello, I have used your method, and the part of the file cannot be downloaded after replacing the file. How can I solve this bug?

Where can I download this pre-trained model? I ran this code before, but I couldn't find the downloaded pre-trained model. I want to manually move the file to the folder. Is this method possible?

wuhuikai commented 4 years ago

Yes, but currently I do not have the pre-trained model either. I will upload the model after a week. Please remind me if I did not. Besides, what's the error message when you follow the instructions above?

E18301194 commented 4 years ago

Hello, when I execute pip install torch-encoding --pre --upgrade, the pre-training bug disappeared, but the new bug I encountered now, and the bug is not resolved is as follows:

Traceback (most recent call last): File "train.py", line 176, in trainer = Trainer(args) File "train.py", line 55, in init base_size = args.base_size, crop_size = args.crop_size) File "/home/kongmeng/.local/lib/python3.5/site-packages/encoding/models/sseg/init.py", line 20, in get_segmentation_model return modelsname.lower() File "/home/kongmeng/.local/lib/python3.5/site-packages/encoding/models/sseg/encnet.py", line 140, in get_encnet model = EncNet(datasets[dataset.lower()].NUM_CLASS, backbone=backbone, root=root, kwargs) File "/home/kongmeng/.local/lib/python3.5/site-packages/encoding/models/sseg/encnet.py", line 24, in init norm_layer=norm_layer, kwargs) File "/home/kongmeng/.local/lib/python3.5/site-packages/encoding/models/sseg/base.py", line 71, in init *args, kwargs) File "/home/kongmeng/.local/lib/python3.5/site-packages/encoding/models/sseg/base.py", line 51, in get_backbone net = models[name](kwargs) File "/home/kongmeng/.local/lib/python3.5/site-packages/encoding/models/backbone/resnet.py", line 301, in resnet50 model = ResNet(Bottleneck, [3, 4, 6, 3], **kwargs) TypeError: init() got an unexpected keyword argument 'jpu'

Hope to get your help, it will be of great help to my work

wuhuikai commented 4 years ago

pip install torch-encoding --pre --upgrade didn't install FastFCN :(

E18301194 commented 4 years ago

Thank you for your reply. When I deleted torch-encoding, it was still the previous bug, and I couldn't download the pre-trained model. I did not think of a solution. The bug information is as follows:

Model file /home/kongmeng/.encoding/models/resnet50-ebb6acbb.pth is not found. Downloading. Downloading /home/kongmeng/.encoding/models/resnet50-ebb6acbb.zip from https://hangzh.s3.amazonaws.com/encoding/models/resnet50-ebb6acbb.zip... Traceback (most recent call last): File "train.py", line 176, in trainer = Trainer(args) File "train.py", line 55, in init base_size = args.base_size, crop_size = args.crop_size) File "/home/kongmeng/anaconda3/envs/fastfcn/lib/python3.5/site-packages/encoding/models/init.py", line 18, in get_segmentation_model return modelsname.lower() File "/home/kongmeng/anaconda3/envs/fastfcn/lib/python3.5/site-packages/encoding/models/encnet.py", line 143, in get_encnet model = EncNet(datasets[dataset.lower()].NUM_CLASS, backbone=backbone, root=root, kwargs) File "/home/kongmeng/anaconda3/envs/fastfcn/lib/python3.5/site-packages/encoding/models/encnet.py", line 24, in init norm_layer=norm_layer, kwargs) File "/home/kongmeng/anaconda3/envs/fastfcn/lib/python3.5/site-packages/encoding/models/base.py", line 40, in init norm_layer=norm_layer, root=root) File "/home/kongmeng/anaconda3/envs/fastfcn/lib/python3.5/site-packages/encoding/dilated/resnet.py", line 263, in resnet50 get_model_file('resnet50', root=root)), strict=False) File "/home/kongmeng/anaconda3/envs/fastfcn/lib/python3.5/site-packages/encoding/models/model_store.py", line 74, in get_model_file overwrite=True) File "/home/kongmeng/anaconda3/envs/fastfcn/lib/python3.5/site-packages/encoding/utils/files.py", line 60, in download raise RuntimeError("Failed downloading url %s"%url) RuntimeError: Failed downloading url https://hangzh.s3.amazonaws.com/encoding/models/resnet50-ebb6acbb.zip

E18301194 commented 4 years ago

Hello, I have found the code for running fastfcn and this pre-training model Res50 and Res101 in another location of my computer. Now this bug has been solved. Thank you for your continued help. If you need this pre-training model, I can privately send you

chandratejatiriveedhi commented 1 year ago

Hi @E18301194 , I had the same issue, can you please guide me on how I can fix the problem and the pre-training model of Res50 and Res101.