未验证 提交 6c0b2ab6 编写于 作者: K Kaipeng Deng 提交者: GitHub

fix yolov3/infer.py compatable python3 (#2298)

上级 702c3bcf
...@@ -166,7 +166,8 @@ def draw_boxes_on_image(image_path, boxes, scores, labels, label_names, score_th ...@@ -166,7 +166,8 @@ def draw_boxes_on_image(image_path, boxes, scores, labels, label_names, score_th
verticalalignment='bottom', horizontalalignment='left', verticalalignment='bottom', horizontalalignment='left',
bbox={'facecolor': colors[label], 'alpha': 0.5, 'pad': 0}, bbox={'facecolor': colors[label], 'alpha': 0.5, 'pad': 0},
fontsize=8, color='white') fontsize=8, color='white')
print("\t {:15s} at {:25} score: {:.5f}".format(label_names[int(label)], map(int, list(box)), score)) print("\t {:15s} at {:25} score: {:.5f}".format(
label_names[int(label)], str(list(map(int, list(box)))), score))
image_name = image_name.replace('jpg', 'png') image_name = image_name.replace('jpg', 'png')
plt.axis('off') plt.axis('off')
plt.gca().xaxis.set_major_locator(plt.NullLocator()) plt.gca().xaxis.set_major_locator(plt.NullLocator())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册