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
235898cd
Commit
235898cd
authored
Apr 27, 2022
by
LDOUBLEV
Browse files
delete capan lite and fix head
parent
982ab584
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
ppocr/modeling/heads/det_db_head.py
ppocr/modeling/heads/det_db_head.py
+3
-3
ppocr/modeling/necks/__init__.py
ppocr/modeling/necks/__init__.py
+3
-3
No files found.
ppocr/modeling/heads/det_db_head.py
View file @
235898cd
...
...
@@ -31,7 +31,7 @@ def get_bias_attr(k):
class
Head
(
nn
.
Layer
):
def
__init__
(
self
,
in_channels
,
name_list
,
kernel_list
=
[
3
,
2
,
2
]):
def
__init__
(
self
,
in_channels
,
name_list
,
kernel_list
=
[
3
,
2
,
2
]
,
**
kwargs
):
super
(
Head
,
self
).
__init__
()
self
.
conv1
=
nn
.
Conv2D
(
...
...
@@ -101,8 +101,8 @@ class DBHead(nn.Layer):
'conv2d_57'
,
'batch_norm_49'
,
'conv2d_transpose_2'
,
'batch_norm_50'
,
'conv2d_transpose_3'
,
'thresh'
]
self
.
binarize
=
Head
(
in_channels
,
binarize_name_list
)
self
.
thresh
=
Head
(
in_channels
,
thresh_name_list
)
self
.
binarize
=
Head
(
in_channels
,
binarize_name_list
,
**
kwargs
)
self
.
thresh
=
Head
(
in_channels
,
thresh_name_list
,
**
kwargs
)
def
step_function
(
self
,
x
,
y
):
return
paddle
.
reciprocal
(
1
+
paddle
.
exp
(
-
self
.
k
*
(
x
-
y
)))
...
...
ppocr/modeling/necks/__init__.py
View file @
235898cd
...
...
@@ -16,7 +16,7 @@ __all__ = ['build_neck']
def
build_neck
(
config
):
from
.db_fpn
import
DBFPN
,
CAFPN
,
FEPAN
,
FEPANLite
from
.db_fpn
import
DBFPN
,
CAFPN
,
FEPAN
from
.east_fpn
import
EASTFPN
from
.sast_fpn
import
SASTFPN
from
.rnn
import
SequenceEncoder
...
...
@@ -26,8 +26,8 @@ def build_neck(config):
from
.fce_fpn
import
FCEFPN
from
.pren_fpn
import
PRENFPN
support_dict
=
[
'FPN'
,
'FCEFPN'
,
'FEPAN'
,
'FEPANLite'
,
'DBFPN'
,
'CAFPN'
,
'EASTFPN'
,
'SASTFPN'
,
'SequenceEncoder'
,
'PGFPN'
,
'TableFPN'
,
'PRENFPN'
'FPN'
,
'FCEFPN'
,
'FEPAN'
,
'DBFPN'
,
'CAFPN'
,
'EASTFPN'
,
'SASTFPN'
,
'SequenceEncoder'
,
'PGFPN'
,
'TableFPN'
,
'PRENFPN'
]
module_name
=
config
.
pop
(
'name'
)
...
...
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