Sulat.com / Writing on AIThursday, December 3, 2026
Enter →
Artificial Intelligence/3 December 2026

Running the BEN3 background remover locally

Cocktail Peanut's Pinokio launcher runs Prama's BEN3 background remover on your own machine. I installed it on a plain CPU and checked what the free download includes.

3D eraser rubbing a street photo off a black bicycle, with three floating mask outlines and a green tick on one
Illustration: Sulat

At a glance

  • BEN3 draws three candidate masks per photo and keeps the one its own scorer rates highest.
  • The free MIT download is the three-mask generator. The fusion network behind the headline benchmark isn't in it, and the model card publishes no benchmark numbers for the generator itself.
  • On a four-core CPU with no GPU, each 1280-pixel photo took about eight seconds and peaked near 2.7 GB of memory.
  • On four of five test photos the three masks overlapped by 99%. The bicycle split them most, at 93% to 97%.
  • A plain pip install pulled transformers 5.25.1 and failed to load the checkpoint. The Pinokio launcher pins transformers 4.57.6 and one BEN3 commit.

BEN3 is a background remover from Prama LLC that draws three candidate masks for every photo and keeps the one its own scorer rates highest. Cocktail Peanut, the developer behind Pinokio, wrapped it in a web interface. I installed the model and that interface, ran them on a plain four-core CPU, and pulled the three masks apart to see what they do.

His launcher installs the public BEN3 checkpoint and serves a local page where you drop in images or video and get transparent cutouts back. Everything runs on the machine hosting it. His post puts the floor at 4GB of VRAM and says it works on Mac, Linux and Windows. I don’t have a GPU here, so I can’t confirm the VRAM figure.

Cocktail Peanut’s post introducing the launcher.

What BEN3 is

BEN3 comes from Prama LLC, the company behind the BackgroundErase service, and follows its BEN and BEN2 models. The open model pairs a DINOv3 ViT-B/16 encoder with a DPT-style decoder to produce three masks at once. A small quality head then scores them and the highest score wins. The model card says it was trained on roughly 38,000 proprietary images, and the checkpoint is a 465 MB file. The multi-hypothesis idea comes from S3OD, a salient object detection paper that the card credits.

Hand-drawn flow: one photo, three masks, a scorer rates each, the top score wins
BEN3 draws three masks and keeps the one its scorer likes best. Illustration: Sulat

What the free download leaves out

The model card describes two versions. The open one is the three-mask generator, MIT licensed, with image and video inference. The full commercial model adds a fusion network that reads the image and all three masks together and refines the edges. It’s only available through the BackgroundErase web demo, its API or an on-device licence, and the card says the fusion network isn’t in the public release.

Two columns: the MIT download has three masks and a scorer, the fusion network and paid API are not in it
The fusion network behind the headline benchmark isn’t in the free download. Illustration: Sulat

That affects the benchmark table on the card. Prama’s paper on the fusion approach, MHFNet, reports a weighted F-measure of 0.9054 against 0.8915 for picking a single mask from the same generator on the 2,000-image DIS-TE set, and the table ranks it first against nine other methods. The card states that those results belong to the research framework, not to the generator in the download. The card publishes no benchmark numbers for the generator itself.

The card also says the MIT licence is subject to applicable third-party terms, and the checkpoint contains Meta’s DINOv3 encoder weights, so read Meta’s DINOv3 licence before putting it in a product.

What I ran it on

PartSpec
CPUIntel Xeon at 2.30 GHz, 4 vCPUs
Memory15 GB
GPUNone
Storage252 GB disk
OSLinux, kernel 6.18
SoftwarePython 3.13, PyTorch 2.15 (CPU build)
The test machine.

I didn’t use Pinokio itself. I installed the same pinned packages its launcher uses, downloaded the same checkpoint revision, and ran the launcher’s web app from its repository on that machine.

The first install didn’t work. A plain pip install of the BEN3 package from GitHub pulled in the newest transformers release, 5.25.1, and loading the checkpoint failed with missing keys: the model expected weights named encoder.model.layer and the file holds encoder.layer. The Pinokio launcher pins transformers 4.57.6 and one specific BEN3 commit. With those two pins the model loaded in a second and a half. I changed both at once, so I can’t say which one was the cause. If you install BEN3 outside Pinokio, use the pins.

Code
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install "transformers==4.57.6" "git+https://github.com/PramaLLC/BEN3.git@852e1a702beec9ab1d2fed2f09c9e36899f14c4e"
Code
from PIL import Image
from ben3 import BEN3

model = BEN3.from_pretrained("PramaLLC/BEN3", device="cpu")
foreground, mask = model.inference(Image.open("bike.jpg").convert("RGB"))
foreground.save("bike_cutout.png")
mask.save("bike_mask.png")

What came out

I ran five photos: a bicycle with spokes and a wire basket, two pugs wrapped in blankets, a black puppy on dark wood and a woman holding flowers. Each took 7.9 to 8.9 seconds on the four CPU cores once the model was loaded, and the whole Python process peaked at about 2.7 GB of memory. The model card lists 1024 by 1024 as the default inference size, and the times barely moved between photos.

Five rows of original photo, transparent cutout and mask: a bicycle, two pugs in blankets, a black puppy and a woman with flowers
Original, cutout and mask for each photo, all run on a CPU. Bicycle: 齐健, CC BY 2.0, via Wikimedia Commons. Pugs: Matthew Wiebe. Puppy: André Spieker. Portrait: Alexander Shustov. The last four are from Unsplash.

The bicycle is the hard case and it held. The spokes, the basket mesh and the chain guard all survived, and the street behind them went. The blanket fringe on the first pug came through too. Those are my judgements from the cutouts at sheet size, not a measured edge score.

BEN3 web UI compare view: a bicycle photo on the left and its transparent cutout on the right, queue marked completed
The web UI running on my test machine, comparing the original bicycle photo with BEN3’s cutout.

The web UI puts a queue on the right and a compare slider on the left, with original, cutout and mask tabs, a checkerboard, white or black backdrop, and export as a cutout PNG or a mask PNG. I dropped the bicycle photo into it with the default settings and the job finished on the CPU. The launcher’s README also documents a local HTTP API for jobs, which I didn’t test.

The three masks

The part of the pitch I could check directly is the three candidates. In the code, the model returns three masks and a score for each, and the output is the one with the highest score. I called the model underneath the helper to read all three masks and their scores for the five photos. Thresholded at 0.5, the three masks overlapped by 99% on the two pugs, the puppy and the portrait. On the bicycle they overlapped by 93% to 97%.

Two stat cards: 99% mask overlap on four photos, 93% on the bicycle with spokes
On four of five photos the three masks were nearly identical. The bicycle split them most. Illustration: Sulat

The scorer’s picks varied. The first mask won on the bicycle, the pug on the bed and the portrait, and the third won on the pug in the garden and the puppy. On the garden pug the margin was 1.649 to 1.633, so it was close. For ordinary photos the best-of-three step changes very little, and it only has room to matter on busy, fine-edged ones like the bicycle. I didn’t score the masks against hand-drawn ground truth, so I can’t say whether the scorer picks the more accurate mask.

Video

BEN3 also does video. I made a two-second, 640 by 426 clip with a slow zoom on the bicycle photo and ran it with the library’s video call set to transparent WebM at a batch size of four.

Code
model.segment_video("clip.mp4", output_path="clip_fg.webm", batch=4, webm=True, add_audio=False)

It processed all 48 frames in 342 seconds, about seven seconds a frame on this CPU, and wrote a VP9 WebM. I decoded a frame to check, and about two thirds of its pixels were transparent. That’s a synthetic clip, not real footage, so read it as a speed figure and not a quality test. At that rate a ten-second clip at 24 frames a second would take about half an hour on this CPU.

Where it sits

Background removal already has well-known open options. BiRefNet is MIT licensed, and Bria’s RMBG-2.0 ships under Bria’s own licence, with commercial use needing an agreement with Bria. BEN2 is MIT too. That puts BEN3 in the same licence camp as BiRefNet and BEN2, with a paid tier layered on top. In my view the free generator doubles as the shop window for the paid model. I didn’t run those models next to BEN3, so I can’t say which cuts cleaner.

What I couldn’t test

I couldn’t test the 4GB VRAM claim or GPU speed, since this machine has no GPU. I didn’t run the full commercial model, so I can’t compare the open generator with it. I ran no head-to-head against BiRefNet or RMBG-2.0, and the video test used one synthetic clip. I also didn’t try the Mac or Windows installs.

Worth running

For a quick local cutout tool, yes. It installs from pinned packages, loads in seconds and took about eight seconds a photo on a CPU, spoked bicycle wheel included. Prama says its full model has enhanced segmentation quality, boundary refinement and fine-detail preservation, and the download doesn’t include that stage.