idealo / image-super-resolution

🔎 Super-scale your images and run experiments with Residual Dense and Adversarial Networks.
https://idealo.github.io/image-super-resolution/
Apache License 2.0
4.67k stars 768 forks source link

Download model weights connection timed out #236

Open Waterkin opened 2 years ago

Waterkin commented 2 years ago

Hi, I am trying to download the weights of the model, but get:

Downloading data from https://public-asai-dl-models.s3.eu-central-1.amazonaws.com/ISR/rrdn-C4-D3-G32-G032-T10-x4-GANS/rrdn-C4-D3-G32-G032-T10-x4_epoch299.hdf5

File "flask_cam.py", line 89, in gradcam
    rdn = RRDN(weights="gans")
  File "/dev_data/wlh/conda/envs/noisy/lib/python3.8/site-packages/ISR-2.2.0-py3.8.egg/ISR/models/rrdn.py", line 91, in __init__
    weights_path = tf.keras.utils.get_file(fname=fname, origin=url)
  File "/dev_data/wlh/conda/envs/noisy/lib/python3.8/site-packages/keras-2.11.0-py3.8.egg/keras/utils/data_utils.py", line 304, in get_file
    raise Exception(error_msg.format(origin, e.errno, e.reason))
Exception: URL fetch failure on https://public-asai-dl-models.s3.eu-central-1.amazonaws.com/ISR/rrdn-C4-D3-G32-G032-T10-x4-GANS/rrdn-C4-D3-G32-G032-T10-x4_epoch299.hdf5: None -- [Errno 110] Connection timed out

Then, I turn to load the model with the weights in weights/xxx/xxx.hdf5, and get

  File "flask_cam.py", line 90, in gradcam
    rdn.model.load_weights(
  File "/dev_data/wlh/conda/envs/noisy/lib/python3.8/site-packages/keras-2.11.0-py3.8.egg/keras/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/dev_data/wlh/conda/envs/noisy/lib/python3.8/site-packages/h5py/_hl/files.py", line 406, in __init__
    fid = make_fid(name, mode, userblock_size,
  File "/dev_data/wlh/conda/envs/noisy/lib/python3.8/site-packages/h5py/_hl/files.py", line 173, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (file signature not found)

Maybe the network wall in China blocks the connection. Are there any solutions? Thanks in advance!

y2k0999 commented 11 months ago

did you ever resolve this? I'm in China too. I tried with a VPN and proxy but couldn't get it to download :(

Edit: I used a proxy to HK and a browser to download on Windows. wget with VPN on Ubuntu didn't work for some reason.

BaiLuQiShuang commented 2 months ago

可以在Windows上开梯子下载,但是下载后应该放到哪个文件夹下?weights吗? You can use vpn on Windows to download, but which folder should you put it in after downloading? weights?