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

Add fast-foreground-estimation in masking image.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -149,7 +149,7 @@ def predict(images, resolution, weights_file):
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()
155
 
 
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.fromarray(image).size))
153
 
154
  torch.cuda.empty_cache()
155