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
58a408ab
Unverified
Commit
58a408ab
authored
Apr 27, 2022
by
andyjpaddle
Committed by
GitHub
Apr 27, 2022
Browse files
Merge pull request #6069 from andyjpaddle/dygraph
fix key for distillation and cls resize
parents
8a1d373c
6955e46b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
ppocr/data/imaug/rec_img_aug.py
ppocr/data/imaug/rec_img_aug.py
+1
-1
tools/eval.py
tools/eval.py
+4
-2
tools/program.py
tools/program.py
+4
-2
No files found.
ppocr/data/imaug/rec_img_aug.py
View file @
58a408ab
...
...
@@ -81,7 +81,7 @@ class ClsResizeImg(object):
def
__call__
(
self
,
data
):
img
=
data
[
'image'
]
norm_img
=
resize_norm_img
(
img
,
self
.
image_shape
)
norm_img
,
_
=
resize_norm_img
(
img
,
self
.
image_shape
)
data
[
'image'
]
=
norm_img
return
data
...
...
tools/eval.py
View file @
58a408ab
...
...
@@ -74,9 +74,11 @@ def main():
model
=
build_model
(
config
[
'Architecture'
])
extra_input_models
=
[
"SRN"
,
"NRTR"
,
"SAR"
,
"SEED"
,
"SVTR"
]
extra_input
=
False
if
config
[
'Architecture'
][
'algorithm'
]
==
'Distillation'
:
extra_input
=
config
[
'Architecture'
][
'Models'
][
'Teacher'
][
'algorithm'
]
in
extra_input_models
for
key
in
config
[
'Architecture'
][
"Models"
]:
extra_input
=
extra_input
or
config
[
'Architecture'
][
'Models'
][
key
][
'algorithm'
]
in
extra_input_models
else
:
extra_input
=
config
[
'Architecture'
][
'algorithm'
]
in
extra_input_models
if
"model_type"
in
config
[
'Architecture'
].
keys
():
...
...
tools/program.py
View file @
58a408ab
...
...
@@ -202,9 +202,11 @@ def train(config,
use_srn
=
config
[
'Architecture'
][
'algorithm'
]
==
"SRN"
extra_input_models
=
[
"SRN"
,
"NRTR"
,
"SAR"
,
"SEED"
,
"SVTR"
]
extra_input
=
False
if
config
[
'Architecture'
][
'algorithm'
]
==
'Distillation'
:
extra_input
=
config
[
'Architecture'
][
'Models'
][
'Teacher'
][
'algorithm'
]
in
extra_input_models
for
key
in
config
[
'Architecture'
][
"Models"
]:
extra_input
=
extra_input
or
config
[
'Architecture'
][
'Models'
][
key
][
'algorithm'
]
in
extra_input_models
else
:
extra_input
=
config
[
'Architecture'
][
'algorithm'
]
in
extra_input_models
try
:
...
...
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