hasanirtiza / Pedestron

[Pedestron] Generalizable Pedestrian Detection: The Elephant In The Room. @ CVPR2021
https://openaccess.thecvf.com/content/CVPR2021/papers/Hasan_Generalizable_Pedestrian_Detection_The_Elephant_in_the_Room_CVPR_2021_paper.pdf
Apache License 2.0
682 stars 159 forks source link

HTTPError: HTTP Error 403: Forbidden #134

Closed 17sarf closed 2 years ago

17sarf commented 2 years ago

I want to just thank you for providing the code for the paper.

I have been playing around with some of the pre-trained models. However, I receive the following error message HTTPError: HTTP Error 403: Forbidden. This happens when I model weights are downloaded automatically. For example, when I run the following command: python tools/train.py configs/elephant/cityperson/cascade_hrnet.py.

It begins tries to download the weights file Downloading: "[https://s3.ap-northeast-2.amazonaws.com/open-mmlab/pretrain/third_party/hrnetv2_w32-dc9eeb4f.pth]()" to [/home/sarfraz/.cache/torch/checkpoints/hrnetv2_w32-dc9eeb4f.pth](), however, it ends with the error mentioned.

The full log is:

2022-02-18 02:22:53,623 - INFO - Distributed training: False 2022-02-18 02:22:54,229 - INFO - load model from: open-mmlab://msra/hrnetv2_w32 Downloading: "https://s3.ap-northeast-2.amazonaws.com/open-mmlab/pretrain/third_party/hrnetv2_w32-dc9eeb4f.pth" to /home/sarfraz/.cache/torch/checkpoints/hrnetv2_w32-dc9eeb4f.pth Traceback (most recent call last): File "tools/train.py", line 98, in <module> main() File "tools/train.py", line 76, in main cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg) File "/media/sarfraz/Samsung_T5/Pedestron/mmdet/models/builder.py", line 43, in build_detector return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "/media/sarfraz/Samsung_T5/Pedestron/mmdet/models/builder.py", line 15, in build return build_from_cfg(cfg, registry, default_args) File "/media/sarfraz/Samsung_T5/Pedestron/mmdet/utils/registry.py", line 74, in build_from_cfg return obj_type(**args) File "/media/sarfraz/Samsung_T5/Pedestron/mmdet/models/detectors/cascade_rcnn.py", line 86, in __init__ self.init_weights(pretrained=pretrained) File "/media/sarfraz/Samsung_T5/Pedestron/mmdet/models/detectors/cascade_rcnn.py", line 94, in init_weights self.backbone.init_weights(pretrained=pretrained) File "/media/sarfraz/Samsung_T5/Pedestron/mmdet/models/backbones/hrnet.py", line 425, in init_weights load_checkpoint(self, pretrained, strict=False, logger=logger) File "/home/sarfraz/miniconda3/envs/pedestron_env/lib/python3.7/site-packages/mmcv/runner/checkpoint.py", line 166, in load_checkpoint checkpoint = load_url_dist(open_mmlab_model_urls[model_name]) File "/home/sarfraz/miniconda3/envs/pedestron_env/lib/python3.7/site-packages/mmcv/runner/checkpoint.py", line 115, in load_url_dist checkpoint = model_zoo.load_url(url) File "/home/sarfraz/miniconda3/envs/pedestron_env/lib/python3.7/site-packages/torch/hub.py", line 462, in load_state_dict_from_url _download_url_to_file(url, cached_file, hash_prefix, progress=progress) File "/home/sarfraz/miniconda3/envs/pedestron_env/lib/python3.7/site-packages/torch/hub.py", line 372, in _download_url_to_file u = urlopen(url) File "/home/sarfraz/miniconda3/envs/pedestron_env/lib/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/home/sarfraz/miniconda3/envs/pedestron_env/lib/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/home/sarfraz/miniconda3/envs/pedestron_env/lib/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/home/sarfraz/miniconda3/envs/pedestron_env/lib/python3.7/urllib/request.py", line 569, in error return self._call_chain(*args) File "/home/sarfraz/miniconda3/envs/pedestron_env/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/home/sarfraz/miniconda3/envs/pedestron_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

Thank you in advance.

hasanirtiza commented 2 years ago

The issue is that some of the links are broken, because mmdetection shifted them to new urls. you can have a link at the following issue #111 , hopefully this will solve this problem.