提交 2103753d 编写于 作者: L LDOUBLEV

sorted

上级 51640f62
......@@ -116,6 +116,9 @@ def sorted_boxes(dt_boxes):
sorted boxes(array) with shape [4, 2]
"""
num_boxes = dt_boxes.shape[0]
if abs(num_boxes - 2) < 1e-4:
sorted_boxes = sorted(dt_boxes, key=lambda x: (x[1], x[0]))
else:
sorted_boxes = sorted(dt_boxes, key=lambda x: (x[0][1], x[0][0]))
_boxes = list(sorted_boxes)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册