Zurag: AI photo editor








The subject cut out and placed on a sunset scene drawn in the browser
An AI photo editor: it cuts the subject out of a photo and puts it on a new scene, colour, photo or its own blurred background, and erases objects and upscales photos right in the browser.
Zurag (Mongolian for "picture") is an AI-powered photo editor. Upload a photo and the subject is cut out; then put it on a new background, add a shadow, adjust it, change the canvas size and download it. In the browser it also erases unwanted objects and upscales small photos. The editor is in English and Mongolian.
✨ Features
- Background removal: RMBG-1.4 by default, with BiRefNet-lite, ISNet and BEN2 selectable per request
- Backgrounds: "Magic" scenes drawn in the browser (no image files), your own photo, a colour palette, or the photo's own background blurred
- Background blur: a lens (disc) blur with weighted highlights that leaves the subject out, so there is no dark halo; it was matched to Mercari's product listing photos
- Retouch: paint over an object to erase it (MI-GAN for speed, LaMa for quality) and upscale 4× with Real-ESRGAN, all in the browser on WebGPU with a WebAssembly fallback
- Editing: shadow presets, brightness, contrast and saturation, canvas sizes from square to story, a compare slider, and undo / redo for every step
- Several photos at once: each keeps its own edits and history
- Downloads: PNG or JPG at full resolution, or the untouched transparent cutout
🧠 Image pipeline
- The photo is decoded once with its EXIF orientation and the model runs at 1024×1024; the matte is then scaled to full resolution with a colour guided filter that snaps edges to the photo
- Card / poster / document mode: fits a quadrilateral (rotation, perspective, rounded corners) and renders crisp straight edges
- Foreground colour estimation (blur fusion), so hair and soft edges don't keep the old background's colour
- Measured: on 92 test images (DIS5K, AIM-500 and synthetic cards) the mean matte error is 0.0109 / 0.0231 / 0.0006, down from 0.0288 / 0.0706 / 0.0529 with the earlier ISNet pipeline
🛠 Tech stack
- Backend: Node.js, Hono, ONNX Runtime and Sharp, with a REST API (POST /api/remove-bg) and per-IP rate limiting
- Frontend: React 19, Vite, Tailwind CSS v4, shadcn/ui, react-dropzone and onnxruntime-web
- Tooling: a Turborepo + pnpm monorepo in TypeScript, with unit tests and an evaluation script for mask quality
The sample photos in the screenshots are from Unsplash.