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
0c280c70
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "5a90e90c0bc845ba651f3d7d0aaf4ee03de9f5ed"
Commit
0c280c70
authored
Apr 27, 2022
by
andyjpaddle
Browse files
fix key for dis and cls resize
parent
7756e66b
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 @
0c280c70
...
@@ -81,7 +81,7 @@ class ClsResizeImg(object):
...
@@ -81,7 +81,7 @@ class ClsResizeImg(object):
def
__call__
(
self
,
data
):
def
__call__
(
self
,
data
):
img
=
data
[
'image'
]
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
data
[
'image'
]
=
norm_img
return
data
return
data
...
...
tools/eval.py
View file @
0c280c70
...
@@ -74,9 +74,11 @@ def main():
...
@@ -74,9 +74,11 @@ def main():
model
=
build_model
(
config
[
'Architecture'
])
model
=
build_model
(
config
[
'Architecture'
])
extra_input_models
=
[
"SRN"
,
"NRTR"
,
"SAR"
,
"SEED"
,
"SVTR"
]
extra_input_models
=
[
"SRN"
,
"NRTR"
,
"SAR"
,
"SEED"
,
"SVTR"
]
extra_input
=
False
if
config
[
'Architecture'
][
'algorithm'
]
==
'Distillation'
:
if
config
[
'Architecture'
][
'algorithm'
]
==
'Distillation'
:
extra_input
=
config
[
'Architecture'
][
'Models'
][
'Teacher'
][
for
key
in
config
[
'Architecture'
][
"Models"
]:
'algorithm'
]
in
extra_input_models
extra_input
=
extra_input
or
config
[
'Architecture'
][
'Models'
][
key
][
'algorithm'
]
in
extra_input_models
else
:
else
:
extra_input
=
config
[
'Architecture'
][
'algorithm'
]
in
extra_input_models
extra_input
=
config
[
'Architecture'
][
'algorithm'
]
in
extra_input_models
if
"model_type"
in
config
[
'Architecture'
].
keys
():
if
"model_type"
in
config
[
'Architecture'
].
keys
():
...
...
tools/program.py
View file @
0c280c70
...
@@ -202,9 +202,11 @@ def train(config,
...
@@ -202,9 +202,11 @@ def train(config,
use_srn
=
config
[
'Architecture'
][
'algorithm'
]
==
"SRN"
use_srn
=
config
[
'Architecture'
][
'algorithm'
]
==
"SRN"
extra_input_models
=
[
"SRN"
,
"NRTR"
,
"SAR"
,
"SEED"
,
"SVTR"
]
extra_input_models
=
[
"SRN"
,
"NRTR"
,
"SAR"
,
"SEED"
,
"SVTR"
]
extra_input
=
False
if
config
[
'Architecture'
][
'algorithm'
]
==
'Distillation'
:
if
config
[
'Architecture'
][
'algorithm'
]
==
'Distillation'
:
extra_input
=
config
[
'Architecture'
][
'Models'
][
'Teacher'
][
for
key
in
config
[
'Architecture'
][
"Models"
]:
'algorithm'
]
in
extra_input_models
extra_input
=
extra_input
or
config
[
'Architecture'
][
'Models'
][
key
][
'algorithm'
]
in
extra_input_models
else
:
else
:
extra_input
=
config
[
'Architecture'
][
'algorithm'
]
in
extra_input_models
extra_input
=
config
[
'Architecture'
][
'algorithm'
]
in
extra_input_models
try
:
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