BhumikaMak commited on
Commit
0b813ac
·
verified ·
1 Parent(s): 4e369e3

Update yolov5.py

Browse files
Files changed (1) hide show
  1. yolov5.py +2 -1
yolov5.py CHANGED
@@ -233,7 +233,8 @@ def dff_nmf(image, target_lyr, n_components):
233
 
234
  fig.canvas.draw() # Draw the canvas to make sure the image is rendered
235
  image_array = np.array(fig.canvas.renderer.buffer_rgba()) # Convert to numpy array
236
- results.append(image_array)
 
237
  plt.clf()
238
  #return image_array
239
 
 
233
 
234
  fig.canvas.draw() # Draw the canvas to make sure the image is rendered
235
  image_array = np.array(fig.canvas.renderer.buffer_rgba()) # Convert to numpy array
236
+ visualization = show_factorization_on_image(rgb_img_float, image_array.reshape(rgb_img_float.shape), image_weight=0.3)
237
+ results.append(visualization)
238
  plt.clf()
239
  #return image_array
240