diff --git a/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml b/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml index 60a4700e3f..04caf85088 100644 --- a/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml +++ b/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml @@ -31,7 +31,7 @@ Architecture: out_channels: 96 shortcut: True Head: - name: CBNHeadLocal + name: PFHeadLocal k: 50 mode: "small" diff --git a/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_teacher.yml b/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_teacher.yml index 83dd55c677..5109f490c8 100644 --- a/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_teacher.yml +++ b/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_teacher.yml @@ -30,7 +30,7 @@ Architecture: out_channels: 256 intracl: true Head: - name: CBNHeadLocal + name: PFHeadLocal k: 50 mode: "large" diff --git a/ppocr/modeling/heads/__init__.py b/ppocr/modeling/heads/__init__.py index 96ef1a31c9..440d9e0293 100755 --- a/ppocr/modeling/heads/__init__.py +++ b/ppocr/modeling/heads/__init__.py @@ -17,7 +17,7 @@ __all__ = ['build_head'] def build_head(config): # det head - from .det_db_head import DBHead, CBNHeadLocal + from .det_db_head import DBHead, PFHeadLocal from .det_east_head import EASTHead from .det_sast_head import SASTHead from .det_pse_head import PSEHead @@ -56,7 +56,7 @@ def build_head(config): 'TableAttentionHead', 'SARHead', 'AsterHead', 'SDMGRHead', 'PRENHead', 'MultiHead', 'ABINetHead', 'TableMasterHead', 'SPINAttentionHead', 'VLHead', 'SLAHead', 'RobustScannerHead', 'CT_Head', 'RFLHead', - 'DRRGHead', 'CANHead', 'SATRNHead', 'CBNHeadLocal' + 'DRRGHead', 'CANHead', 'SATRNHead', 'PFHeadLocal' ] if config['name'] == 'DRRGHead': diff --git a/ppocr/modeling/heads/det_db_head.py b/ppocr/modeling/heads/det_db_head.py index 968884f747..8db14d7f6f 100644 --- a/ppocr/modeling/heads/det_db_head.py +++ b/ppocr/modeling/heads/det_db_head.py @@ -129,9 +129,9 @@ class LocalModule(nn.Layer): return out -class CBNHeadLocal(DBHead): +class PFHeadLocal(DBHead): def __init__(self, in_channels, k=50, mode='small', **kwargs): - super(CBNHeadLocal, self).__init__(in_channels, k, **kwargs) + super(PFHeadLocal, self).__init__(in_channels, k, **kwargs) self.mode = mode self.up_conv = nn.Upsample(scale_factor=2, mode="nearest", align_mode=1)