Git Product home page Git Product logo

Comments (5)

jdubpark avatar jdubpark commented on June 6, 2024 13

Replace the url_map in model/utils.py with:

url_map = {
    'efficientnet-b0': 'https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/efficientnet-b0-355c32eb.pth',
    'efficientnet-b1': 'https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/efficientnet-b1-f1951068.pth',
    'efficientnet-b2': 'https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/efficientnet-b2-8bb594d6.pth',
    'efficientnet-b3': 'https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/efficientnet-b3-5fb5a3c3.pth',
    'efficientnet-b4': 'https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/efficientnet-b4-6ed6700e.pth',
    'efficientnet-b5': 'https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/efficientnet-b5-b6417697.pth',
    'efficientnet-b6': 'https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/efficientnet-b6-c76e70fd.pth',
    'efficientnet-b7': 'https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/efficientnet-b7-dcc49843.pth',
}

These links work.

from efficientdet.pytorch.

josh-marsh avatar josh-marsh commented on June 6, 2024

same issue, but in load_pretrained_weights. When you actually try and open the weights link you get:

Anonymous caller does not have storage.objects.get access to public-models/efficientnet/efficientnet-b0-355c32eb.pth.

from efficientdet.pytorch.

HunbeomBak avatar HunbeomBak commented on June 6, 2024

i have a same problem when run demo.py on pytorch-1.4.0, torchvisoin 0.5.0.

i use command
'python demo.py --threshold 0.5 --iou_threshold 0.5 --score --weight pre_trained/checkpoint_VOC_efficientdet-d0_268.pth --file_name demo.png'

i downloaded pre-traiend model form google drive, but demo.py tried download pre-trained, and occurred same problem.

below is error.

Load pretrained Model
Downloading: "http://storage.googleapis.com/public-models/efficientnet/efficientnet-b0-355c32eb.pth" to /home/jovyan/.cache/torch/checkpoints/efficientnet-b0-355c32eb.pth
Traceback (most recent call last):
  File "demo.py", line 174, in <module>
    detect = Detect(weights=args.weight)
  File "demo.py", line 61, in __init__
    is_training=False
  File "/home/jovyan/work/object_detection/EfficientDet.Pytorch/models/efficientdet.py", line 33, in __init__
    self.backbone = EfficientNet.from_pretrained(MODEL_MAP[network])
  File "/home/jovyan/work/object_detection/EfficientDet.Pytorch/models/efficientnet.py", line 243, in from_pretrained
    model, model_name, load_fc=(num_classes == 1000))
  File "/home/jovyan/work/object_detection/EfficientDet.Pytorch/models/utils.py", line 319, in load_pretrained_weights
    state_dict = model_zoo.load_url(url_map[model_name])
  File "/opt/conda/lib/python3.7/site-packages/torch/hub.py", line 495, in load_state_dict_from_url
    download_url_to_file(url, cached_file, hash_prefix, progress=progress)
  File "/opt/conda/lib/python3.7/site-packages/torch/hub.py", line 394, in download_url_to_file
    u = urlopen(url)
  File "/opt/conda/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/conda/lib/python3.7/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/opt/conda/lib/python3.7/urllib/request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File "/opt/conda/lib/python3.7/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/opt/conda/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/opt/conda/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

from efficientdet.pytorch.

Erotemic avatar Erotemic commented on June 6, 2024

Looks like the pretrained weight urls have gone bad.

from efficientdet.pytorch.

dscarmo avatar dscarmo commented on June 6, 2024

Same problem. Just created a pull request to fix the links.

from efficientdet.pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.