Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
217b0409
Commit
217b0409
authored
Apr 26, 2022
by
LDOUBLEV
Browse files
fix det
parent
5492c10a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
15 deletions
+16
-15
configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml
configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml
+6
-7
configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml
configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml
+2
-2
ppocr/modeling/necks/db_fpn.py
ppocr/modeling/necks/db_fpn.py
+8
-6
No files found.
configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml
View file @
217b0409
...
@@ -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
:
FE
PAN
name
:
CA
PAN
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
:
FE
PAN
name
:
CA
PAN
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
:
DBFP
N
name
:
FEPA
N
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
:
...
...
configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml
View file @
217b0409
...
@@ -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
:
FE
PAN
name
:
CA
PAN
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
...
...
ppocr/modeling/necks/db_fpn.py
View file @
217b0409
...
@@ -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_conv
s
=
[]
self
.
ins_conv
=
[]
self
.
inp_conv
s
=
[]
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_conv
s
=
[]
self
.
ins_conv
=
[]
self
.
inp_conv
s
=
[]
self
.
inp_conv
=
[]
# pan head
# pan head
self
.
pan_head_conv
=
[]
self
.
pan_head_conv
=
[]
self
.
pan_lat_conv
=
[]
self
.
pan_lat_conv
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment