HHacker News Show HN·News bg-be-gone is an app I built initially with the goal of removing the background from my spouse's pictures in FFXIV, but then I really got interested in the ML side of this!That led me down the rabbit-hole of learning about BiRefNet and alternatives, and eventually I also stumbled into Facebook (now Meta's) segment-anything (SAM).I've been using this pretty heavily for background removal, but one thing that most freemium BG removal tools (or bucket-fill magic wand without some feathering/etc) is getting nice outlines of cartoons/anime.Using BiRefNet general, there's not really this issue!I then had to deal with the fact that BiRefNet tries to infer a subject in images. Normally. But there could be multiple.Well, they handle that, but they don't handle if you wanna crop out just one, or focus on something non-obvious.Then I remembered that my iPhone used to allow me to hold on an object in an image and it'd get a segment. Found out that uses their version of SAM. Implemented it myself.This thing's so awesome! There's so many things I built on top of it with Claude which allow me to give the model a hand! We ended up with a very nice experience where we can fix the model's mistakes and do some pretty amazing crops of subjects on very convoluted images.The thing is, this is not like touching up with the wand in PhotoShop. I use a brush, but it snaps to edges based on what the model infers, so the outlines DON'T LOOK LIKE SHIT!! It's amazing!Anyway. It also supports GIFs, WebP, batches, etc! I think it's pretty awesome and I'm happy and proud with it! I'd love if it helped anybody! Comments URL: https://news.ycombinator.com/item?id=50711166 Points: 1 # Comments: 0