pytorch / android-demo-app

PyTorch android examples of usage in applications
1.47k stars 606 forks source link

I got the error when running deeplabv3.py in ImageSegmentation #179

Closed tuxxon closed 3 years ago

tuxxon commented 3 years ago

Could you tell me how to resolve this issue?

$ python3 deeplabv3.py 
Traceback (most recent call last):
  File "deeplabv3.py", line 6, in <module>
    model = torch.hub.load('pytorch/vision:v0.9.0', 'deeplabv3_resnet50', pretrained=True)
  File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 362, in load
    repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, verbose)
  File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 162, in _get_cache_or_reload
    _validate_not_a_forked_repo(repo_owner, repo_name, branch)
  File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 124, in _validate_not_a_forked_repo
    with urlopen(url) as r:
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: rate limit exceeded
jeffxtang commented 3 years ago

Try replacing model = torch.hub.load('pytorch/vision:v0.9.0', 'deeplabv3_resnet50', pretrained=True) with model = torchvision.models.segmentation.deeplabv3_resnet50(pretrained=True)

touchizen commented 3 years ago

Thanks.

touchizen commented 3 years ago

By the way, I forgot this issue. :-)