Megatron17 commited on
Commit
57cc987
1 Parent(s): 4370987

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -0
utils.py CHANGED
@@ -186,6 +186,7 @@ def draw_bounding_boxes(image, boxes, class_labels):
186
  return image
187
 
188
  def get_annotations(nms_boxes_output,width, height):
 
189
  for box in nms_boxes_output[0]:
190
  class_prediction = int(box[0])
191
  box = box[2:]
@@ -203,3 +204,4 @@ def get_annotations(nms_boxes_output,width, height):
203
  rect = rect.get_bbox().get_points()
204
  annotations.append([rect[0].astype(int).tolist()+rect[1].astype(int).tolist(),
205
  config.PASCAL_CLASSES[class_prediction]])
 
 
186
  return image
187
 
188
  def get_annotations(nms_boxes_output,width, height):
189
+ annotations = []
190
  for box in nms_boxes_output[0]:
191
  class_prediction = int(box[0])
192
  box = box[2:]
 
204
  rect = rect.get_bbox().get_points()
205
  annotations.append([rect[0].astype(int).tolist()+rect[1].astype(int).tolist(),
206
  config.PASCAL_CLASSES[class_prediction]])
207
+ return annotations