Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from PIL import Image, ImageOps
|
|
6 |
segformer_b2_clothes_pipe = pipeline("image-segmentation", model="mattmdjaga/segformer_b2_clothes")
|
7 |
|
8 |
def segformer_b2_clothes(img):
|
9 |
-
result =
|
10 |
mask = result[0]['mask'].convert('L')
|
11 |
mask = ImageOps.invert(mask)
|
12 |
img.putalpha(mask)
|
|
|
6 |
segformer_b2_clothes_pipe = pipeline("image-segmentation", model="mattmdjaga/segformer_b2_clothes")
|
7 |
|
8 |
def segformer_b2_clothes(img):
|
9 |
+
result = segformer_b2_clothes_pipe(img)
|
10 |
mask = result[0]['mask'].convert('L')
|
11 |
mask = ImageOps.invert(mask)
|
12 |
img.putalpha(mask)
|