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
93bd46e9
Commit
93bd46e9
authored
May 25, 2020
by
LDOUBLEV
Browse files
delete support multi-line txt display
parent
eec9155e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
tools/infer/utility.py
tools/infer/utility.py
+1
-10
No files found.
tools/infer/utility.py
View file @
93bd46e9
...
...
@@ -174,16 +174,7 @@ def draw_ocr(image, boxes, txts, scores, draw_txt=True, drop_score=0.5):
continue
font
=
ImageFont
.
truetype
(
"./doc/simfang.ttf"
,
font_size
,
encoding
=
"utf-8"
)
new_txt
=
str
(
count
)
+
': '
+
txt
+
' '
+
'%.3f'
%
(
scores
[
count
])
while
len
(
new_txt
)
>
28
:
tmp
=
new_txt
new_txt
=
tmp
[:
28
]
draw_txt
.
text
(
(
20
,
gap
*
(
count
+
1
)),
new_txt
,
txt_color
,
font
=
font
)
new_txt
=
tmp
[
28
:]
count
+=
1
new_txt
=
str
(
idx
)
+
': '
+
txt
+
' '
+
'%.3f'
%
(
scores
[
idx
])
draw_txt
.
text
(
(
20
,
gap
*
(
count
+
1
)),
new_txt
,
txt_color
,
font
=
font
)
count
+=
1
...
...
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