Repolode
opencoredev

opencoredev/bg0

Open-source background remover that runs entirely in the browser using WebGPU or WebAssembly, with no uploads.

Open-source alternative to:Remove.bg

Stars
392
Forks
43
Open issues
0
Last commit
20 days ago

What is it?

BG0 removes image backgrounds and exports a transparent PNG. Inference runs locally in the browser: it uses WebGPU when the device supports it and falls back to WebAssembly otherwise. The source image is not uploaded to a server.

The browser downloads a pinned BiRefNet ONNX model suited to the available hardware and caches it locally. There is no account, API key, or usage limit. A reusable package, @bg0/browser, handles capability detection, model loading, preprocessing, mask postprocessing, and alpha compositing, so other web applications can add the same private flow.

The repository is a Bun monorepo containing the web app, a documentation site, and the browser package, with an architecture document describing the data flow.

Key features

  • 01Runs background removal locally in the browser with no server inference.
  • 02Uses WebGPU when available and falls back to WebAssembly.
  • 03Outputs a transparent PNG.
  • 04Caches the pinned BiRefNet ONNX model in the browser.
  • 05Provides the @bg0/browser package with a removeBackground API and progress callbacks.

Use cases

  • Removing backgrounds from product or portrait photos without sending them to a third-party service.
  • Adding a private, no-account background removal feature to an existing web application.
  • Preparing transparent images for design or e-commerce work in the browser.

Topics

FAQ

What is bg0?
Open-source background remover that runs entirely in the browser using WebGPU or WebAssembly, with no uploads. BG0 removes image backgrounds and exports a transparent PNG. Inference runs locally in the browser: it uses WebGPU when the device supports it and falls back to WebAssembly otherwise. The source image is not uploaded to a server.
Is bg0 free to use? What license does it have?
bg0 is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is bg0 still maintained?
Actively maintained. The last commit to bg0 was on Sep 29, 2026.
What can I use bg0 for?
Removing backgrounds from product or portrait photos without sending them to a third-party service. Adding a private, no-account background removal feature to an existing web application. Preparing transparent images for design or e-commerce work in the browser.
Where can I get bg0?
The source code and installation instructions are on GitHub: https://github.com/opencoredev/bg0

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects