Commit 30c7a97c authored by Yuxin Wu's avatar Yuxin Wu

fix typo in 982f42b9

parent 982f42b9
...@@ -408,8 +408,8 @@ def draw_boxes(im, boxes, labels=None, color=None): ...@@ -408,8 +408,8 @@ def draw_boxes(im, boxes, labels=None, color=None):
bottom_left[1] = box[3] - 0.3 * lineh bottom_left[1] = box[3] - 0.3 * lineh
x1, y1 = int(top_left[0]), int(top_left[1]) x1, y1 = int(top_left[0]), int(top_left[1])
x2, y2 = int(top_left[0] + linew), int(top_left[1] + lineh) x2, y2 = int(top_left[0] + linew), int(top_left[1] + lineh)
x1, x2 = [np.clip(x, 0, img.shape[1] - 1) for x in [x1, x2]] x1, x2 = [np.clip(x, 0, im.shape[1] - 1) for x in [x1, x2]]
y1, y2 = [np.clip(y, 0, img.shape[0] - 1) for y in [y1, y2]] y1, y2 = [np.clip(y, 0, im.shape[0] - 1) for y in [y1, y2]]
if color is None: if color is None:
# find the best color # find the best color
mean_color = im[y1:y2 + 1, x1:x2 + 1].mean(axis=(0, 1)) mean_color = im[y1:y2 + 1, x1:x2 + 1].mean(axis=(0, 1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment