mouseland commited on
Commit
7c8c045
·
verified ·
1 Parent(s): 4bd14cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -193,10 +193,10 @@ def cellpose_segment(filepath, resize = 1000):
193
  target_size = (img_input.shape[1], img_input.shape[0])
194
  if (target_size[0]!=img.shape[1] or target_size[1]!=img.shape[0]):
195
  # scale it back to keep the orignal size
196
- masks = cv2.resize(masks.astype('uint16'), target_size, interpolation=cv2.INTER_NEAREST).astype('uint16')
197
 
198
  fname_masks = os.path.splitext(filepath[j])[0]+"_masks.tif"
199
- imsave(fname_masks, masks)
200
 
201
  myzip.write(fname_masks, arcname = os.path.split(fname_masks)[-1])
202
 
 
193
  target_size = (img_input.shape[1], img_input.shape[0])
194
  if (target_size[0]!=img.shape[1] or target_size[1]!=img.shape[0]):
195
  # scale it back to keep the orignal size
196
+ masks_rsz = cv2.resize(masks.astype('uint16'), target_size, interpolation=cv2.INTER_NEAREST).astype('uint16')
197
 
198
  fname_masks = os.path.splitext(filepath[j])[0]+"_masks.tif"
199
+ imsave(fname_masks, masks_rsz)
200
 
201
  myzip.write(fname_masks, arcname = os.path.split(fname_masks)[-1])
202