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
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
Related repositories
Similar repositories that may be relevant next.

agentwatch: Monitor AI Agent Activity Locally
October 6, 2026
agentwatch combines logs from multiple coding agents into a local timeline with event details, cost tracking, alerts, and search. It suits developers who run several agents and want visibility without sending data to a cloud service.

image-blaster: Turn Images into 3D Environments and Assets
October 5, 2026
image-blaster uses Claude skills and external generation services to turn an image into a 3D environment, object meshes, and sound effects. It is designed to quickly create starting points for game, 3D, and web projects.

OrcaReplay: Record and Replay AI Agent Runs
October 2, 2026
OrcaReplay records AI agent runs so developers can inspect what happened, replay interactions offline, and fork a run from a checkpoint onto another model. It is a TypeScript CLI for debugging and comparing agent behavior without modifying the agent.

openmake_llm: Coordinate AI Models, Agents, and Tools
October 1, 2026
OpenMake is a self-hosted AI workspace that coordinates chat models, agents, and tools in one place. It suits people who want multi-step AI workflows with local or open-weight models, while keeping infrastructure and model choices under their control.