Spaces:
Running
Running
Adjust output resolution
Browse files
app.py
CHANGED
@@ -69,9 +69,9 @@ def greet(image, audio):
|
|
69 |
seg_image = ((1 - seg.squeeze().detach().cpu().numpy()) * 255).astype(np.uint8)
|
70 |
seg_image = Image.fromarray(seg_image)
|
71 |
|
72 |
-
|
73 |
heatmap_image = cv2.applyColorMap(np.array(seg_image), cv2.COLORMAP_JET)
|
74 |
-
overlaid_image = cv2.addWeighted(np.array(
|
75 |
|
76 |
return overlaid_image
|
77 |
|
|
|
69 |
seg_image = ((1 - seg.squeeze().detach().cpu().numpy()) * 255).astype(np.uint8)
|
70 |
seg_image = Image.fromarray(seg_image)
|
71 |
|
72 |
+
seg_image = seg_image.resize(image.size, Image.BICUBIC)
|
73 |
heatmap_image = cv2.applyColorMap(np.array(seg_image), cv2.COLORMAP_JET)
|
74 |
+
overlaid_image = cv2.addWeighted(np.array(image), 0.5, heatmap_image, 0.5, 0)
|
75 |
|
76 |
return overlaid_image
|
77 |
|