Upload 8 files
Browse files- app.py +3 -3
- labels.txt +18 -19
- person-1.jpg +0 -0
- person-2.jpg +0 -0
- person-3.jpg +0 -0
- person-4.jpg +0 -0
- person-5.jpg +0 -0
app.py
CHANGED
@@ -8,10 +8,10 @@ import tensorflow as tf
|
|
8 |
from transformers import SegformerFeatureExtractor, TFSegformerForSemanticSegmentation
|
9 |
|
10 |
feature_extractor = SegformerFeatureExtractor.from_pretrained(
|
11 |
-
"
|
12 |
)
|
13 |
model = TFSegformerForSemanticSegmentation.from_pretrained(
|
14 |
-
"
|
15 |
)
|
16 |
|
17 |
def ade_palette():
|
@@ -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=["
|
239 |
allow_flagging='never')
|
240 |
|
241 |
|
|
|
8 |
from transformers import SegformerFeatureExtractor, TFSegformerForSemanticSegmentation
|
9 |
|
10 |
feature_extractor = SegformerFeatureExtractor.from_pretrained(
|
11 |
+
"mattmdjaga/segformer_b2_clothes"
|
12 |
)
|
13 |
model = TFSegformerForSemanticSegmentation.from_pretrained(
|
14 |
+
"mattmdjaga/segformer_b2_clothes"
|
15 |
)
|
16 |
|
17 |
def ade_palette():
|
|
|
235 |
demo = gr.Interface(fn=sepia,
|
236 |
inputs=gr.Image(shape=(400, 600)),
|
237 |
outputs=['plot'],
|
238 |
+
examples=["person-1.jpg", "person-2.jpg", "person-3.jpg", "person-4.jpg", "person-5.jpg"],
|
239 |
allow_flagging='never')
|
240 |
|
241 |
|
labels.txt
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
bicycle
|
|
|
1 |
+
Background
|
2 |
+
Hat
|
3 |
+
Hair
|
4 |
+
Sunglasses
|
5 |
+
Upper-clothes
|
6 |
+
Skirt
|
7 |
+
Pants
|
8 |
+
Dress
|
9 |
+
Belt
|
10 |
+
Left-shoe
|
11 |
+
Right-shoe
|
12 |
+
Face
|
13 |
+
Left-leg
|
14 |
+
Right-leg
|
15 |
+
Left-arm
|
16 |
+
Right-arm
|
17 |
+
Bag
|
18 |
+
Scarf
|
|
person-1.jpg
ADDED
person-2.jpg
ADDED
person-3.jpg
ADDED
person-4.jpg
ADDED
person-5.jpg
ADDED