Spaces:
Sleeping
Sleeping
Upload 10 files
Browse files
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 |
-
[
|
| 23 |
-
[
|
| 24 |
-
[
|
| 25 |
-
[
|
| 26 |
-
[
|
| 27 |
-
[
|
| 28 |
-
[
|
| 29 |
-
[
|
| 30 |
-
[
|
| 31 |
-
[
|
| 32 |
-
[
|
| 33 |
-
[
|
| 34 |
-
[
|
| 35 |
-
[
|
| 36 |
-
[
|
| 37 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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=["
|
| 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 |
|