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
b5481e49
Unverified
Commit
b5481e49
authored
Apr 06, 2022
by
Vasilis Vryniotis
Committed by
GitHub
Apr 06, 2022
Browse files
Add RetinaNet improved weights (#5756)
* Add RetinaNet improved weights * Add weights. * Change publication date.
parent
08cc9a7f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
torchvision/models/detection/retinanet.py
torchvision/models/detection/retinanet.py
+21
-5
No files found.
torchvision/models/detection/retinanet.py
View file @
b5481e49
...
@@ -672,17 +672,22 @@ class RetinaNet(nn.Module):
...
@@ -672,17 +672,22 @@ class RetinaNet(nn.Module):
return
self
.
eager_outputs
(
losses
,
detections
)
return
self
.
eager_outputs
(
losses
,
detections
)
_COMMON_META
=
{
"task"
:
"image_object_detection"
,
"architecture"
:
"RetinaNet"
,
"categories"
:
_COCO_CATEGORIES
,
"interpolation"
:
InterpolationMode
.
BILINEAR
,
}
class
RetinaNet_ResNet50_FPN_Weights
(
WeightsEnum
):
class
RetinaNet_ResNet50_FPN_Weights
(
WeightsEnum
):
COCO_V1
=
Weights
(
COCO_V1
=
Weights
(
url
=
"https://download.pytorch.org/models/retinanet_resnet50_fpn_coco-eeacb38b.pth"
,
url
=
"https://download.pytorch.org/models/retinanet_resnet50_fpn_coco-eeacb38b.pth"
,
transforms
=
ObjectDetection
,
transforms
=
ObjectDetection
,
meta
=
{
meta
=
{
"task"
:
"image_object_detection"
,
**
_COMMON_META
,
"architecture"
:
"RetinaNet"
,
"publication_year"
:
2017
,
"publication_year"
:
2017
,
"num_params"
:
34014999
,
"num_params"
:
34014999
,
"categories"
:
_COCO_CATEGORIES
,
"interpolation"
:
InterpolationMode
.
BILINEAR
,
"recipe"
:
"https://github.com/pytorch/vision/tree/main/references/detection#retinanet"
,
"recipe"
:
"https://github.com/pytorch/vision/tree/main/references/detection#retinanet"
,
"map"
:
36.4
,
"map"
:
36.4
,
},
},
...
@@ -691,7 +696,18 @@ class RetinaNet_ResNet50_FPN_Weights(WeightsEnum):
...
@@ -691,7 +696,18 @@ class RetinaNet_ResNet50_FPN_Weights(WeightsEnum):
class
RetinaNet_ResNet50_FPN_V2_Weights
(
WeightsEnum
):
class
RetinaNet_ResNet50_FPN_V2_Weights
(
WeightsEnum
):
pass
COCO_V1
=
Weights
(
url
=
"https://download.pytorch.org/models/retinanet_resnet50_fpn_v2_coco-5905b1c5.pth"
,
transforms
=
ObjectDetection
,
meta
=
{
**
_COMMON_META
,
"publication_year"
:
2019
,
"num_params"
:
38198935
,
"recipe"
:
"https://github.com/pytorch/vision/pull/5756"
,
"map"
:
41.5
,
},
)
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