bg-remove: Remove Image Backgrounds in Your Browser

bg-remove: Remove Image Backgrounds in Your Browser

Summary

bg-remove is a browser-based image background remover that runs machine-learning models locally with Transformers.js. It suits people who want to edit images without uploading them to a server, with optional WebGPU acceleration where supported.

At a glance

Language
TypeScript
License
MIT
Stars
1k
Forks
119
Added to OSRepos
June 17, 2026
Last analyzed
October 3, 2026
View on GitHub

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Overview

bg-remove is a React and Vite web app for removing image backgrounds on the client side. It creates an alpha mask with a machine-learning model, then lets you keep the image transparent or apply a color or image background.

Because processing happens in the browser, it is useful for people who want a privacy-focused alternative to uploading images to a background-removal service. It supports a default model for broad browser compatibility and an optional WebGPU-based alternative.

Key Features

  • Remove image backgrounds with a one-click workflow.
  • Process images locally in the browser, without server uploads.
  • Use RMBG-1.4 by default, with WebAssembly processing.
  • Choose MODNet when WebGPU is available.
  • Set a custom background color or image, or retain transparency.
  • Download the result with a transparent or colored background.
  • Use IndexedDB through Dexie.js for local file management.

Use Cases

  • Individuals preparing transparent product images for listings without sending files to a remote service.
  • Designers making quick image cutouts for mockups or other visual assets.
  • Developers evaluating browser-based image processing with Transformers.js.
  • Privacy-conscious users who want to remove backgrounds from personal images locally.

Project Facts

  • Language: TypeScript
  • License: MIT
  • Stars: 1k
  • Forks: 119
  • Topics: background-image, background-image-remover, background-remover, images
  • Archived: No

Getting Started

git clone https://github.com/addyosmani/bg-remove.git
cd bg-remove && npm install && npm run dev

See the README for setup and usage details. Try the app at bg.addy.ie.

Alternatives

  • photopea: Photopea is a full-featured browser image editor with manual background-removal tools, while bg-remove focuses on local machine-learning removal.

Considerations

  • Processing and model inference take place in the browser, so available device resources and browser performance can affect the experience.
  • WebGPU acceleration is optional and requires a compatible browser; the README describes its availability as limited to browsers with WebGPU support, such as Chrome Canary with WebGPU flags enabled.
  • The default RMBG-1.4 path is intended for modern browsers and uses WebAssembly; MODNet is an alternative rather than the default.

Found this useful?

Share it with someone who would like bg-remove.

Comparisons

Source repository

Open the original repository on GitHub.

24 counted GitHub visits

View on GitHub

Related repositories

Similar repositories that may be relevant next.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️