yumingj commited on
Commit
30e2223
1 Parent(s): cd1147d
Files changed (1) hide show
  1. model.py +1 -3
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
- mask = mask.resize(
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