Skip to content

Commit 564abba

Browse files
committed
fixing colors
1 parent 9089ce0 commit 564abba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

run.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def draw_info_if_bb_selected(tmp_img):
183183
last_class_index = len(class_list) - 1
184184

185185
# random rgb for each class
186-
class_rgb = np.random.random_integers(low=0, high=255, size=(3,len(class_list)))
186+
class_rgb = np.random.random_integers(low=0, high=255, size=(len(class_list),3))
187187

188188
# create window
189189
WINDOW_NAME = 'Bounding Box Labeler'
@@ -213,12 +213,12 @@ def draw_info_if_bb_selected(tmp_img):
213213
while True:
214214
# clone the img
215215
tmp_img = img.copy()
216-
width, height = tmp_img.shape[:2]
216+
height, width = tmp_img.shape[:2]
217217
if edges_on == True:
218218
# draw edges
219219
tmp_img = draw_edges(tmp_img)
220220
# draw vertical and horizong yellow guide lines
221-
draw_line(tmp_img, mouse_x, mouse_y, width, height)
221+
draw_line(tmp_img, mouse_x, mouse_y, height, width)
222222
img_path = image_list[img_index]
223223
txt_path = get_txt_path(img_path)
224224
# draw already done bounding boxes
@@ -300,3 +300,4 @@ def draw_info_if_bb_selected(tmp_img):
300300
break
301301

302302
cv2.destroyAllWindows()
303+

0 commit comments

Comments
 (0)