Spaces:
Runtime error
Runtime error
vahidrezanezhad
commited on
Commit
•
7656d23
1
Parent(s):
34e73c4
Update app.py
Browse files
app.py
CHANGED
@@ -9,22 +9,22 @@ def resize_image(img_in,input_height,input_width):
|
|
9 |
|
10 |
def visualize_model_output(prediction):
|
11 |
unique_classes = np.unique(prediction[:,:,0])
|
12 |
-
rgb_colors = {'0':[0, 0, 0],
|
13 |
-
'1'
|
14 |
-
'2'
|
15 |
-
'3'
|
16 |
-
'4'
|
17 |
-
'5'
|
18 |
-
'6'
|
19 |
-
'7'
|
20 |
-
'8'
|
21 |
-
'9'
|
22 |
-
'10'
|
23 |
-
'11'
|
24 |
-
'12'
|
25 |
-
'13'
|
26 |
-
'14'
|
27 |
-
'15'
|
28 |
|
29 |
output = np.zeros(prediction.shape)
|
30 |
|
|
|
9 |
|
10 |
def visualize_model_output(prediction):
|
11 |
unique_classes = np.unique(prediction[:,:,0])
|
12 |
+
rgb_colors = {'0' : [0, 0, 0],
|
13 |
+
'1' : [255, 0, 0],
|
14 |
+
'2' : [255, 125, 0],
|
15 |
+
'3' : [255, 0, 125],
|
16 |
+
'4' : [125, 125, 125],
|
17 |
+
'5' : [125, 125, 0],
|
18 |
+
'6' : [0, 125, 255],
|
19 |
+
'7' : [0, 125, 0],
|
20 |
+
'8' : [125, 125, 125],
|
21 |
+
'9' : [0, 125, 255],
|
22 |
+
'10' : [125, 0, 125],
|
23 |
+
'11' : [0, 255, 0],
|
24 |
+
'12' : [0, 0, 255],
|
25 |
+
'13' : [0, 255, 255],
|
26 |
+
'14' : [255, 125, 125],
|
27 |
+
'15' : [255, 0, 255]}
|
28 |
|
29 |
output = np.zeros(prediction.shape)
|
30 |
|