Spaces:
Sleeping
Sleeping
조승진
commited on
Commit
·
050c76e
1
Parent(s):
dea9e22
Changes
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ model = TFSegformerForSemanticSegmentation.from_pretrained(
|
|
15 |
)
|
16 |
|
17 |
def ade_palette():
|
18 |
-
"""ADE20K palette that maps each class to
|
19 |
return [
|
20 |
[204, 87, 92],
|
21 |
[112, 185, 212],
|
@@ -171,7 +171,7 @@ def ade_palette():
|
|
171 |
|
172 |
labels_list = []
|
173 |
|
174 |
-
with open(r'
|
175 |
for line in fp:
|
176 |
labels_list.append(line[:-1])
|
177 |
|
@@ -235,7 +235,7 @@ def sepia(input_img):
|
|
235 |
demo = gr.Interface(fn=sepia,
|
236 |
inputs=gr.Image(shape=(400, 600)),
|
237 |
outputs=['plot'],
|
238 |
-
examples=["img1.jpg", "img2.jpg", "img3.jpg", "img4.jpg",
|
239 |
allow_flagging='never')
|
240 |
|
241 |
|
|
|
15 |
)
|
16 |
|
17 |
def ade_palette():
|
18 |
+
"""ADE20K palette that maps each class to RGB values."""
|
19 |
return [
|
20 |
[204, 87, 92],
|
21 |
[112, 185, 212],
|
|
|
171 |
|
172 |
labels_list = []
|
173 |
|
174 |
+
with open(r'labels.txt', 'r') as fp:
|
175 |
for line in fp:
|
176 |
labels_list.append(line[:-1])
|
177 |
|
|
|
235 |
demo = gr.Interface(fn=sepia,
|
236 |
inputs=gr.Image(shape=(400, 600)),
|
237 |
outputs=['plot'],
|
238 |
+
examples=["img1.jpg", "img2.jpg", "img3.jpg", "img4.jpg","img5.jpg","img6.jpg"],
|
239 |
allow_flagging='never')
|
240 |
|
241 |
|