Skip to content

Commit

Permalink
Fix compatibility for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwwyyxx committed Sep 19, 2017
1 parent 1132e83 commit 5f6558d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from __future__ import print_function

import numpy as np
from six.moves import range
import PIL.Image as Image
import PIL.ImageColor as ImageColor
import PIL.ImageDraw as ImageDraw
Expand Down Expand Up @@ -73,7 +74,7 @@ def draw_bounding_boxes(image, gt_boxes, im_info):
gt_boxes_new[:,:4] = np.round(gt_boxes_new[:,:4].copy() / im_info[2])
disp_image = Image.fromarray(np.uint8(image[0]))

for i in xrange(num_boxes):
for i in range(num_boxes):
this_class = int(gt_boxes_new[i, 4])
disp_image = _draw_single_box(disp_image,
gt_boxes_new[i, 0],
Expand Down

0 comments on commit 5f6558d

Please sign in to comment.