Spaces:
Runtime error
Runtime error
Commit
·
4a6f2fb
1
Parent(s):
735264e
Update biomap/utils.py
Browse files- biomap/utils.py +2 -2
biomap/utils.py
CHANGED
@@ -77,8 +77,8 @@ def transform_to_pil(outputs, alpha=0.3):
|
|
77 |
# Transform label by saving it then open it
|
78 |
label = outputs["linear_preds"][0].numpy()
|
79 |
# image_label = Image.fromarray(label, mode="P")
|
80 |
-
plt.imsave("
|
81 |
-
image_label = Image.open("
|
82 |
# Overlay labels with img wit alpha
|
83 |
background = img.convert("RGBA")
|
84 |
overlay = image_label.convert("RGBA")
|
|
|
77 |
# Transform label by saving it then open it
|
78 |
label = outputs["linear_preds"][0].numpy()
|
79 |
# image_label = Image.fromarray(label, mode="P")
|
80 |
+
plt.imsave("label.png", label, cmap=cmap)
|
81 |
+
image_label = Image.open("label.png")
|
82 |
# Overlay labels with img wit alpha
|
83 |
background = img.convert("RGBA")
|
84 |
overlay = image_label.convert("RGBA")
|