未验证 提交 26519a6d 编写于 作者: X xiaoting 提交者: GitHub

update PPLCNetV3 name (#9802)

上级 ca8c8200
......@@ -23,7 +23,7 @@ Architecture:
algorithm: DB
Transform: null
Backbone:
name: LCNetv3
name: PPLCNetV3
scale: 0.75
det: True
Neck:
......
......@@ -39,7 +39,8 @@ Architecture:
algorithm: SVTR_LCNet
Transform:
Backbone:
name: LCNetv3
name: PPLCNetV3
scale: 0.95
Head:
name: MultiHead
head_list:
......
......@@ -22,11 +22,11 @@ def build_backbone(config, model_type):
from .det_resnet_vd import ResNet_vd
from .det_resnet_vd_sast import ResNet_SAST
from .det_pp_lcnet import PPLCNet
from .rec_lcnetv3 import LCNetv3
from .rec_lcnetv3 import PPLCNetV3
from .rec_hgnet import PPHGNet_small
support_dict = [
"MobileNetV3", "ResNet", "ResNet_vd", "ResNet_SAST", "PPLCNet",
"LCNetv3", "PPHGNet_small"
"PPLCNetV3", "PPHGNet_small"
]
if model_type == "table":
from .table_master_resnet import TableResNetExtra
......@@ -48,13 +48,13 @@ def build_backbone(config, model_type):
from .rec_resnet_rfl import ResNetRFL
from .rec_densenet import DenseNet
from .rec_shallow_cnn import ShallowCNN
from .rec_lcnetv3 import LCNetv3
from .rec_lcnetv3 import PPLCNetV3
from .rec_hgnet import PPHGNet_small
support_dict = [
'MobileNetV1Enhance', 'MobileNetV3', 'ResNet', 'ResNetFPN', 'MTB',
'ResNet31', 'ResNet45', 'ResNet_ASTER', 'MicroNet',
'EfficientNetb3_PREN', 'SVTRNet', 'ViTSTR', 'ResNet32', 'ResNetRFL',
'DenseNet', 'ShallowCNN', 'LCNetv3', 'PPHGNet_small'
'DenseNet', 'ShallowCNN', 'PPLCNetV3', 'PPHGNet_small'
]
elif model_type == 'e2e':
from .e2e_resnet_vd_pg import ResNet
......
......@@ -372,7 +372,7 @@ class PPLCNetV3(nn.Layer):
stride=2,
lr_mult=self.lr_mult_list[0])
self.blocks2 = nn.Sequential(* [
self.blocks2 = nn.Sequential(*[
LCNetV3Block(
in_channels=make_divisible(in_c * scale),
out_channels=make_divisible(out_c * scale),
......@@ -382,11 +382,11 @@ class PPLCNetV3(nn.Layer):
conv_kxk_num=conv_kxk_num,
lr_mult=self.lr_mult_list[1],
lab_lr=lab_lr)
for i, (k, in_c, out_c, s, se) in enumerate(self.net_config[
"blocks2"])
for i, (k, in_c, out_c, s, se
) in enumerate(self.net_config["blocks2"])
])
self.blocks3 = nn.Sequential(* [
self.blocks3 = nn.Sequential(*[
LCNetV3Block(
in_channels=make_divisible(in_c * scale),
out_channels=make_divisible(out_c * scale),
......@@ -396,11 +396,11 @@ class PPLCNetV3(nn.Layer):
conv_kxk_num=conv_kxk_num,
lr_mult=self.lr_mult_list[2],
lab_lr=lab_lr)
for i, (k, in_c, out_c, s, se) in enumerate(self.net_config[
"blocks3"])
for i, (k, in_c, out_c, s, se
) in enumerate(self.net_config["blocks3"])
])
self.blocks4 = nn.Sequential(* [
self.blocks4 = nn.Sequential(*[
LCNetV3Block(
in_channels=make_divisible(in_c * scale),
out_channels=make_divisible(out_c * scale),
......@@ -410,11 +410,11 @@ class PPLCNetV3(nn.Layer):
conv_kxk_num=conv_kxk_num,
lr_mult=self.lr_mult_list[3],
lab_lr=lab_lr)
for i, (k, in_c, out_c, s, se) in enumerate(self.net_config[
"blocks4"])
for i, (k, in_c, out_c, s, se
) in enumerate(self.net_config["blocks4"])
])
self.blocks5 = nn.Sequential(* [
self.blocks5 = nn.Sequential(*[
LCNetV3Block(
in_channels=make_divisible(in_c * scale),
out_channels=make_divisible(out_c * scale),
......@@ -424,11 +424,11 @@ class PPLCNetV3(nn.Layer):
conv_kxk_num=conv_kxk_num,
lr_mult=self.lr_mult_list[4],
lab_lr=lab_lr)
for i, (k, in_c, out_c, s, se) in enumerate(self.net_config[
"blocks5"])
for i, (k, in_c, out_c, s, se
) in enumerate(self.net_config["blocks5"])
])
self.blocks6 = nn.Sequential(* [
self.blocks6 = nn.Sequential(*[
LCNetV3Block(
in_channels=make_divisible(in_c * scale),
out_channels=make_divisible(out_c * scale),
......@@ -438,8 +438,8 @@ class PPLCNetV3(nn.Layer):
conv_kxk_num=conv_kxk_num,
lr_mult=self.lr_mult_list[5],
lab_lr=lab_lr)
for i, (k, in_c, out_c, s, se) in enumerate(self.net_config[
"blocks6"])
for i, (k, in_c, out_c, s, se
) in enumerate(self.net_config["blocks6"])
])
self.out_channels = make_divisible(512 * scale)
......@@ -489,8 +489,3 @@ class PPLCNetV3(nn.Layer):
else:
x = F.avg_pool2d(x, [3, 2])
return x
def LCNetv3(scale=0.95, **kwargs):
model = PPLCNetV3(scale=scale, conv_kxk_num=4, **kwargs)
return model
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册