Spaces:
Running
Running
yizhangliu
commited on
Commit
•
bfaf327
1
Parent(s):
809a8a0
Update app.py
Browse files
app.py
CHANGED
@@ -165,6 +165,7 @@ def model_process(image, mask):
|
|
165 |
print(f"Resized image shape: {image.shape} / {type(image)}")
|
166 |
|
167 |
#mask, _ = load_img(input["mask"].read(), gray=True)
|
|
|
168 |
mask = resize_max_size(mask, size_limit=size_limit, interpolation=interpolation)
|
169 |
print(f"mask image shape: {mask.shape} / {type(mask)}")
|
170 |
|
|
|
165 |
print(f"Resized image shape: {image.shape} / {type(image)}")
|
166 |
|
167 |
#mask, _ = load_img(input["mask"].read(), gray=True)
|
168 |
+
mask = np.array(Image.fromarray(mask).convert("L"))
|
169 |
mask = resize_max_size(mask, size_limit=size_limit, interpolation=interpolation)
|
170 |
print(f"mask image shape: {mask.shape} / {type(mask)}")
|
171 |
|