mouseland commited on
Commit
ea7f537
·
verified ·
1 Parent(s): af922c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- output_pil_img = Image.open(buf)
93
- return output_pil_img
 
 
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))