diff --git a/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml b/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml index 6c60e12f0d9973fb818b31ebe4daeff71f99da75..3e77577c17abe2111c501d96ce6b1087ac44f8d6 100644 --- a/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml +++ b/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml @@ -33,7 +33,7 @@ Architecture: model_name: large disable_se: true Neck: - name: CAFPN + name: RSEFPN out_channels: 96 shortcut: True Head: @@ -49,7 +49,7 @@ Architecture: model_name: large disable_se: true Neck: - name: CAFPN + name: RSEFPN out_channels: 96 shortcut: True Head: @@ -65,7 +65,7 @@ Architecture: in_channels: 3 layers: 50 Neck: - name: FEPAN + name: LKPAN out_channels: 256 Head: name: DBHead diff --git a/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml b/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml index 0e04cd9b06c4908c7fa3b41aa6a09fdd41a1f56c..0e8af776479ea26f834ca9ddc169f80b3982e86d 100644 --- a/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml +++ b/configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml @@ -28,7 +28,7 @@ Architecture: model_name: large disable_se: True Neck: - name: CAFPN + name: RSEFPN out_channels: 96 shortcut: True Head: diff --git a/ppocr/modeling/necks/__init__.py b/ppocr/modeling/necks/__init__.py index 9a4218d1a90fd5d4051969968ba1d3b145f25a92..6ee683e6fe56460ad65ae13e6728b344b2ab0ee8 100644 --- a/ppocr/modeling/necks/__init__.py +++ b/ppocr/modeling/necks/__init__.py @@ -26,7 +26,7 @@ def build_neck(config): from .fce_fpn import FCEFPN from .pren_fpn import PRENFPN support_dict = [ - 'FPN', 'FCEFPN', 'FEPAN', 'DBFPN', 'CAFPN', 'EASTFPN', 'SASTFPN', + 'FPN', 'FCEFPN', 'LKPAN', 'DBFPN', 'RSEFPN', 'EASTFPN', 'SASTFPN', 'SequenceEncoder', 'PGFPN', 'TableFPN', 'PRENFPN' ] diff --git a/ppocr/modeling/necks/db_fpn.py b/ppocr/modeling/necks/db_fpn.py index 1c81be4a6246287ea8d03acb6efe75b71a73f466..c6cad70f1f9820b6891f420d0835d308a29bbff2 100644 --- a/ppocr/modeling/necks/db_fpn.py +++ b/ppocr/modeling/necks/db_fpn.py @@ -190,9 +190,9 @@ class DBFPN(nn.Layer): return fuse -class CALayer(nn.Layer): +class RSELayer(nn.Layer): def __init__(self, in_channels, out_channels, kernel_size, shortcut=True): - super(CALayer, self).__init__() + super(RSELayer, self).__init__() weight_attr = paddle.nn.initializer.KaimingUniform() self.out_channels = out_channels self.in_conv = nn.Conv2D( @@ -214,9 +214,9 @@ class CALayer(nn.Layer): return out -class CAFPN(nn.Layer): +class RSEFPN(nn.Layer): def __init__(self, in_channels, out_channels, shortcut=True, **kwargs): - super(CAFPN, self).__init__() + super(RSEFPN, self).__init__() self.out_channels = out_channels self.ins_conv = nn.LayerList() self.inp_conv = nn.LayerList() @@ -263,9 +263,9 @@ class CAFPN(nn.Layer): return fuse -class FEPAN(nn.Layer): +class LKPAN(nn.Layer): def __init__(self, in_channels, out_channels, mode='large', **kwargs): - super(FEPAN, self).__init__() + super(LKPAN, self).__init__() self.out_channels = out_channels weight_attr = paddle.nn.initializer.KaimingUniform()