提交 217b0409 编写于 作者: L LDOUBLEV

fix det

上级 5492c10a
...@@ -32,12 +32,12 @@ NetWorks: ...@@ -32,12 +32,12 @@ NetWorks:
model_name: large model_name: large
disable_se: true disable_se: true
Neck: Neck:
name: FEPAN name: CAPAN
out_channels: 96 out_channels: 96
shortcut: True
Head: Head:
name: DBHead name: DBHead
k: 50 k: 50
kernel_size: [7, 2, 2]
Student2: Student2:
model_type: det model_type: det
algorithm: DB algorithm: DB
...@@ -48,12 +48,12 @@ NetWorks: ...@@ -48,12 +48,12 @@ NetWorks:
model_name: large model_name: large
disable_se: true disable_se: true
Neck: Neck:
name: FEPAN name: CAPAN
out_channels: 96 out_channels: 96
shortcut: True
Head: Head:
name: DBHead name: DBHead
k: 50 k: 50
kernel_size: [7, 2, 2]
Teacher: Teacher:
pretrained: ./inference/ch_ppocr_resnet50/student pretrained: ./inference/ch_ppocr_resnet50/student
model_type: det model_type: det
...@@ -63,12 +63,11 @@ NetWorks: ...@@ -63,12 +63,11 @@ NetWorks:
in_channels: 3 in_channels: 3
layers: 50 layers: 50
Neck: Neck:
name: DBFPN name: FEPAN
out_channels: 256 out_channels: 256
big_kernel: true
Head: Head:
name: DBHead name: DBHead
big_kernel: true kernel_list: [7,2,2]
k: 50 k: 50
Loss: Loss:
......
...@@ -28,12 +28,12 @@ Architecture: ...@@ -28,12 +28,12 @@ Architecture:
model_name: large model_name: large
disable_se: True disable_se: True
Neck: Neck:
name: FEPAN name: CAPAN
out_channels: 96 out_channels: 96
shortcut: True
Head: Head:
name: DBHead name: DBHead
k: 50 k: 50
kernel_size: [7, 2, 2]
Loss: Loss:
name: DBLoss name: DBLoss
......
...@@ -21,6 +21,8 @@ from paddle import nn ...@@ -21,6 +21,8 @@ from paddle import nn
import paddle.nn.functional as F import paddle.nn.functional as F
from paddle import ParamAttr from paddle import ParamAttr
import os import os
import sys
__dir__ = os.path.dirname(os.path.abspath(__file__)) __dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(__dir__) sys.path.append(__dir__)
sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../../..'))) sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../../..')))
...@@ -138,11 +140,11 @@ class CALayer(nn.Layer): ...@@ -138,11 +140,11 @@ class CALayer(nn.Layer):
class CAFPN(nn.Layer): class CAFPN(nn.Layer):
def __init__(self, in_channels, out_channels, shortcut, **kwargs): def __init__(self, in_channels, out_channels, shortcut=True, **kwargs):
super(CAFPN, self).__init__() super(CAFPN, self).__init__()
self.out_channels = out_channels
self.ins_convs = [] self.ins_conv = []
self.inp_convs = [] self.inp_conv = []
for i in range(len(in_channels)): for i in range(len(in_channels)):
self.ins_conv.append( self.ins_conv.append(
...@@ -192,8 +194,8 @@ class FEPAN(nn.Layer): ...@@ -192,8 +194,8 @@ class FEPAN(nn.Layer):
self.out_channels = out_channels self.out_channels = out_channels
weight_attr = paddle.nn.initializer.KaimingUniform() weight_attr = paddle.nn.initializer.KaimingUniform()
self.ins_convs = [] self.ins_conv = []
self.inp_convs = [] self.inp_conv = []
# pan head # pan head
self.pan_head_conv = [] self.pan_head_conv = []
self.pan_lat_conv = [] self.pan_lat_conv = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册