BEN2
PramaLLC/BEN2
published Jan 2025 · updated Dec 2025
BEN2 is a foreground segmentation model that uses a Confidence Guided Matting pipeline for precise background removal and matting.
specs
| Task | Foreground Segmentation / Background Removal |
| Architecture | Confidence Guided Matting (CGM) pipeline with base and refiner networks |
| Training Data | DIS5K and proprietary 22K segmentation dataset |
about this model
BEN2 is a foreground segmentation model that removes backgrounds from images and video using a Confidence Guided Matting (CGM) pipeline. The architecture consists of a base segmentation network followed by a refiner that processes only pixels where the base model exhibits low confidence, enabling precise matting of hair, transparent objects, and fine edges.
Key capabilities
- High-resolution processing up to 4K with accurate edge refinement
- Video segmentation with alpha-channel output (webm or mp4)
- Batch image inference with optimized decoding for consumer GPUs
The model was trained on the DIS5K dataset (5,470 high-resolution images with pixel-accurate masks) and a proprietary 22K segmentation dataset. According to the associated paper (arXiv 2501.06230), BEN achieves substantial improvements over prior state-of-the-art methods including MVANet and DiffDIS on the DIS5K validation dataset, establishing new state-of-the-art accuracy for dichotomous image segmentation.
Evaluation
— RMBG 2.0 did not preserve the DIS5K validation dataset.



For video segmentation, see the demo at BEN2 Video Segmentation.
best for
- ·Background removal for e-commerce product photos
- ·Hair matting and fine edge refinement
- ·4K resolution foreground extraction
- ·Video background segmentation
FAQ
BEN2 excels at foreground segmentation and background removal, especially for hair matting, 4K processing, object segmentation, and edge refinement.
It first runs a base model for initial segmentation, then uses a confidence trimap to identify low-confidence pixels, which are refined by a dedicated refiner network for higher precision.
Input is a single image or batch of images (PIL or numpy). Output is a foreground image with transparent background (alpha channel).
Use the gigarouter OpenAI-compatible endpoint with your API key, sending an image and receiving the foreground mask.
The base model is open source; a commercial model with enhanced performance is available via [email protected].
We're benchmarking and onboarding BEN2 as a hosted, OpenAI-compatible API. Sign in for free credit and be ready when it lands, or tell us you want it and we'll prioritize it.