Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def process_image(image_path, depth_map_path=None):
|
|
| 27 |
)
|
| 28 |
|
| 29 |
# Remove background to isolate the main subject
|
| 30 |
-
foreground = remove(image_raw)
|
| 31 |
foreground = Image.fromarray(np.array(foreground)).convert("RGB")
|
| 32 |
|
| 33 |
# Load or generate depth map
|
|
|
|
| 27 |
)
|
| 28 |
|
| 29 |
# Remove background to isolate the main subject
|
| 30 |
+
foreground = remove(image_raw, session=new_session("u2netp"))
|
| 31 |
foreground = Image.fromarray(np.array(foreground)).convert("RGB")
|
| 32 |
|
| 33 |
# Load or generate depth map
|