# bg-remove: Client-Side Image Background Removal with Transformers.js

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/addyosmani-bg-remove
Generated for open source discovery and AI-assisted research.

bg-remove is a powerful React + Vite application that enables free, client-side image background removal directly in your browser. Leveraging machine learning models via Transformers.js, it ensures all processing happens locally, prioritizing user privacy. This tool offers one-click removal, custom background options, and optional WebGPU acceleration for enhanced performance.

GitHub: https://github.com/addyosmani/bg-remove
OSRepos URL: https://osrepos.com/repo/addyosmani-bg-remove

## Summary

bg-remove is a powerful React + Vite application that enables free, client-side image background removal directly in your browser. Leveraging machine learning models via Transformers.js, it ensures all processing happens locally, prioritizing user privacy. This tool offers one-click removal, custom background options, and optional WebGPU acceleration for enhanced performance.

## Topics

- background-remover
- image-editing
- client-side
- typescript
- web-app
- machine-learning
- privacy
- transformers-js

## Repository Information

Last analyzed by OSRepos: Wed Jun 17 2026 16:48:29 GMT+0100 (Western European Summer Time)
Detail views: 2
GitHub clicks: 1

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

The `bg-remove` project by Addy Osmani is an innovative, client-side application designed for seamless image background removal. Built with React and Vite, it utilizes the power of Transformers.js to run machine learning models directly within your browser, ensuring that your images never leave your device. This privacy-focused tool offers one-click background removal, customizable background colors or images, and various download options, with optional WebGPU acceleration for supported browsers.

## Installation

To get started with `bg-remove`, follow these simple steps:

1.  **Clone the repository:**
    bash
    git clone https://github.com/addyosmani/bg-remove.git
    

2.  **Navigate to the project directory:**
    bash
    cd bg-remove
    

3.  **Install dependencies:**
    bash
    npm install
    

4.  **Start the development server:**
    bash
    npm run dev
    

## Examples

Using `bg-remove` is straightforward. First, you upload an image file. The application then defaults to using the RMBG-1.4 model for broad compatibility, but if your browser supports WebGPU, you have the option to switch to MODNet for potentially faster processing. After the selected ML model processes your image and creates an alpha mask, you can customize the background with a new color, an image, or keep it transparent. Finally, you can export your processed image with either a transparent or colored background.

## Why Use It

There are several compelling reasons to use `bg-remove` for your image editing needs. Its primary advantage is privacy, as all image processing occurs directly in your browser, ensuring your files remain local and secure. The application is entirely client-side, meaning you don't need to upload sensitive data to external servers. Furthermore, it offers robust performance across all modern browsers with its default RMBG-1.4 model, and provides an optional WebGPU acceleration for even faster results on compatible systems. The intuitive interface and one-click removal make it highly user-friendly for quick and efficient background removal.

## Links

For more detailed information, contributions, or to explore the codebase, visit the official GitHub repository:

*   [GitHub Repository](https://github.com/addyosmani/bg-remove)