未验证 提交 9f29ab9a 编写于 作者: D Double_V 提交者: GitHub

Merge pull request #7856 from LDOUBLEV/26_doc

fix sorted
......@@ -116,7 +116,10 @@ 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], x[0][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)
for i in range(num_boxes - 1):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册