FeyNoBg: High-Precision Background Removal
Removing backgrounds from images is deceptively hard—most models fall apart the second they hit motion blur, camouflage, or fine details like stray hairs. FeyNoBg handles these edge cases much better than typical tools because it optimizes both foreground identification and boundary precision simultaneously, rather than trading one for the other.
The technical win here is an "interpretability-first" training approach. The developers analyzed BiRefNet and found that the third stage of the feature extractor is the heavy lifter for both localization and boundary reconstruction. By expanding that specific stage from 18 to 24 blocks (while keeping pre-trained weights), they managed to hit top-tier scores across eight different benchmarks.
For those of us who actually build with these models, the most useful part is the NoBg Python library. Usually, image matting repos are a mess of incompatible preprocessing and evaluation scripts. NoBg wraps these workflows into a single interface.
If you want to integrate this into an AI workflow or a custom app, here is the basic setup for the library:
pip install nobg
The library currently supports BiRefNet, making it a practical tutorial in itself for anyone wanting to move from basic background removal to professional-grade matting. You can test the model's performance on complex textures (like bicycle spokes or wind-blown hair) via their Hugging Face space.
Specific project links for a deep dive:
Model Demo: https://huggingface.co/spaces/feyninc/feynobg
Library Source: https://github.com/feyninc/nobg
It's a solid example of how tweaking specific architectural blocks based on feature map analysis can yield better real-world results than just throwing more generic data at a model.
All Replies (7)
Finally found this! Segment Anything is such a headache lately, does this actually save time?
Stunning progress. Is this finally reaching the same utility level as STT for production workflows?
Still seeing jagged edges on my exports. Is the subscription actually worth it for fine details?
Love this! Can these workflows actually run on mobile? I'd love to try porting this to Android.
I'm curious about your training dataset. Which specific mixes did you use for the controlled eval?
Frustrated by the CC-BY-NC-4.0 license. Why restrict commercial use on a derivative of an MIT model?
Impressive results! How does it process 1920x2880 images without artifacts if the limit is 1024x1024?