Skip to content

Commit 2f815ca

Browse files
committed
update draw obj in image with int
1 parent d919449 commit 2f815ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorlayer/visualize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ def draw_boxes_and_labels_to_image(image, classes=[], coords=[],
138138
x, y, x2, y2 = prepro.obj_box_coord_scale_to_pixelunit([x, y, x2, y2], (imh, imw))
139139

140140
cv2.rectangle(image,
141-
(x, y), (x2, y2), # up-left and botton-right
141+
(int(x), int(y)), (int(x2), int(y2)), # up-left and botton-right
142142
[0,255,0],
143143
thick)
144144

145145
cv2.putText(
146146
image,
147147
classes_list[classes[i]] + ((" %.2f" % (scores[i])) if (len(scores) != 0) else " "),
148-
(x, y), # button left
148+
(int(x), int(y)), # button left
149149
0,
150150
1.5e-3 * imh, # bigger = larger font
151151
[0,0,256], # self.meta['colors'][max_indx],

0 commit comments

Comments
 (0)