SVG Magic Cleaner

100% private, browser-based AI background remover and raster-to-SVG vectorizer using Hugging Face Transformers.js and WebGPU. Converts bitmaps into scalable vectors with zero server uploads.

WebGPU Accelerated Active · v1.0.0 Model: RMBG-1.4 License: MIT 100% Private
git clone https://github.com/hellohukam/svg-magic-cleaner.git && npm install && npm run dev

Overview

SVG Magic Cleaner eliminates the trade-off between privacy and AI convenience. It packages state-of-the-art neural background removal (`briaai/RMBG-1.4`) and contour vectorization directly inside a static browser environment. By using the browser's native WebGPU compute shaders via Hugging Face Transformers.js and ONNX Runtime Web, complex neural matrix multiplication executes locally at native hardware speeds.

The Bottleneck

Designers needing quick background removal or SVG conversion are coerced into subscription SaaS tools that upload private assets to third-party cloud servers, posing severe intellectual property and client privacy risks.

The Architecture

Runs completely in-memory on the client machine. The ONNX neural model is cached in browser IndexedDB, executed via WebGPU shaders, and converted into resolution-independent SVG vector paths without a single HTTP POST request.

Key Features

In-Browser RMBG-1.4 Neural Matting

Executes deep background segmentation locally with crisp foreground edge preservation across hair, transparent objects, and complex geometry.

WebGPU Hardware Acceleration

Leverages GPU compute shaders for low-latency inference, with seamless WebAssembly (WASM) fallback for legacy browsers and older CPUs.

Bitmap to Resolution-Independent Vector Paths

Automatically vectorizes segmented foreground masks into scalable, clean SVG <path> elements suitable for web development and icon libraries.

Interactive Split Comparison & Batch ZIP Export

Inspect output quality over an alpha checkerboard grid. Process multiple files simultaneously and download bundled results as a clean ZIP archive.