Spaces:
Sleeping
Sleeping
Update yolov5.py
Browse files
yolov5.py
CHANGED
@@ -233,7 +233,9 @@ 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 |
results.append(visualization)
|
238 |
plt.clf()
|
239 |
#return image_array
|
|
|
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 |
+
temp = image_array.reshape((rgb_img_float.shape[0],rgb_img_float.shape[1] )
|
238 |
+
visualization = show_factorization_on_image(rgb_img_float,np.stack([temp] * 3, axis=-1) , image_weight=0.3)
|
239 |
results.append(visualization)
|
240 |
plt.clf()
|
241 |
#return image_array
|