mouseland commited on
Commit
0079cc8
·
verified ·
1 Parent(s): 7c8c045

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -194,7 +194,9 @@ def cellpose_segment(filepath, resize = 1000):
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
 
 
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
+ else:
198
+ masks_rsz = masks.copy()
199
+
200
  fname_masks = os.path.splitext(filepath[j])[0]+"_masks.tif"
201
  imsave(fname_masks, masks_rsz)
202