s3nh commited on
Commit
ef83dce
·
1 Parent(s): 54d8be6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -36,7 +36,7 @@ def inference(image, chosen_model):
36
  color_seg = np.zeros((seg.shape[0], seg.shape[1], 3), dtype=np.uint8) # height, width, 3
37
  palette = np.array([[0, 0, 0],[255, 255, 255]])
38
  for label, color in enumerate(palette):
39
- color_seg[seg == label, :] = color
40
  # Convert to BGR
41
  color_seg = color_seg[..., ::-1]
42
  img = np.array(image) * 0.5 + color_seg * 0.5
 
36
  color_seg = np.zeros((seg.shape[0], seg.shape[1], 3), dtype=np.uint8) # height, width, 3
37
  palette = np.array([[0, 0, 0],[255, 255, 255]])
38
  for label, color in enumerate(palette):
39
+ color_seg[seg == label] = color
40
  # Convert to BGR
41
  color_seg = color_seg[..., ::-1]
42
  img = np.array(image) * 0.5 + color_seg * 0.5