Commit
·
c5f8c89
1
Parent(s):
3821d52
Update app.py
Browse files
app.py
CHANGED
@@ -63,11 +63,11 @@ def gen_pred(img, model=seg_model):
|
|
63 |
img = tf.expand_dims(img, axis=0)
|
64 |
pred = model.predict(img)
|
65 |
pred = np.squeeze(pred, axis=0)
|
66 |
-
img_bytes = pred.tobytes()
|
67 |
-
nparr = np.frombuffer(img_bytes, np.byte)
|
68 |
-
pred_pil = cv2.imdecode(nparr, cv2.IMREAD_REDUCED_COLOR_8)
|
69 |
# return "UI in developing process ..."
|
70 |
-
return
|
71 |
|
72 |
title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
|
73 |
description = "Upload an image and get prediction mask"
|
|
|
63 |
img = tf.expand_dims(img, axis=0)
|
64 |
pred = model.predict(img)
|
65 |
pred = np.squeeze(pred, axis=0)
|
66 |
+
# img_bytes = pred.tobytes()
|
67 |
+
# nparr = np.frombuffer(img_bytes, np.byte)
|
68 |
+
# pred_pil = cv2.imdecode(nparr, cv2.IMREAD_REDUCED_COLOR_8)
|
69 |
# return "UI in developing process ..."
|
70 |
+
return pred
|
71 |
|
72 |
title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
|
73 |
description = "Upload an image and get prediction mask"
|