Spaces:
Running
on
Zero
Running
on
Zero
Update app_3.py
Browse files
app_3.py
CHANGED
@@ -498,7 +498,7 @@ def run_rmbg(image):
|
|
498 |
input_images = transform_image(image).unsqueeze(0).to("cuda")
|
499 |
# Prediction
|
500 |
with torch.no_grad():
|
501 |
-
preds =
|
502 |
pred = preds[0].squeeze()
|
503 |
pred_pil = transforms.ToPILImage()(pred)
|
504 |
mask = pred_pil.resize(image_size)
|
|
|
498 |
input_images = transform_image(image).unsqueeze(0).to("cuda")
|
499 |
# Prediction
|
500 |
with torch.no_grad():
|
501 |
+
preds = rmbg(input_images)[-1].sigmoid().cpu()
|
502 |
pred = preds[0].squeeze()
|
503 |
pred_pil = transforms.ToPILImage()(pred)
|
504 |
mask = pred_pil.resize(image_size)
|