"git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "e4f80bf174e415ae495c8c76a853aaac6e9952a9"
Unverified Commit b5481e49 authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

Add RetinaNet improved weights (#5756)

* Add RetinaNet improved weights

* Add weights.

* Change publication date.
parent 08cc9a7f
...@@ -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(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment