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
25a5ca6c
Unverified
Commit
25a5ca6c
authored
May 15, 2020
by
dyning
Committed by
GitHub
May 15, 2020
Browse files
Update utility.py
parent
ed177f8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tools/infer/utility.py
tools/infer/utility.py
+1
-1
No files found.
tools/infer/utility.py
View file @
25a5ca6c
...
@@ -172,7 +172,7 @@ def draw_ocr(image, boxes, txts, scores, draw_txt=True, drop_score=0.5):
...
@@ -172,7 +172,7 @@ def draw_ocr(image, boxes, txts, scores, draw_txt=True, drop_score=0.5):
continue
continue
font
=
ImageFont
.
truetype
(
font
=
ImageFont
.
truetype
(
"./doc/simfang.ttf"
,
font_size
,
encoding
=
"utf-8"
)
"./doc/simfang.ttf"
,
font_size
,
encoding
=
"utf-8"
)
new_txt
=
str
(
count
)
+
': '
+
txt
+
' '
+
str
(
scores
[
count
])
new_txt
=
str
(
count
)
+
': '
+
txt
+
' '
+
'%.3f'
%
(
scores
[
count
])
draw_txt
.
text
(
draw_txt
.
text
(
(
20
,
gap
*
(
count
+
1
)),
new_txt
,
txt_color
,
font
=
font
)
(
20
,
gap
*
(
count
+
1
)),
new_txt
,
txt_color
,
font
=
font
)
count
+=
1
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