提交 0758f913 编写于 作者: L LDOUBLEV

modify batch num in rec and fix sorted_box func

上级 4af8bd06
......@@ -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):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册