BEN3 / examples /image.py
MaxwellMeyer's picture
Upload 8 files
8fcb663 verified
Raw History Blame Contribute Delete
201 Bytes
from PIL import Image
from ben3 import BEN3
model = BEN3("ben3.pth", device="cuda")
foreground, mask = model.inference(Image.open("input.jpg"))
foreground.save("foreground.png")
mask.save("mask.png")