AB
AiBoss
project

BEN2 - A deep learning model for automatically removing backgrounds from images and videos.

BEN2 (Background Erase Network 2) is a deep learning model developed by Prama LLC, specifically designed for quickly removing backgrounds and extracting foregrounds from images and videos. It is based on an innovative confidence-guided matting (CGM) pipeline...

What is BEN2?

BEN2 (Background Erase Network 2) is a deep learning model developed by Prama LLC, specifically designed for quickly removing backgrounds and extracting foregrounds from images and videos. Based on an innovative confidence-guided matting (CGM) pipeline, it uses a refined network to process complex regions such as hair and edges, achieving high-precision foreground segmentation. Trained on large-scale datasets, BEN2 excels at processing high-resolution images (such as 4K), supports GPU acceleration, and boasts extremely fast processing speeds: only 6 seconds for 1080p images and approximately 20 seconds for 4K images.

Main functions of BEN2

  • Background Removal and Foreground SegmentationBEN2 can automatically remove backgrounds from images and videos to generate high-quality foreground images. Through an innovative confidence-guided matting (CGM) pipeline, it can perform high-precision segmentation of images with complex backgrounds and rich details (such as hair, edges, etc.).
  • High-resolution processingBEN2 supports 4K image processing, ensuring high-resolution image segmentation results, and is suitable for applications requiring high-precision and high-quality image processing.
  • Edge refinementIt improves segmentation accuracy by refining the edge processing of the network, and is suitable for images that require fine edge processing, such as product photos and portraits.
  • Video SegmentationBEN2 can extract the foreground from each frame of a video, making it suitable for dynamic video editing.
  • Simple API and ease of useIt provides a concise API, making it easy to integrate into various applications.
  • Batch Image ProcessingSuitable for scenarios that require efficient processing of multiple images.

BEN2's technical principles

  • Confidence-guided matting (CGM)The base model first performs preliminary image segmentation, generating an initial foreground mask. A confidence map is used to evaluate the segmentation confidence of each pixel. For pixels with low confidence, a refinement network further processes them to improve segmentation accuracy.
  • Refined NetworkRefined networks focus on processing complex edge regions, such as the edges of hair strands and transparent objects. Through multi-scale feature fusion and contextual information, refined networks can generate more natural and accurate edges.
  • Deep learning architectureBEN2 was trained on the DIS5k and Prama LLC's 22K proprietary segmentation datasets, enabling it to adapt to a variety of complex backgrounds and lighting conditions. The model employs an efficient encoder-decoder architecture, combined with multi-scale feature extraction, to ensure efficient processing on high-resolution images such as 4K.
  • GPU acceleration and CUDA supportBEN2 supports CUDA and GPU acceleration, which can improve processing speed. Officially deployed instances can complete the background removal of 1080p images in 6 seconds, and the processing time for 4K images is approximately 20 seconds.

BEN2 project address

Application scenarios of BEN2

  • Image processing: Suitable for precise foreground segmentation in complex backgrounds and hair-like areas.
  • Video SegmentationExtract the foreground from each frame of a video; suitable for dynamic video editing.
  • Batch Image ProcessingSuitable for scenarios that require efficient processing of multiple images.
  • High-precision segmentationIt provides precise edge processing and is widely used in professional image compositing, film and television post-production and other fields.