PramaLLC/BEN3
Machine LearningVision modelsOpen image and video background-removal model with weights and Python inference API.
What It Is
BEN3 (Background Erase Network) is an open image and video foreground-segmentation stack from Prama LLC. It generates candidate alpha masks from a DINOv3 ViT-B/16 encoder and a DPT-style decoder, then uses a learned score head to pick one result. The repository ships the hypothesis generator: model weights, inference code, and support for single-image, batched-image, and video runs.
It fits editing/compositing pipelines, e-commerce product imagery, creative tools, and computer-vision workflows that need alpha mattes and transparent video.
Open Model vs. Commercial Model
The public release is described as the BEN3 generator only. The company's full commercial model adds a proprietary second-stage multi-hypothesis fusion network for boundary refinement and fine-structure recovery; that fusion network is not in this repository. Benchmark numbers in the README refer to the MHFNet research framework, not to the standalone generator released here MHFNet paper. The open model's own output quality should be evaluated directly.
Quick Start
Requirements: Python, a working PyTorch environment, and a CUDA device for the default cuda path. Install from the repository:
pip install git+https://github.com/PramaLLC/BEN3.git
Then load weights from the Hugging Face repository and run inference:
from PIL import Image
from ben3 import BEN3
model = BEN3.from_pretrained("PramaLLC/BEN3", device="cuda")
foreground, mask = model.inference(Image.open("input.jpg"))
foreground.save("foreground.png")
mask.save("mask.png")
The output is an RGBA foreground and an 8-bit alpha mask. The README also documents a local-weights form, BEN3("ben3.pth", device="cuda"), for a cloned or downloaded model repository with requirements.txt installed; the release page or weight repository supplies ben3.pth.
Images and Video
Batched image inference accepts a list of PIL images and returns lists of foregrounds and masks. Video inference batches frames and writes either a transparent VP9 WebM or a composited MP4:
model.segment_video("input.mp4", output_path="foreground.webm", batch=8, webm=True, add_audio=True)
model.segment_video("input.mp4", output_path="foreground.mp4", batch=8, rgb_value=(255, 255, 255))
Transparent WebM output and audio muxing require ffmpeg and ffprobe installed on the system.
Constraints
- Default inference size is 1024×1024; encoder state is read from
ben3.pthrather than downloaded separately from Meta. - The training set of roughly 38,000 images is proprietary and not released, so the open weights cannot be retrained from the published data.
- The MIT license covers the implementation and released generator, subject to third-party terms; no license file was declared in the repository metadata.
- Hosted API, on-device licensing, and enterprise access are commercial services routed through backgrounderase.com, with separate sales inquiry for self-hosting.
HotRepo's take
BEN3 entered HotRepo's new-project Python list on 2026-12-03 with 14 stars added over a roughly 6.5-hour window that ended at 08:46 UTC, reaching 114 stars and 5 forks. That is an early, short observation window, enough to note attention around a model release but not a sustained trend. The project's own framing sets the open generator apart from the stronger commercial fusion pipeline, and the README's benchmark table is explicitly tied to MHFNet rather than this release, so readers comparing scores should treat the public package as a component rather than a drop-in equal of the commercial model.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- MiniMax-AI/MiniMax-H3-ImageOpen-weights 16-megapixel image generation and editing model with a 33.1B DiT and 6-step sampling.
- speridlabs/idol-sdkTurns a single object image into a standard 3D Gaussian splat on consumer GPUs, for 3D artists, researchers and developers.
- Tencent/WeMM-VideoA family of open omni-modal video models that jointly understand frames, audio, images, and text for multimodal reasoning.
- ubc-vision/solv3rA pretrained multi-view 3D reconstruction model that solves camera poses and point maps from image or video sequences.
- yyfz/Pi4Reconstructs 4D scene geometry and camera motion from images or video in a single forward pass, for graphics and vision researchers.