Spaces:
Runtime error
Runtime error
Add fast-foreground-estimation in masking image.
Browse files147 unmodified lines148149150151152153154147 unmodified lines# Show Resultspred_pil = transforms.ToPILImage()(pred)image_masked = refine_foreground(image, pred_pil)image_masked.putalpha(pred_pil.resize(image.size))torch.cuda.empty_cache()147 unmodified lines148149150151152153154147 unmodified lines# Show Resultspred_pil = transforms.ToPILImage()(pred)image_masked = refine_foreground(Image.fromarray(image), pred_pil)image_masked.putalpha(pred_pil.resize(image.size))torch.cuda.empty_cache()
app.py+1-1