hyo37009 commited on
Commit
485c5ce
·
1 Parent(s): 837aa2c
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -59,7 +59,9 @@ def greet(input_img):
59
  for label, color in enumerate(colormap):
60
  color_seg[seg.numpy() == label, :] = color
61
 
62
- pred_img = np.array(input_img) * 0.5 + color_seg * 0.5
 
 
63
  pred_img = pred_img.astype(np.uint8)
64
 
65
  fig = draw_plot(pred_img, seg)
 
59
  for label, color in enumerate(colormap):
60
  color_seg[seg.numpy() == label, :] = color
61
 
62
+ color_seg_resized = tf.image.resize(color_seg, (input_img.shape[0], input_img.shape[1]))
63
+
64
+ pred_img = np.array(input_img) * 0.5 + color_seg_resized * 0.5
65
  pred_img = pred_img.astype(np.uint8)
66
 
67
  fig = draw_plot(pred_img, seg)