From 6c0b2ab66a9b15f875e774913d7c149bab6f8be6 Mon Sep 17 00:00:00 2001 From: Kaipeng Deng Date: Thu, 23 May 2019 12:04:55 +0800 Subject: [PATCH] fix yolov3/infer.py compatable python3 (#2298) --- PaddleCV/yolov3/box_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PaddleCV/yolov3/box_utils.py b/PaddleCV/yolov3/box_utils.py index fb8918dc..37ad5d7c 100644 --- a/PaddleCV/yolov3/box_utils.py +++ b/PaddleCV/yolov3/box_utils.py @@ -166,7 +166,8 @@ def draw_boxes_on_image(image_path, boxes, scores, labels, label_names, score_th verticalalignment='bottom', horizontalalignment='left', bbox={'facecolor': colors[label], 'alpha': 0.5, 'pad': 0}, 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') plt.axis('off') plt.gca().xaxis.set_major_locator(plt.NullLocator()) -- GitLab