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 |
-
|
|
|
|
|
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)
|