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
0758f913
Commit
0758f913
authored
May 20, 2020
by
LDOUBLEV
Browse files
modify batch num in rec and fix sorted_box func
parent
4af8bd06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
tools/infer/predict_rec.py
tools/infer/predict_rec.py
+1
-1
tools/infer/predict_system.py
tools/infer/predict_system.py
+1
-1
No files found.
tools/infer/predict_rec.py
View file @
0758f913
...
@@ -59,7 +59,7 @@ class TextRecognizer(object):
...
@@ -59,7 +59,7 @@ class TextRecognizer(object):
def
__call__
(
self
,
img_list
):
def
__call__
(
self
,
img_list
):
img_num
=
len
(
img_list
)
img_num
=
len
(
img_list
)
batch_num
=
30
batch_num
=
12
rec_res
=
[]
rec_res
=
[]
predict_time
=
0
predict_time
=
0
for
beg_img_no
in
range
(
0
,
img_num
,
batch_num
):
for
beg_img_no
in
range
(
0
,
img_num
,
batch_num
):
...
...
tools/infer/predict_system.py
View file @
0758f913
...
@@ -89,7 +89,7 @@ def sorted_boxes(dt_boxes):
...
@@ -89,7 +89,7 @@ def sorted_boxes(dt_boxes):
sorted boxes(array) with shape [4, 2]
sorted boxes(array) with shape [4, 2]
"""
"""
num_boxes
=
dt_boxes
.
shape
[
0
]
num_boxes
=
dt_boxes
.
shape
[
0
]
sorted_boxes
=
sorted
(
dt_boxes
,
key
=
lambda
x
:
x
[
0
][
1
])
sorted_boxes
=
sorted
(
dt_boxes
,
key
=
lambda
x
:
(
x
[
0
][
1
]
,
x
[
0
][
0
])
)
_boxes
=
list
(
sorted_boxes
)
_boxes
=
list
(
sorted_boxes
)
for
i
in
range
(
num_boxes
-
1
):
for
i
in
range
(
num_boxes
-
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