Back Home

開源模型與電腦視覺

FeyNoBg Deepens BiRefNet’s Middle Stage, Using Mixed Data to Balance Foreground Recognition and Boundary Detail

Feyn has released the 263-million-parameter FeyNoBg model and the NoBg training library, providing a unified interface for background removal, batch inference, and fine-tuning. Official comparisons show the model leading in S-measure on four of eight datasets, but omit deployment metrics such as speed, memory usage, and alpha-matte error.

Pra1998 · Public domain · Image source
zh-Hant

On July 27, Feyn released FeyNoBg, an automatic background removal model, along with NoBg, an open-source Python library for training, inference, and model reparameterization. The task is not merely binary segmentation: the system must first identify the complete foreground, then predict transparency along boundaries such as hair, fur, thin lines, and motion blur. When trained with an imbalanced data recipe, these two capabilities often come at each other’s expense.

The model is based on BiRefNet, retaining its dual-path design for localization and boundary reconstruction. It deepens the third stage of the feature extractor from 18 blocks to 24, increasing the parameter count from 222 million to 263 million. The team reused all pretrained weights with compatible shapes and initialized only the added blocks, aiming to reduce the risk of forgetting existing capabilities while expanding model capacity.

The data recipe is another major change. An early version used only synthetic mask data from MaskFactory. Although this improved performance on CAMO, it caused results on DIS5K to regress. The final version instead uses approximately 26,100 images from ten sources, covering camouflage, crowded scenes, high-resolution portraits, and anime, with each source capped at 4,000 images. Both segmentation masks and alpha mattes were converted into a consistent binary training target. According to the official results, FeyNoBg achieved the highest published S-measure on four of eight benchmarks, with gaps of no more than 2% on the remaining four.

NoBg packages model loading, image processing, batch and BF16 inference, fine-tuning with Hugging Face Trainer, and model uploads behind a consistent interface. The library is licensed under Apache-2.0, while the model card lists the model under the MIT License. However, S-measure primarily evaluates structure and shape and cannot fully represent the visual quality of semitransparent edges. The comparison table also omits end-to-end latency, GPU memory usage, temporal consistency for video, and statistical significance for each dataset. Engineering teams should next evaluate alpha error, fine-boundary failure rates, throughput, and license compatibility on their own image distributions before deciding whether to replace an existing matting pipeline.

Sources

  1. FeyNoBg: A SOTA Model For Background Removal
  2. feyninc/nobg: a library for image and video matting