Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -152,8 +152,8 @@ class Dataset(BaseDataset):
|
|
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)
|
158 |
masks = [(mask == v) for v in self.class_values]
|
159 |
mask = np.stack(masks, axis=-1).astype('float')
|
|
|
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)
|
158 |
masks = [(mask == v) for v in self.class_values]
|
159 |
mask = np.stack(masks, axis=-1).astype('float')
|