Spaces:
Running
Running
yizhangliu
commited on
Commit
·
50e8fd2
1
Parent(s):
4b39dfc
Update app.py
Browse files
app.py
CHANGED
@@ -128,11 +128,13 @@ def model_process(image, mask):
|
|
128 |
# origin_image_bytes = input["image"].read()
|
129 |
|
130 |
print(f'liuyz_2_here_')
|
|
|
131 |
image_pil = Image.fromarray(image)
|
132 |
mask_pil = Image.fromarray(mask).convert("L")
|
133 |
-
print(f'image_pil_ = {image_pil
|
134 |
-
print(f'mask_pil_ = {mask_pil
|
135 |
-
mask_pil.save(f'./mask_pil.png')
|
|
|
136 |
|
137 |
image, alpha_channel = load_img(image)
|
138 |
# Origin image shape: (512, 512, 3)
|
|
|
128 |
# origin_image_bytes = input["image"].read()
|
129 |
|
130 |
print(f'liuyz_2_here_')
|
131 |
+
|
132 |
image_pil = Image.fromarray(image)
|
133 |
mask_pil = Image.fromarray(mask).convert("L")
|
134 |
+
print(f'image_pil_ = {type(image_pil)}')
|
135 |
+
print(f'mask_pil_ = {type(mask_pil)}')
|
136 |
+
mask_pil.save(f'./mask_pil.png')
|
137 |
+
|
138 |
|
139 |
image, alpha_channel = load_img(image)
|
140 |
# Origin image shape: (512, 512, 3)
|