Spaces:
Runtime error
Runtime error
commit_8
Browse files- .gitattributes +1 -1
- app.py +19 -20
- labels.txt +18 -18
.gitattributes
CHANGED
@@ -32,4 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
32 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
32 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -14,31 +14,29 @@ model = TFSegformerForSemanticSegmentation.from_pretrained(
|
|
14 |
"mattmdjaga/segformer_b2_clothes"
|
15 |
)
|
16 |
|
17 |
-
|
18 |
def ade_palette():
|
19 |
"""ADE20K palette that maps each class to RGB values."""
|
20 |
return [
|
21 |
-
[
|
22 |
-
[
|
23 |
-
[
|
24 |
-
[
|
25 |
-
[
|
26 |
-
[
|
27 |
-
[
|
28 |
-
[
|
29 |
-
[
|
30 |
-
[
|
31 |
-
[
|
32 |
-
[
|
33 |
-
[
|
34 |
-
[
|
35 |
-
[
|
36 |
-
[
|
37 |
-
[
|
38 |
-
[
|
39 |
]
|
40 |
|
41 |
-
|
42 |
labels_list = []
|
43 |
|
44 |
with open(r'labels.txt', 'r') as fp:
|
@@ -108,4 +106,5 @@ demo = gr.Interface(fn=sepia,
|
|
108 |
examples=["person-1.jpg", "person-2.jpg", "person-3.jpg", "person-4.jpg", "person-5.jpg"],
|
109 |
allow_flagging='never')
|
110 |
|
|
|
111 |
demo.launch()
|
|
|
14 |
"mattmdjaga/segformer_b2_clothes"
|
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],
|
22 |
+
[45, 189, 106],
|
23 |
+
[234, 123, 67],
|
24 |
+
[78, 56, 123],
|
25 |
+
[210, 32, 89],
|
26 |
+
[90, 180, 56],
|
27 |
+
[155, 102, 200],
|
28 |
+
[33, 147, 176],
|
29 |
+
[255, 183, 76],
|
30 |
+
[67, 123, 89],
|
31 |
+
[190, 60, 45],
|
32 |
+
[134, 112, 200],
|
33 |
+
[56, 45, 189],
|
34 |
+
[200, 56, 123],
|
35 |
+
[87, 92, 204],
|
36 |
+
[120, 56, 123],
|
37 |
+
[45, 78, 123]
|
38 |
]
|
39 |
|
|
|
40 |
labels_list = []
|
41 |
|
42 |
with open(r'labels.txt', 'r') as fp:
|
|
|
106 |
examples=["person-1.jpg", "person-2.jpg", "person-3.jpg", "person-4.jpg", "person-5.jpg"],
|
107 |
allow_flagging='never')
|
108 |
|
109 |
+
|
110 |
demo.launch()
|
labels.txt
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
1 |
+
Background
|
2 |
+
Hat
|
3 |
+
Hair
|
4 |
+
Sunglasses
|
5 |
+
Upper-clothes
|
6 |
+
Skirt
|
7 |
+
Pants
|
8 |
+
Dress
|
9 |
+
Belt
|
10 |
+
Left-shoe
|
11 |
+
Right-leg
|
12 |
+
Face
|
13 |
+
Left-leg
|
14 |
+
Right-leg
|
15 |
+
Left-arm
|
16 |
+
Right-arm
|
17 |
+
Bag
|
18 |
+
Scarf
|