ZhengPeng7 commited on
Commit
ab4b3fc
·
verified ·
1 Parent(s): eefba1b

Add fast-foreground-estimation in masking image.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -148,7 +148,7 @@ def predict(images, resolution, weights_file):
148
 
149
  # Show Results
150
  pred_pil = transforms.ToPILImage()(pred)
151
- image_masked = refine_foreground(image, pred_pil)
152
  image_masked.putalpha(pred_pil.resize(image.size))
153
 
154
  torch.cuda.empty_cache()
 
148
 
149
  # Show Results
150
  pred_pil = transforms.ToPILImage()(pred)
151
+ image_masked = refine_foreground(Image.fromarray(image), pred_pil)
152
  image_masked.putalpha(pred_pil.resize(image.size))
153
 
154
  torch.cuda.empty_cache()