diff --git a/configs/ocrnet_w18_cityscapes.yaml b/configs/ocrnet_w18_bn_cityscapes.yaml
similarity index 100%
rename from configs/ocrnet_w18_cityscapes.yaml
rename to configs/ocrnet_w18_bn_cityscapes.yaml
diff --git a/pdseg/models/modeling/deeplab.py b/pdseg/models/modeling/deeplab.py
index 45b621c2843209bd4a893b02c6f419671a31fbe9..4809036a2c387d58d5eec4b5b5f2fbe420c24a86 100644
--- a/pdseg/models/modeling/deeplab.py
+++ b/pdseg/models/modeling/deeplab.py
@@ -274,12 +274,14 @@ def _mobilenetv3(input, model_name='large'):
# OUTPUT_STRIDE:下采样倍数
scale = cfg.MODEL.DEEPLAB.DEPTH_MULTIPLIER
output_stride = cfg.MODEL.DEEPLAB.OUTPUT_STRIDE
- lr_mult_shortcut = cfg.MODEL.DEEPLAB.BACKBONE_LR_MULT_LIST
+ lr_mult_list = cfg.MODEL.DEEPLAB.BACKBONE_LR_MULT_LIST
+ if lr_mult_list is None:
+ lr_mult_list = [1.0, 1.0, 1.0, 1.0, 1.0]
model = mobilenet_v3_backbone(
scale=scale,
output_stride=output_stride,
model_name=model_name,
- lr_mult_list=lr_mult_shortcut)
+ lr_mult_list=lr_mult_list)
data, decode_shortcut = model.net(input)
return data, decode_shortcut
diff --git a/tutorial/finetune_ocrnet.md b/tutorial/finetune_ocrnet.md
index 11bec495d196d0bf630e230a408c8210e90a580c..c0fd8bdb3d2520bdec68338f8e286832a61e0c31 100644
--- a/tutorial/finetune_ocrnet.md
+++ b/tutorial/finetune_ocrnet.md
@@ -77,7 +77,9 @@ MODEL:
STAGE4:
NUM_CHANNELS: [18, 36, 72, 144]
# 此处设置OCR HEAD
-
+ OCR_MID_CHANNELS: 512
+ OCR_KEY_CHANNELS: 256
+ MULTI_LOSS_WEIGHT: [1.0, 1.0]
# 其他配置
TRAIN_CROP_SIZE: (512, 512)
@@ -142,4 +144,4 @@ python pdseg/vis.py --use_gpu --cfg ./configs/ocrnet_optic.yaml
|预训练模型名称|Backbone|数据集|配置|
|-|-|-|-|
-|ocrnet_w18_bn_cityscapes|OCRNet| Cityscapes | MODEL.MODEL_NAME: ocrnet
MODEL.HRNET.STAGE2.NUM_CHANNELS: [18, 36]
MODEL.HRNET.STAGE3.NUM_CHANNELS: [18, 36, 72]
MODEL.HRNET.STAGE4.NUM_CHANNELS: [18, 36, 72, 144]
MODEL.DEFAULT_NORM_TYPE: bn
MODEL.OCR.OCR_MID_CHANNELS: 512
MODEL.OCR.OCR_KEY_CHANNELS: 256|
+|ocrnet_w18_bn_cityscapes|OCRNet| Cityscapes | MODEL.MODEL_NAME: ocrnet
MODEL.HRNET.STAGE2.NUM_CHANNELS: [18, 36]
MODEL.HRNET.STAGE3.NUM_CHANNELS: [18, 36, 72]
MODEL.HRNET.STAGE4.NUM_CHANNELS: [18, 36, 72, 144]
MODEL.DEFAULT_NORM_TYPE: bn
MODEL.OCR.OCR_MID_CHANNELS: 512
MODEL.OCR.OCR_KEY_CHANNELS: 256
MODEL.MULTI_LOSS_WEIGHT: [1.0, 1.0] |