r/GIMP • • 4d ago

What if removing a background was actually this simple? 👀

Post image
0 Upvotes

17 comments sorted by

7

u/stilgarpl 4d ago

Why is it posted here, if it's not integrated with GIMP? I thought this was a plugin, but it's just a commandline tool, practially identical to rembg and other similar tool.

-4

u/MaverickTavrej 4d ago

Fair, and sorry wrong sub for it as-is. It is built on rembg (credited in the README); what I added on top is a mask-cleanup step so subjects never come out half-transparent, a local drag-and-drop web UI with a before/after slider and background presets, and batch/folder mode. Not a GIMP plugin yet, but a couple of people here asked, so I've opened an issue for a GIMP 3 Python-Fu version. Will post back here if/when that exists.

1

u/stilgarpl 4d ago

mask-cleanup step so subjects never come out half-transparent,

Oh, that is great. That was the most annoying thing about using rembg. How your app handles removed background? Rembg just erased it, when I would prefer if it only applied transparent alpha to it - in case it removed something that it shouldn't so I can quickly fix it in GIMP.

2

u/MaverickTavrej 4d ago

It does exactly that...bgeraser only writes the alpha channel, the RGB pixels underneath are untouched. So if it clips something it shouldn't, open the PNG in GIMP, paint on the layer mask / alpha and the original comes straight back. No re-run needed.

I'm also adding a --mask flag to save the mask as a separate grayscale PNG, so you can drop it in as a layer mask directly. That plus a GIMP plugin are the two things this thread has convinced me to do next.

1

u/stilgarpl 4d ago

Great, I'll use it instead of rembg then. You have my upvote.

3

u/SeeMonkeyDoMonkey 4d ago

u/MaverickTavrej Are you going to make it into a GIMP plugin?

3

u/GobiPLX 4d ago

Get out your AI slop

1

u/stilgarpl 4d ago

This is not AI slop, segmentation models are totally different thing than generative models.

4

u/fx-12 4d ago

Every AI Background remover will always sent your picture to a server, edit it and sent it back.

They will keep your data.

1

u/stilgarpl 4d ago

There are plenty of local background removal models. You can run them offline.

1

u/fx-12 4d ago

Tell me 3 that work as good as the ai ones.

1

u/stilgarpl 4d ago

Tell me 3 that work as good as the ai ones.

I don't understand your question and I think you don't understand it either.

You wrote "as good as ai". Local models are not AI and online models are?

SAM and SAM2 models work quite well. I really like YOLO models, when I want to cut specific things (like a person).

I also used Flux 2 Klein ImageEdit to remove background, even though it's technically not background removal model, but it works very well.

1

u/Zdrobot 4d ago

Which model does it download on the fist start?

2

u/Zdrobot 4d ago

I have no idea why OP's comment was deleted.

Either his entire post about a piece of software that uses Neural Networks to do image processing is not OK, in which case it should be removed; or him mentioning the models this software uses should be OK too.