stevfoy commited on
Commit
870d26f
·
1 Parent(s): a893926
Files changed (2) hide show
  1. app.py +1 -1
  2. utils_for_app.py +1 -1
app.py CHANGED
@@ -84,7 +84,7 @@ def process_image_and_plot(image,iou_threshold=0.5, threshold=0.4):
84
  BBOX = rescale_boxes(detect[0], img_size, image.shape[:2])
85
 
86
 
87
- fig = plot_image(transformed_image[0].permute(1, 2, 0), BBOX)
88
  # cam = YoloCAM(model=model, target_layers=[model.model.layers[-2]], use_cuda=False)
89
 
90
  # grayscale_cam = cam(transformed_image, scaled_anchors)[0, :, :]
 
84
  BBOX = rescale_boxes(detect[0], img_size, image.shape[:2])
85
 
86
 
87
+ fig = plot_image(transformed_image[0].permute(1, 2, 0), detect)
88
  # cam = YoloCAM(model=model, target_layers=[model.model.layers[-2]], use_cuda=False)
89
 
90
  # grayscale_cam = cam(transformed_image, scaled_anchors)[0, :, :]
utils_for_app.py CHANGED
@@ -186,7 +186,7 @@ def plot_image(image, boxes):
186
  verticalalignment="top",
187
  bbox={"color": colors[int(class_pred)], "pad": 0},
188
  )
189
- print("found ",box ," ",colors[int(class_pred)]," ", upper_left_x ," ", width, " ",upper_left_y ," ", height," ",upper_left_x ," ", width," ", upper_left_y ," ", height)
190
 
191
  plt.show()
192
  return fig
 
186
  verticalalignment="top",
187
  bbox={"color": colors[int(class_pred)], "pad": 0},
188
  )
189
+ print("found ",box )
190
 
191
  plt.show()
192
  return fig