JH

UnlimitedBG

AI-powered background removal for photobooths

UnlimitedBG is an AI-powered background removal tool built in two forms: a web app that runs entirely in the browser, and an Electron desktop app for offline photobooth kiosks. Both process images locally with zero cloud dependency.

UnlimitedBG usage

The web app runs a compact 4MB U2Net model via ONNX in the browser to generate an initial mask, then converts it to a trimap and feeds it to a classical mixture-of-gaussians background removal algorithm built with OpenCV in WebAssembly. To keep the web app lightweight, I recompiled the ONNX runtime in C++ with only the operators needed by this model, cutting the runtime size in half. A second C++ WASM module handles the post-processing stage. The app supports both single and batch background removal.

The Electron app targets offline photobooth PCs and uses a much larger model (160MB) fine-tuned on over 10,000 real photobooth images. To generate training data at scale, I built semi-automated tooling: a best-in-class removal model (too large to run on photobooth hardware) produces an initial mask, then a human review tool uses the initial mask to composite the subject over a desaturated background. Human reviewers can quickly identify and click on incorrect mask regions, and the tool uses SAM to automatically refine the mask.

Because photobooths are often offline, the licensing system uses QR codes for activation and renewal without an internet connection. Users scan a first QR code generated by the photobooth with their mobile device to activate their licenses on the server. The server then returns a second activation QR code containing a signed and encrypted license certificate that can be scanned by the photobooth camera to complete the activation process.