modify batch num in rec and fix sorted_box func
This commit is contained in:
parent
4af8bd069a
commit
0758f91361
|
@ -59,7 +59,7 @@ class TextRecognizer(object):
|
|||
|
||||
def __call__(self, img_list):
|
||||
img_num = len(img_list)
|
||||
batch_num = 30
|
||||
batch_num = 12
|
||||
rec_res = []
|
||||
predict_time = 0
|
||||
for beg_img_no in range(0, img_num, batch_num):
|
||||
|
|
|
@ -89,7 +89,7 @@ def sorted_boxes(dt_boxes):
|
|||
sorted boxes(array) with shape [4, 2]
|
||||
"""
|
||||
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)
|
||||
|
||||
for i in range(num_boxes - 1):
|
||||
|
|
Loading…
Reference in New Issue