Spaces:
Runtime error
Runtime error
update
Browse files
model.py
CHANGED
@@ -86,9 +86,7 @@ class Model:
|
|
86 |
@staticmethod
|
87 |
def process_mask(mask: np.ndarray) -> np.ndarray:
|
88 |
if mask.shape != (512, 256, 3):
|
89 |
-
|
90 |
-
size=(512, 256),
|
91 |
-
resample=PIL.Image.NEAREST)
|
92 |
seg_map = np.full(mask.shape[:-1], -1)
|
93 |
for index, color in enumerate(COLOR_LIST):
|
94 |
seg_map[np.sum(mask == color, axis=2) == 3] = index
|
|
|
86 |
@staticmethod
|
87 |
def process_mask(mask: np.ndarray) -> np.ndarray:
|
88 |
if mask.shape != (512, 256, 3):
|
89 |
+
return None
|
|
|
|
|
90 |
seg_map = np.full(mask.shape[:-1], -1)
|
91 |
for index, color in enumerate(COLOR_LIST):
|
92 |
seg_map[np.sum(mask == color, axis=2) == 3] = index
|