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
c1eaa17a
Unverified
Commit
c1eaa17a
authored
Jun 28, 2022
by
entropy2333
Committed by
GitHub
Jun 28, 2022
Browse files
fix multiprocess overwrite (#6488)
parent
d38f5c8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
tools/infer/predict_system.py
tools/infer/predict_system.py
+7
-2
No files found.
tools/infer/predict_system.py
View file @
c1eaa17a
...
...
@@ -138,7 +138,7 @@ def main(args):
logger
.
info
(
"In PP-OCRv3, rec_image_shape parameter defaults to '3, 48, 320', "
"if you are using recognition model with PP-OCRv2 or an older version, please set --rec_image_shape='3,32,320"
)
# warm up 10 times
if
args
.
warmup
:
img
=
np
.
random
.
uniform
(
0
,
255
,
[
640
,
640
,
3
]).
astype
(
np
.
uint8
)
...
...
@@ -201,7 +201,12 @@ def main(args):
text_sys
.
text_detector
.
autolog
.
report
()
text_sys
.
text_recognizer
.
autolog
.
report
()
with
open
(
os
.
path
.
join
(
draw_img_save_dir
,
"system_results.txt"
),
'w'
,
encoding
=
'utf-8'
)
as
f
:
if
args
.
total_process_num
>
1
:
save_results_path
=
os
.
path
.
join
(
draw_img_save_dir
,
f
"system_results_
{
args
.
process_id
}
.txt"
)
else
:
save_results_path
=
os
.
path
.
join
(
draw_img_save_dir
,
"system_results.txt"
)
with
open
(
save_results_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
f
.
writelines
(
save_results
)
...
...
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