@@ -183,7 +183,7 @@ def draw_info_if_bb_selected(tmp_img):
183
183
last_class_index = len (class_list ) - 1
184
184
185
185
# 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 ))
187
187
188
188
# create window
189
189
WINDOW_NAME = 'Bounding Box Labeler'
@@ -213,12 +213,12 @@ def draw_info_if_bb_selected(tmp_img):
213
213
while True :
214
214
# clone the img
215
215
tmp_img = img .copy ()
216
- width , height = tmp_img .shape [:2 ]
216
+ height , width = tmp_img .shape [:2 ]
217
217
if edges_on == True :
218
218
# draw edges
219
219
tmp_img = draw_edges (tmp_img )
220
220
# 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 )
222
222
img_path = image_list [img_index ]
223
223
txt_path = get_txt_path (img_path )
224
224
# draw already done bounding boxes
@@ -300,3 +300,4 @@ def draw_info_if_bb_selected(tmp_img):
300
300
break
301
301
302
302
cv2 .destroyAllWindows ()
303
+
0 commit comments