Spaces:
Running
Running
Update yolov5.py
Browse files
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 |
-
|
|
|
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 |
|