Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Background Remover

A privacy-first background removal tool designed to run entirely in the browser. Select a portrait, remove its background automatically, preview the result, and download a same-size PNG with smooth transparent edges—without uploading the image to a server.

Project status: Specification and implementation planning are complete. Application code has not been implemented yet. See the task backlog for the planned delivery sequence.

Planned Features

  • Process static JPG and PNG portraits locally in the browser.
  • Preserve source dimensions and foreground colours in RGBA PNG output.
  • Produce soft alpha boundaries for hair and other fine details.
  • Preview results on a transparency grid and choose a safe output filename.
  • Process nested directories sequentially without stopping after one failed image.
  • Download batch results as a ZIP that mirrors the input directory tree.
  • Resolve JPG/PNG naming collisions deterministically without overwriting files.
  • Support current Chrome, Edge, Safari, and Firefox desktop releases.

Privacy Model

Image decoding, person matting, alpha composition, PNG encoding, and ZIP creation will happen on the user's device. Images, masks, filenames, metadata, and derived output must not be sent to an inference service or analytics endpoint. Only static application, runtime, and model assets may be downloaded.

Planned Architecture

The implementation uses a TypeScript 6.0, Yarn, and Turborepo workspace. Every application or library package belongs under packages/:

Package Responsibility
web React/Vite interface and processing worker
image-core JPG/PNG validation, decoding, alpha composition, encoding, and naming
inference Model provenance, preprocessing, ONNX Runtime Web, and matte normalization
batch Recursive scheduling, collision planning, failure isolation, and ZIP generation
test-fixtures Licensed/generated fixtures, expected manifests, and artifact verification

The initial model candidate is BiRefNet Lite Matting with WebAssembly as the universal execution path and optional WebGPU acceleration. It must pass the repository's browser, memory, performance, and image-quality benchmark against MODNet before release.

Documentation

Getting Started

The following commands describe the planned development workflow. They become available after the workspace setup tasks are implemented:

corepack enable
yarn install --immutable
yarn dev

Planned quality gates:

yarn lint
yarn format:check
yarn typecheck
yarn test
yarn test:browser
yarn build
yarn test:e2e

Contributing

Read AGENTS.md for repository structure, coding conventions, TDD expectations, commit style, and privacy requirements. Work through tasks.md in dependency order. Each behavior change must begin with a failing test, and tasks should be marked complete only after fresh verification.

Do not commit private photographs or unverified model binaries. Model changes must record their source revision, checksum, license, and benchmark evidence.

License

A repository license has not been selected yet. Public access does not grant permission to reuse, modify, or distribute the code until a license is added.

About

Privacy-first, fully in-browser background removal — spec-first project, implementation in progress

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages