Update app.py
Browse files
app.py
CHANGED
|
@@ -89,8 +89,10 @@ def plot_outlines(img, masks):
|
|
| 89 |
buf = io.BytesIO()
|
| 90 |
fig.savefig(buf, bbox_inches='tight')
|
| 91 |
buf.seek(0)
|
| 92 |
-
|
| 93 |
-
|
|
|
|
|
|
|
| 94 |
|
| 95 |
def plot_overlay(img, masks):
|
| 96 |
img = normalize99(img.astype(np.float32).mean(axis=-1))
|
|
|
|
| 89 |
buf = io.BytesIO()
|
| 90 |
fig.savefig(buf, bbox_inches='tight')
|
| 91 |
buf.seek(0)
|
| 92 |
+
pil_img = Image.open(buf)
|
| 93 |
+
|
| 94 |
+
pil_img = pil_img.resize((img.shape[-1], img.shape[-2]), filter = Image.BICUBIC)
|
| 95 |
+
return pil_img
|
| 96 |
|
| 97 |
def plot_overlay(img, masks):
|
| 98 |
img = normalize99(img.astype(np.float32).mean(axis=-1))
|