Train pretrained faster RCNN with resnet101 FPN as backbone
#993 aberto em 5 de jun. de 2019
Métricas do repositório
- Stars
- (15.050 stars)
- Métricas de merge de PR
- (Mesclagem média 12d 8h) (14 fundiu PRs em 30d)
Description
I want to use pretrain faster rcnn of resnet101 FPN to train with my own dataset. But, it fails to download pretrain faster-rcnn model of resnet101 FPN. This is my code of model part: backbone =torchvision.models.detection.backbone_utils.resnet_fpn_backbone('resnet101','False') model_urls ={'resnet101_fpn':'https://download.pytorch.org/models/fasterrcnn_resnet101_fpn_coco-258fb6c6.pth'} state_dict = load_state_dict_from_url(model_urls['resnet101_fpn']) model = FasterRCNN(backbone,num_classes=2)
The error looks like this:
Downloading: "https://download.pytorch.org/models/resnet101-5d3b4d8f.pth" to /home/user/.cache/torch/checkpoints/resnet101-5d3b4d8f.pth 100%|###############################################################| 178728960/178728960 [00:07<00:00, 23374182.30it/s] Downloading: "https://download.pytorch.org/models/fasterrcnn_resnet101_fpn_coco-258fb6c6.pth" to /home/user/.cache/torch/checkpoints/fasterrcnn_resnet101_fpn_coco-258fb6c6.pth Traceback (most recent call last): File "detect.py", line 59, in state_dict = load_state_dict_from_url(model_urls['resnet101_fpn']) File "/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/hub.py", line 433, in load_state_dict_from_url _download_url_to_file(url, cached_file, hash_prefix, progress=progress) File "/home/user/miniconda/envs/py36/lib/python3.6/site-packages/torch/hub.py", line 349, in _download_url_to_file u = urlopen(url) File "/home/user/miniconda/envs/py36/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/home/user/miniconda/envs/py36/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/home/user/miniconda/envs/py36/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/home/user/miniconda/envs/py36/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(*args) File "/home/user/miniconda/envs/py36/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/home/user/miniconda/envs/py36/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden