Commit
·
7ffb813
1
Parent(s):
1a462da
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,6 @@ import numpy as np
|
|
8 |
import keras.backend as K
|
9 |
|
10 |
from PIL import Image
|
11 |
-
from matplotlib import pyplot as plt
|
12 |
|
13 |
|
14 |
#from tensorflow import keras
|
@@ -71,9 +70,9 @@ def gen_pred(img=inputs, model=seg_model):
|
|
71 |
pred = np.squeeze(pred, axis=0)
|
72 |
print(pred)
|
73 |
# color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
|
74 |
-
|
75 |
"UI in developing process ..."
|
76 |
-
return
|
77 |
|
78 |
|
79 |
title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
|
|
|
8 |
import keras.backend as K
|
9 |
|
10 |
from PIL import Image
|
|
|
11 |
|
12 |
|
13 |
#from tensorflow import keras
|
|
|
70 |
pred = np.squeeze(pred, axis=0)
|
71 |
print(pred)
|
72 |
# color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
|
73 |
+
pil_image = Image.fromarray(pred)
|
74 |
"UI in developing process ..."
|
75 |
+
return pil_image
|
76 |
|
77 |
|
78 |
title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
|