ProGamerGov / neural-style-pt

PyTorch implementation of neural style transfer algorithm
MIT License
833 stars 178 forks source link

Access forbidden to VGG-19 model #64

Closed doulouUS closed 4 years ago

doulouUS commented 4 years ago

Issue

VGG-19 cannot be downloaded using the URL to the S3 bucket.

Code

$ python models/download_models.py

Downloading the VGG-19 model
Downloading: "https://s3-us-west-2.amazonaws.com/jcjohns-models/vgg19-d01eb7cb.pth" to /Users/louis/.cache/torch/checkpoints/vgg19-d01eb7cb.pth
Traceback (most recent call last):
  File "models/download_models.py", line 10, in <module>
    sd = load_url("https://s3-us-west-2.amazonaws.com/jcjohns-models/vgg19-d01eb7cb.pth")
  File ".../env/lib/python3.7/site-packages/torch/hub.py", line 492, in load_state_dict_from_url
    download_url_to_file(url, cached_file, hash_prefix, progress=progress)
  File ".../env/lib/python3.7/site-packages/torch/hub.py", line 391, in download_url_to_file
    u = urlopen(url)
  File ".../env/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File ".../env/lib/python3.7/urllib/request.py", line 531, in open
    response = meth(req, response)
  File ".../env/lib/python3.7/urllib/request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File ".../env/lib/python3.7/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File ".../env/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File ".../env/lib/python3.7/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

Or using curl:

$ curl https://s3-us-west-2.amazonaws.com/jcjohns-models/vgg19-d01eb7cb.pth

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>6A3FF8D1FF012D4B</RequestId><HostId>bVI6/cnmD0zRB91VGnfWNpATBNLysl/HTErEmZNPqnudNSPrRUC/dKbZ6KANayZ4P8oYYF1vCbo=</HostId></Error>%  
ProGamerGov commented 4 years ago

I have copies of the models available for download here: https://drive.google.com/drive/folders/1OGKfoIehp2MiJL2Iq_8VMTy76L6waGC8

I'm not sure why the links are giving that error right now.

ProGamerGov commented 4 years ago

https://github.com/jcjohnson/pytorch-vgg/issues/10

I've emailed Justin Johnson about the issue, so hopefully he responds.

doulouUS commented 4 years ago

Alright! thanks for the links too :)

ProGamerGov commented 4 years ago

This issue should be resolved for the moment now!