ronnief1 commited on
Commit
37c809c
1 Parent(s): e34d9c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -151,7 +151,9 @@ class Dataset(BaseDataset):
151
  # read data
152
  image = cv2.imread(self.images_fps)
153
  image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
154
- mask = cv2.imread(self.masks_fps, 0)
 
 
155
  mask[np.where(mask < 8)] = 0
156
  mask[np.where(mask > 8)] = 255
157
  # extract certain classes from mask (e.g. polyp)
@@ -221,7 +223,6 @@ def model_infer(img_name):
221
  image, mask = input
222
 
223
  image_vis = image.transpose(1, 2, 0)
224
- #gt_mask = mask[0]
225
  gt_mask = mask[0].astype('uint8')
226
  pr_mask = (output[0].numpy() > threshold).astype('uint8')[0]
227
  i = i + 1
 
151
  # read data
152
  image = cv2.imread(self.images_fps)
153
  image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
154
+ # mask = cv2.imread(self.masks_fps, 0)
155
+ mask = cv2.imread(self.masks_fps)
156
+
157
  mask[np.where(mask < 8)] = 0
158
  mask[np.where(mask > 8)] = 255
159
  # extract certain classes from mask (e.g. polyp)
 
223
  image, mask = input
224
 
225
  image_vis = image.transpose(1, 2, 0)
 
226
  gt_mask = mask[0].astype('uint8')
227
  pr_mask = (output[0].numpy() > threshold).astype('uint8')[0]
228
  i = i + 1