Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -197,9 +197,10 @@ def app():
|
|
| 197 |
}
|
| 198 |
elif visual_prompt_type == "masks":
|
| 199 |
image, masks = mask_image["background"], mask_image["layers"][0]
|
| 200 |
-
image = image.convert("RGB")
|
| 201 |
-
masks = np.array(masks.convert("
|
| 202 |
masks = binary_fill_holes(masks).astype(np.uint8)
|
|
|
|
| 203 |
prompts = {
|
| 204 |
"masks": masks[None]
|
| 205 |
}
|
|
|
|
| 197 |
}
|
| 198 |
elif visual_prompt_type == "masks":
|
| 199 |
image, masks = mask_image["background"], mask_image["layers"][0]
|
| 200 |
+
# image = image.convert("RGB")
|
| 201 |
+
masks = np.array(masks.convert("L"))
|
| 202 |
masks = binary_fill_holes(masks).astype(np.uint8)
|
| 203 |
+
masks[masks > 0] = 1
|
| 204 |
prompts = {
|
| 205 |
"masks": masks[None]
|
| 206 |
}
|