Commit
·
c0ca22c
1
Parent(s):
7e182e3
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import numpy as np
|
|
8 |
import keras.backend as K
|
9 |
|
10 |
from PIL import Image
|
11 |
-
|
12 |
|
13 |
#from tensorflow import keras
|
14 |
|
@@ -79,7 +79,7 @@ def gen_pred(img=inputs, model=seg_model):
|
|
79 |
pred = model.predict(img)
|
80 |
pred = np.squeeze(pred, axis=0)
|
81 |
print(pred)
|
82 |
-
pred =
|
83 |
# color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
|
84 |
# pil_image = Image.fromarray(pred)
|
85 |
# PIL_image = Image.fromarray(pred.astype('uint8'), 'RGB')
|
|
|
8 |
import keras.backend as K
|
9 |
|
10 |
from PIL import Image
|
11 |
+
from matplotlib import cm
|
12 |
|
13 |
#from tensorflow import keras
|
14 |
|
|
|
79 |
pred = model.predict(img)
|
80 |
pred = np.squeeze(pred, axis=0)
|
81 |
print(pred)
|
82 |
+
pred = Image.fromarray(np.uint8(cm.gist_earth(pred)*255))
|
83 |
# color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
|
84 |
# pil_image = Image.fromarray(pred)
|
85 |
# PIL_image = Image.fromarray(pred.astype('uint8'), 'RGB')
|