PCFISH commited on
Commit
4f504a6
1 Parent(s): 8fa0910

Upload 10 files

Browse files
Files changed (1) hide show
  1. app.py +36 -18
app.py CHANGED
@@ -17,24 +17,42 @@ model = TFSegformerForSemanticSegmentation.from_pretrained(
17
  def ade_palette():
18
  """ADE20K palette that maps each class to RGB values."""
19
  return [
20
- [255, 255, 255],
21
  [255, 0, 0],
22
- [82, 75, 69],
23
- [17, 0, 0],
24
- [88, 76, 86],
25
- [30, 30, 32],
26
- [26, 32, 44],
27
- [251, 225, 210],
28
- [32, 26, 74],
29
- [43, 48, 42],
30
- [65, 60, 66],
31
- [222, 176, 153],
32
- [192, 125, 106],
33
- [158, 106, 95],
34
- [147, 140, 121],
35
- [204, 194, 182],
36
- [163, 173, 182],
37
- [67, 57, 91],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  ]
39
 
40
  labels_list = []
@@ -103,7 +121,7 @@ def sepia(input_img):
103
  demo = gr.Interface(fn=sepia,
104
  inputs=gr.Image(shape=(400, 600)),
105
  outputs=['plot'],
106
- examples=["person-1.jpg", "person-2.jpg", "person-3.jpg", "person-4.jpg", "person-5.jpg"],
107
  allow_flagging='never')
108
 
109
 
 
17
  def ade_palette():
18
  """ADE20K palette that maps each class to RGB values."""
19
  return [
 
20
  [255, 0, 0],
21
+ [255, 255, 0],
22
+ [0, 255, 0],
23
+ [0, 255, 255],
24
+ [0, 0, 255],
25
+ [255, 0, 255],
26
+ [128, 0, 0],
27
+ [128, 128, 0],
28
+ [0, 128, 0],
29
+ [0, 128, 128],
30
+ [0, 0, 128],
31
+ [128, 0, 128],
32
+ [255, 128, 0],
33
+ [128, 255, 0],
34
+ [0, 128, 255],
35
+ [255, 0, 128],
36
+ [128, 0, 255],
37
+ [255, 255, 128],
38
+ [128, 255, 255],
39
+ [255, 128, 255],
40
+ [64, 64, 64],
41
+ [192, 192, 192],
42
+ [255, 255, 255],
43
+ [0, 0, 0],
44
+ [255, 128, 64],
45
+ [64, 255, 128],
46
+ [128, 64, 255],
47
+ [255, 192, 128],
48
+ [128, 255, 192],
49
+ [192, 128, 255],
50
+ [255, 0, 64],
51
+ [64, 128, 255],
52
+ [192, 255, 128],
53
+ [255, 128, 192],
54
+ [128, 192, 255],
55
+ [255, 255, 192],
56
  ]
57
 
58
  labels_list = []
 
121
  demo = gr.Interface(fn=sepia,
122
  inputs=gr.Image(shape=(400, 600)),
123
  outputs=['plot'],
124
+ examples=["sidewalk-1.png", "sidewalk-2.png", "sidewalk-3.png", "sidewalk-4.png", "sidewalk-5.png"],
125
  allow_flagging='never')
126
 
127