Skip to main content

bgeraser

Remove image backgrounds in one click — free, offline, unlimited.

A free alternative to remove.bg that runs on your own computer. No uploads. No watermark. No sign-up. No per-image fees.

PyPI Python License: MIT Tests

bgeraser web UI

Real results, straight out of bgeraser:

Before and after examples


Why bgeraser?

Online background removers make you upload your photos to their servers, add watermarks, limit you to a few free images, or charge per download. remove.bg's website is shutting down on 1 December 2026.

bgeraser does the same job on your own computer:

Online tools bgeraser
Price Free trial, then pay per image Free, forever
Watermark Often on free tier Never
Limits 1–50 images/month free Unlimited
Privacy Your photos go to their server Nothing leaves your PC
Batch Paid feature One command for a whole folder
Works offline No Yes (after first setup)

Get started in 3 steps

You need Python 3.9 or newer. Don't have it? Get it from python.org/downloads and tick "Add Python to PATH" during install.

Step 1 — Install (open Command Prompt / Terminal and run):

pip install "bgeraser[web]"

Step 2 — Start the app:

bgeraser serve

The first run downloads the AI model (about 170 MB, one time). Wait for model ready.

Step 3 — Open your browser at http://127.0.0.1:5000

Drop a photo, paste one with Ctrl+V, or click a sample. Drag the slider to compare, pick a background, download the PNG. Done.

Keep the Command Prompt window open while you use the app. Press Ctrl+C in it to stop.

What you can do

  • Transparent PNG — the default, ready for design work
  • Solid background — white, black, green screen, or any color you pick (product listings, ID photos, thumbnails)
  • Before / after slider — check the result before you download
  • Fine edges mode — extra care for hair and fur
  • Mask export — --mask saves a grayscale layer mask so you can fix a cut-out by hand in GIMP, Photoshop or Krita. The PNG keeps every original pixel under the transparency, so nothing is ever lost.
  • Batch a whole folder — one command, hundreds of images
  • Use it from Python — a two-line API for your own scripts

Command line

bgeraser photo.jpg                       # → photo-nobg.png next to the original
bgeraser photo.jpg -o clean.png          # choose the output name
bgeraser photo.jpg --bg white            # solid background instead of transparent
bgeraser photo.jpg --bg "#00ff00"        # any hex color
bgeraser ./products                      # every image in a folder → ./products/nobg/
bgeraser ./products -o ./out --recursive # include sub-folders
bgeraser photo.jpg --mask                # also save photo-mask.png (layer mask for GIMP / Photoshop)
bgeraser photo.jpg --matting             # finer edges for hair / fur (slower)
bgeraser --model u2netp ./products       # fastest model for big batches
bgeraser models                          # list available models
bgeraser serve --port 8080               # web app on another port

Python

from bgeraser import remove_background, remove_background_bytes, process_folder, get_mask

remove_background("photo.jpg")                                  # → photo-nobg.png
remove_background("photo.jpg", "out.png", bg_color="white")     # flatten onto white
png_bytes = remove_background_bytes(open("photo.jpg", "rb").read())
process_folder("./products", "./products/out")                  # batch
mask = get_mask(Image.open("photo.jpg"))                        # grayscale mask (PIL "L")

How it works

  1. An open-source segmentation model (ISNet / U²-Net, via rembg) finds the subject.
  2. bgeraser cleans the mask: the subject is made fully solid (no see-through arms or legs), stray fragments are removed, holes are filled, and the outline keeps a soft, natural edge.
  3. The result is saved as a PNG with transparency, or flattened onto the color you chose.

Everything runs locally on the CPU. A typical photo takes 1–3 seconds.

Models

Model Best for Size
isnet-general-use (default) Cleanest edges — people, products, animals, cars 170 MB
u2net General purpose 170 MB
u2netp Fastest, for big batches 4 MB
u2net_human_seg Portraits 170 MB
isnet-anime Anime and illustrations 170 MB
u2net_cloth_seg Clothing segmentation 170 MB
silueta u2net quality, smaller 43 MB

Pick one with --model NAME or from the dropdown in the web app. Models download the first time you use them.

Tips for the best result

  • Works best on photos with one clear subject — a person, product, pet, car or logo.
  • Anything the subject is resting on (a table, a blanket) may be kept, because the AI treats it as part of the subject. Shoot on a plain floor or backdrop for a fully clean cut-out.
  • Hair, fur and glass are the hardest cases. Try Fine edges (or --matting) on those.
  • Results look "damaged"? Make sure you're on the default model, not u2netp.

FAQ

Is it really free? Yes. MIT licensed, no accounts, no limits.

Does it upload my photos anywhere? No. The model runs on your machine. You can unplug the internet after the first setup.

Does it need a GPU? No. It runs on any normal laptop CPU.

Windows / Mac / Linux? All three, anywhere Python runs.

Can I use it from my phone? Run bgeraser serve --host 0.0.0.0 on your PC, then open http://<your PC's IP>:5000 from a phone on the same Wi-Fi.

Contributing

Issues and pull requests are welcome. To work on it:

git clone https://github.com/guesttavrej/bgeraser
cd bgeraser
pip install -e ".[dev]"
pytest

License

MIT © Tavrej / Yonzon Studio. Built on rembg, ISNet and U²-Net.

Metadata

Release files for bgeraser 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bgeraser 0.4.0
File Size Uploaded
bgeraser-0.4.0.tar.gz 1.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for bgeraser 0.4.0
File Interpreter ABI Platform
bgeraser-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.3 MB

Release files / bgeraser-0.4.0.tar.gz

Download URL bgeraser-0.4.0.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
71770a1542b874936bd87e342149a054c985fca4c33b84a4732e1496bc6faacc
BLAKE2b-256 checksum
How to use checksums
bda8f1d14f2fd5447c9f5df5fad2f8afec20d3e276035004514efdd217264897
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / bgeraser-0.4.0-py3-none-any.whl

Download URL bgeraser-0.4.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
00bdd52756f9b05e9f9b008a94e7a90b9307eefccde7ea21795e6c25d1ca1de8
BLAKE2b-256 checksum
How to use checksums
74eb69d7ec00afa0454a3d0bba06682b47f6eb6f33530e72897a556ea9b021d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page