未验证 提交 61d87c76 编写于 作者: J Jianfeng Wang 提交者: GitHub

fix(detection): avoid loading backbone weight when imported from hub (#53)

上级 473ae5d9
...@@ -33,7 +33,9 @@ def faster_rcnn_res101_coco_2x_800size(batch_size=1, **kwargs): ...@@ -33,7 +33,9 @@ def faster_rcnn_res101_coco_2x_800size(batch_size=1, **kwargs):
`"FPN" <https://arxiv.org/abs/1612.03144>`_ `"FPN" <https://arxiv.org/abs/1612.03144>`_
`"COCO" <https://arxiv.org/abs/1405.0312>`_ `"COCO" <https://arxiv.org/abs/1405.0312>`_
""" """
return models.FasterRCNN(CustomFasterRCNNConfig(), batch_size=batch_size, **kwargs) cfg = CustomFasterRCNNConfig()
cfg.backbone_pretrained = False
return models.FasterRCNN(cfg, batch_size=batch_size, **kwargs)
Net = models.FasterRCNN Net = models.FasterRCNN
......
...@@ -22,7 +22,9 @@ def faster_rcnn_res50_coco_1x_800size(batch_size=1, **kwargs): ...@@ -22,7 +22,9 @@ def faster_rcnn_res50_coco_1x_800size(batch_size=1, **kwargs):
`"FPN" <https://arxiv.org/abs/1612.03144>`_ `"FPN" <https://arxiv.org/abs/1612.03144>`_
`"COCO" <https://arxiv.org/abs/1405.0312>`_ `"COCO" <https://arxiv.org/abs/1405.0312>`_
""" """
return models.FasterRCNN(models.FasterRCNNConfig(), batch_size=batch_size, **kwargs) cfg = models.FasterRCNNConfig()
cfg.backbone_pretrained = False
return models.FasterRCNN(cfg, batch_size=batch_size, **kwargs)
Net = models.FasterRCNN Net = models.FasterRCNN
......
...@@ -32,7 +32,9 @@ def faster_rcnn_res50_coco_1x_800size_syncbn(batch_size=1, **kwargs): ...@@ -32,7 +32,9 @@ def faster_rcnn_res50_coco_1x_800size_syncbn(batch_size=1, **kwargs):
`"COCO" <https://arxiv.org/abs/1405.0312>`_ `"COCO" <https://arxiv.org/abs/1405.0312>`_
`"SyncBN" <https://arxiv.org/abs/1711.07240>`_ `"SyncBN" <https://arxiv.org/abs/1711.07240>`_
""" """
return models.FasterRCNN(CustomFasterRCNNConfig(), batch_size=batch_size, **kwargs) cfg = CustomFasterRCNNConfig()
cfg.backbone_pretrained = False
return models.FasterRCNN(cfg, batch_size=batch_size, **kwargs)
Net = models.FasterRCNN Net = models.FasterRCNN
......
...@@ -33,7 +33,9 @@ def faster_rcnn_resx101_coco_2x_800size(batch_size=1, **kwargs): ...@@ -33,7 +33,9 @@ def faster_rcnn_resx101_coco_2x_800size(batch_size=1, **kwargs):
`"FPN" <https://arxiv.org/abs/1612.03144>`_ `"FPN" <https://arxiv.org/abs/1612.03144>`_
`"COCO" <https://arxiv.org/abs/1405.0312>`_ `"COCO" <https://arxiv.org/abs/1405.0312>`_
""" """
return models.FasterRCNN(CustomFasterRCNNConfig(), batch_size=batch_size, **kwargs) cfg = CustomFasterRCNNConfig()
cfg.backbone_pretrained = False
return models.FasterRCNN(cfg, batch_size=batch_size, **kwargs)
Net = models.FasterRCNN Net = models.FasterRCNN
......
...@@ -33,7 +33,9 @@ def retinanet_res101_coco_2x_800size(batch_size=1, **kwargs): ...@@ -33,7 +33,9 @@ def retinanet_res101_coco_2x_800size(batch_size=1, **kwargs):
`"FPN" <https://arxiv.org/abs/1612.03144>`_ `"FPN" <https://arxiv.org/abs/1612.03144>`_
`"COCO" <https://arxiv.org/abs/1405.0312>`_ `"COCO" <https://arxiv.org/abs/1405.0312>`_
""" """
return models.RetinaNet(CustomRetinaNetConfig(), batch_size=batch_size, **kwargs) cfg = CustomRetinaNetConfig()
cfg.backbone_pretrained = False
return models.RetinaNet(cfg, batch_size=batch_size, **kwargs)
Net = models.RetinaNet Net = models.RetinaNet
......
...@@ -22,7 +22,9 @@ def retinanet_res50_coco_1x_800size(batch_size=1, **kwargs): ...@@ -22,7 +22,9 @@ def retinanet_res50_coco_1x_800size(batch_size=1, **kwargs):
`"FPN" <https://arxiv.org/abs/1612.03144>`_ `"FPN" <https://arxiv.org/abs/1612.03144>`_
`"COCO" <https://arxiv.org/abs/1405.0312>`_ `"COCO" <https://arxiv.org/abs/1405.0312>`_
""" """
return models.RetinaNet(models.RetinaNetConfig(), batch_size=batch_size, **kwargs) cfg = models.RetinaNetConfig()
cfg.backbone_pretrained = False
return models.RetinaNet(cfg, batch_size=batch_size, **kwargs)
Net = models.RetinaNet Net = models.RetinaNet
......
...@@ -32,7 +32,9 @@ def retinanet_res50_coco_1x_800size_syncbn(batch_size=1, **kwargs): ...@@ -32,7 +32,9 @@ def retinanet_res50_coco_1x_800size_syncbn(batch_size=1, **kwargs):
`"COCO" <https://arxiv.org/abs/1405.0312>`_ `"COCO" <https://arxiv.org/abs/1405.0312>`_
`"SyncBN" <https://arxiv.org/abs/1711.07240>`_ `"SyncBN" <https://arxiv.org/abs/1711.07240>`_
""" """
return models.RetinaNet(CustomRetinaNetConfig(), batch_size=batch_size, **kwargs) cfg = CustomRetinaNetConfig()
cfg.backbone_pretrained = False
return models.RetinaNet(cfg, batch_size=batch_size, **kwargs)
Net = models.RetinaNet Net = models.RetinaNet
......
...@@ -33,7 +33,9 @@ def retinanet_resx101_coco_2x_800size(batch_size=1, **kwargs): ...@@ -33,7 +33,9 @@ def retinanet_resx101_coco_2x_800size(batch_size=1, **kwargs):
`"FPN" <https://arxiv.org/abs/1612.03144>`_ `"FPN" <https://arxiv.org/abs/1612.03144>`_
`"COCO" <https://arxiv.org/abs/1405.0312>`_ `"COCO" <https://arxiv.org/abs/1405.0312>`_
""" """
return models.RetinaNet(CustomRetinaNetConfig(), batch_size=batch_size, **kwargs) cfg = CustomRetinaNetConfig()
cfg.backbone_pretrained = False
return models.RetinaNet(cfg, batch_size=batch_size, **kwargs)
Net = models.RetinaNet Net = models.RetinaNet
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册