Răsfoiți Sursa

HRNet->HRNet_W18

will-jl944 4 ani în urmă
părinte
comite
0c208efa17

+ 4 - 4
dygraph/paddlex/cv/models/detector.py

@@ -220,7 +220,7 @@ class BaseDetector(BaseModel):
                 pretrain_weights = det_pretrain_weights_dict['_'.join(
                     [self.model_name, self.backbone_name])][0]
                 logging.warning("Pretrain_weights is forcibly set to '{}'. "
-                                "If don't want to use pretrain weights, "
+                                "If you don't want to use pretrain weights, "
                                 "set pretrain_weights to be None.".format(
                                     pretrain_weights))
         pretrained_dir = osp.join(save_dir, 'pretrain')
@@ -699,14 +699,14 @@ class FasterRCNN(BaseDetector):
         self.init_params = locals()
         if backbone not in [
                 'ResNet50', 'ResNet50_vd', 'ResNet50_vd_ssld', 'ResNet34',
-                'ResNet34_vd', 'ResNet101', 'ResNet101_vd', 'HRNet'
+                'ResNet34_vd', 'ResNet101', 'ResNet101_vd', 'HRNet_W18'
         ]:
             raise ValueError(
                 "backbone: {} is not supported. Please choose one of "
                 "('ResNet50', 'ResNet50_vd', 'ResNet50_vd_ssld', 'ResNet34', 'ResNet34_vd', "
-                "'ResNet101', 'ResNet101_vd', 'HRNet')".format(backbone))
+                "'ResNet101', 'ResNet101_vd', 'HRNet_W18')".format(backbone))
         self.backbone_name = backbone
-        if backbone == 'HRNet':
+        if backbone == 'HRNet_W18':
             if not with_fpn:
                 logging.warning(
                     "Backbone {} should be used along with fpn enabled, 'with_fpn' is forcibly set to True".

+ 3 - 3
dygraph/paddlex/utils/checkpoint.py

@@ -43,7 +43,7 @@ det_pretrain_weights_dict = {
     'FasterRCNN_ResNet101_fpn': ['COCO', 'IMAGENET'],
     'FasterRCNN_ResNet101_vd_fpn': ['COCO', 'IMAGENET'],
     'FasterRCNN_ResNet50_vd_ssld_fpn': ['COCO', 'IMAGENET'],
-    'FasterRCNN_HRNet_fpn': ['COCO', 'IMAGENET'],
+    'FasterRCNN_HRNet_W18_fpn': ['COCO', 'IMAGENET'],
     'PPYOLO_ResNet50_vd_dcn': ['COCO', 'IMAGENET'],
     'PPYOLO_ResNet18_vd': ['COCO', 'IMAGENET'],
     'PPYOLO_MobileNetV3_large': ['COCO', 'IMAGENET'],
@@ -213,7 +213,7 @@ imagenet_weights = {
     'https://paddledet.bj.bcebos.com/models/pretrained/ResNet101_pretrained.pdparams',
     'FasterRCNN_ResNet101_vd_fpn_IMAGENET':
     'https://paddledet.bj.bcebos.com/models/pretrained/ResNet101_vd_pretrained.pdparams',
-    'FasterRCNN_HRNet_fpn_IMAGENET':
+    'FasterRCNN_HRNet_W18_fpn_IMAGENET':
     'https://paddledet.bj.bcebos.com/models/pretrained/HRNet_W18_C_pretrained.pdparams',
     'YOLOv3_ResNet50_vd_dcn_IMAGENET':
     'https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_vd_ssld_pretrained.pdparams',
@@ -307,7 +307,7 @@ coco_weights = {
     'https://paddledet.bj.bcebos.com/models/faster_rcnn_r101_fpn_2x_coco.pdparams',
     'FasterRCNN_ResNet101_vd_fpn_COCO':
     'https://paddledet.bj.bcebos.com/models/faster_rcnn_r101_vd_fpn_1x_coco.pdparams',
-    'FasterRCNN_HRNet_fpn_COCO':
+    'FasterRCNN_HRNet_W18_fpn_COCO':
     'https://paddledet.bj.bcebos.com/models/faster_rcnn_hrnetv2p_w18_2x_coco.pdparams',
     'PPYOLO_ResNet50_vd_dcn_COCO':
     'https://paddledet.bj.bcebos.com/models/ppyolo_r50vd_dcn_2x_coco.pdparams',