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
bc9924fe
Unverified
Commit
bc9924fe
authored
Apr 06, 2022
by
Vasilis Vryniotis
Committed by
GitHub
Apr 06, 2022
Browse files
Add MaskRCNN improved weights (#5773)
* Add MaskRCNN improved weights * Adding recipe URL
parent
3f62b5c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
torchvision/models/detection/mask_rcnn.py
torchvision/models/detection/mask_rcnn.py
+22
-5
No files found.
torchvision/models/detection/mask_rcnn.py
View file @
bc9924fe
...
@@ -349,17 +349,22 @@ class MaskRCNNPredictor(nn.Sequential):
...
@@ -349,17 +349,22 @@ class MaskRCNNPredictor(nn.Sequential):
# nn.init.constant_(param, 0)
# nn.init.constant_(param, 0)
_COMMON_META
=
{
"task"
:
"image_object_detection"
,
"architecture"
:
"MaskRCNN"
,
"categories"
:
_COCO_CATEGORIES
,
"interpolation"
:
InterpolationMode
.
BILINEAR
,
}
class
MaskRCNN_ResNet50_FPN_Weights
(
WeightsEnum
):
class
MaskRCNN_ResNet50_FPN_Weights
(
WeightsEnum
):
COCO_V1
=
Weights
(
COCO_V1
=
Weights
(
url
=
"https://download.pytorch.org/models/maskrcnn_resnet50_fpn_coco-bf2d0c1e.pth"
,
url
=
"https://download.pytorch.org/models/maskrcnn_resnet50_fpn_coco-bf2d0c1e.pth"
,
transforms
=
ObjectDetection
,
transforms
=
ObjectDetection
,
meta
=
{
meta
=
{
"task"
:
"image_object_detection"
,
**
_COMMON_META
,
"architecture"
:
"MaskRCNN"
,
"publication_year"
:
2017
,
"publication_year"
:
2017
,
"num_params"
:
44401393
,
"num_params"
:
44401393
,
"categories"
:
_COCO_CATEGORIES
,
"interpolation"
:
InterpolationMode
.
BILINEAR
,
"recipe"
:
"https://github.com/pytorch/vision/tree/main/references/detection#mask-r-cnn"
,
"recipe"
:
"https://github.com/pytorch/vision/tree/main/references/detection#mask-r-cnn"
,
"map"
:
37.9
,
"map"
:
37.9
,
"map_mask"
:
34.6
,
"map_mask"
:
34.6
,
...
@@ -369,7 +374,19 @@ class MaskRCNN_ResNet50_FPN_Weights(WeightsEnum):
...
@@ -369,7 +374,19 @@ class MaskRCNN_ResNet50_FPN_Weights(WeightsEnum):
class
MaskRCNN_ResNet50_FPN_V2_Weights
(
WeightsEnum
):
class
MaskRCNN_ResNet50_FPN_V2_Weights
(
WeightsEnum
):
pass
COCO_V1
=
Weights
(
url
=
"https://download.pytorch.org/models/maskrcnn_resnet50_fpn_v2_coco-73cbd019.pth"
,
transforms
=
ObjectDetection
,
meta
=
{
**
_COMMON_META
,
"publication_year"
:
2021
,
"num_params"
:
46359409
,
"recipe"
:
"https://github.com/pytorch/vision/pull/5773"
,
"map"
:
47.4
,
"map_mask"
:
41.8
,
},
)
DEFAULT
=
COCO_V1
@
handle_legacy_interface
(
@
handle_legacy_interface
(
...
...
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