{"slug": "show-hn-feynobg-automatic-background-removal-model-and-training-library", "title": "Show HN: FeyNoBg – Automatic background removal model and training library", "summary": "Feyn released FeyNoBg, an automatic background removal model, and open-sourced NoBg, a Python library for training and running such models. The model achieves the best published score on four of eight benchmarks and comes within 2% of the leader on the rest, using an interpretability-first approach that expanded the feature extractor's third stage from 18 to 24 blocks. Feyn's Shreyash announced the release on Hacker News, noting the model was trained on 26.1K diverse examples from 10 datasets.", "body_md": "Hey HN, I’m Shreyash from Feyn. We help companies build custom models from their data.\n\nToday, we’re releasing FeyNoBg, an automatic background removal model. Alongside it, we're open-sourcing NoBg, the Python library we built to train and run it.\n\nTry the model here: [https://huggingface.co/spaces/feyninc/feynobg](https://huggingface.co/spaces/feyninc/feynobg). Check out the library here: [https://github.com/feyninc/nobg](https://github.com/feyninc/nobg)\n\nSome sample outputs:\n\n(1) Soccer Freekick: [https://drive.google.com/file/d/1MZkAGLwbhNVOZ0Oi7XvpCfSEu9Q...](https://drive.google.com/file/d/1MZkAGLwbhNVOZ0Oi7XvpCfSEu9QPCbwj/view?usp=sharing)\n\n(2) Hair in wind: [https://drive.google.com/file/d/1Odc2m0XMVH9uZtvI_KjaRbXzhLL...](https://drive.google.com/file/d/1Odc2m0XMVH9uZtvI_KjaRbXzhLLdGK8Z/view?usp=sharing)\n\n(3) Bicycle with visible spokes: [https://drive.google.com/file/d/1h99ahjfrtS1MFQJJgiKE2fuM3HZ...](https://drive.google.com/file/d/1h99ahjfrtS1MFQJJgiKE2fuM3HZyQ-QJ/view?usp=sharing)\n\n(4) Live Demo video: [https://youtu.be/b1heHPvY8BM](https://youtu.be/b1heHPvY8BM)\n\nBackground removal separates an image's subject from its surrounding. We've all tried it at some point. Often it is to reuse the subject in a different artifact. Nowadays, it is common to make chat stickers out of it. It is one of the most common but under-appreciated uses of AI. It is also surprisingly complex. Models can be easily confused by camouflage, motion blur, or fine structures like hair.\n\nThe task requires two skills. First, a model has to identify the foreground. Second, it has to trace the foreground’s boundary and estimate an opacity value for each pixel. Generally, these skills are taught with different datasets. That creates a failure point. A poor training mix can improve one skill at the expense of the other. We saw this in our controlled evaluation. A training run with just the MaskFactory dataset improved on the CAMO benchmark but regressed on DIS5K.\n\nFor FeyNoBg, we took an interpretability-first approach to training. We first studied how BiRefNet’s stages contribute to finding the foreground and reconstructing its boundary. We discovered that the third stage of it's feature extractor holds a lot of information. Both localization and boundary reconstruction depend heavily on the feature map produced here.\n\nThis led us to expand this stage from 18 to 24 blocks while preserving the pre-trained weights. We then trained FeyNoBg on 26.1K diverse examples assembled from 10 datasets. The goal was to improve foreground identification and boundary precision without sacrificing either one.\n\nAcross eight benchmarks, FeyNoBg achieves the best published score on four and comes within 2% of the leader on the rest.\n\nBuilding FeyNoBg also exposed a tooling problem. Image matting models are usually released as isolated repositories with incompatible preprocessing, training, and evaluation code. We built NoBg to solve this. NoBg puts these workflows behind one Python interface. It supports BiRefNet today, with more architectures coming. We hope you build something exciting with it!\n\nHappy to answer any questions\n\nComments URL: [https://news.ycombinator.com/item?id=49072462](https://news.ycombinator.com/item?id=49072462)\n\nPoints: 2\n\n# Comments: 0", "url": "https://wpnews.pro/news/show-hn-feynobg-automatic-background-removal-model-and-training-library", "canonical_source": "https://usefeyn.com/blog/feynobg/", "published_at": "2026-07-27 16:59:08+00:00", "updated_at": "2026-07-27 17:22:57.722043+00:00", "lang": "en", "topics": ["computer-vision", "machine-learning", "ai-tools", "developer-tools"], "entities": ["Feyn", "FeyNoBg", "NoBg", "Shreyash", "BiRefNet", "Hugging Face", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/show-hn-feynobg-automatic-background-removal-model-and-training-library", "markdown": "https://wpnews.pro/news/show-hn-feynobg-automatic-background-removal-model-and-training-library.md", "text": "https://wpnews.pro/news/show-hn-feynobg-automatic-background-removal-model-and-training-library.txt", "jsonld": "https://wpnews.pro/news/show-hn-feynobg-automatic-background-removal-model-and-training-library.jsonld"}}