Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
6bf920b9
Unverified
Commit
6bf920b9
authored
Dec 05, 2019
by
Francisco Massa
Committed by
GitHub
Dec 05, 2019
Browse files
[BC-breaking] Update KeypointRCNN weights (#1609)
* Update KeypointRCNN weights with correct file * Fix model * Fix
parent
99384107
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
torchvision/models/detection/keypoint_rcnn.py
torchvision/models/detection/keypoint_rcnn.py
+8
-2
No files found.
torchvision/models/detection/keypoint_rcnn.py
View file @
6bf920b9
...
...
@@ -259,8 +259,11 @@ class KeypointRCNNPredictor(nn.Module):
model_urls
=
{
'keypointrcnn_resnet50_fpn_coco'
:
# legacy model for BC reasons, see https://github.com/pytorch/vision/issues/1606
'keypointrcnn_resnet50_fpn_coco_legacy'
:
'https://download.pytorch.org/models/keypointrcnn_resnet50_fpn_coco-9f466800.pth'
,
'keypointrcnn_resnet50_fpn_coco'
:
'https://download.pytorch.org/models/keypointrcnn_resnet50_fpn_coco-fc266e95.pth'
,
}
...
...
@@ -312,7 +315,10 @@ def keypointrcnn_resnet50_fpn(pretrained=False, progress=True,
backbone
=
resnet_fpn_backbone
(
'resnet50'
,
pretrained_backbone
)
model
=
KeypointRCNN
(
backbone
,
num_classes
,
num_keypoints
=
num_keypoints
,
**
kwargs
)
if
pretrained
:
state_dict
=
load_state_dict_from_url
(
model_urls
[
'keypointrcnn_resnet50_fpn_coco'
],
key
=
'keypointrcnn_resnet50_fpn_coco'
if
pretrained
==
'legacy'
:
key
+=
'_legacy'
state_dict
=
load_state_dict_from_url
(
model_urls
[
key
],
progress
=
progress
)
model
.
load_state_dict
(
state_dict
)
return
model
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment