How our background removal works
Automatic background removal is the first step after you upload a portrait on the home page. This page explains what the system actually does—neural network matting on the server, a soft alpha mask returned to your browser, and local compositing over the official background colour you pick. It is written for users who want to understand the pipeline, not just click through it.
What you see vs. what runs
From your perspective: upload a photo, wait a few seconds, and your portrait appears on a solid background with a crop frame. Behind that, the server estimates which pixels belong to you (foreground) and which belong to the wall or room (background). The result is not a JPEG with a baked-in colour—it is a PNG with transparency (an alpha matte) that your browser paints on top of white, light grey, or another preset colour. Changing the background swatch recomposites the same matte instantly without another upload.
Pipeline in four stages
- Prepare your photo — Your upload is converted to a standard colour format and scaled so the network sees a consistent portrait—not the raw camera file dimensions.
- Neural matting on the server — An in-house deep neural network—exported as a quantized model and run with ONNX Runtime on our servers—separates you from the background. The output is a soft alpha mask: full opacity where you are, transparent where the room is, with gradual transitions at hair and shoulders. This is matting, not a hard scissors cutout.
- Edge colour cleanup — When enabled, a follow-up pass cleans semi-transparent edge pixels so hair does not look grey or haloed before compositing. The refined colours are paired with the same alpha mask.
- Browser compositing — The result is sent to your browser as a PNG with transparency. The canvas draws your portrait over the background colour you pick, then you pan and zoom to align the document frame. Changing colour recomposites instantly—no second upload.
Step-by-step: using it on the home page
- Choose country and document type so the crop frame matches the correct aspect ratio.
- Upload a JPG or PNG. A preview appears immediately while removal runs in the background.
- Wait for the matte to load—the portrait should sit on the default background with the frame overlay visible.
- Drag and pinch-zoom so your head height fits the guides (chin to crown within the marked band).
- Tap a background colour chip that matches your authority’s rule (white, off-white, light grey, etc.).
- Continue to Enhance if you need edge touch-up, skin smoothing, or brightness—otherwise export from Results.
Why a soft matte matters
Passport scanners and print shops look for uniform background colour and natural hair edges—the same signals as a studio portrait on a seamless backdrop. We use a soft alpha matte instead of a binary cutout, so edges look continuous at print size rather than showing stair-steps along the jaw. For typical photos taken at home or at work, that is about as close as software can get you to a booth-quality shot with a unified background. If your original wall was grey but you composite onto pure white, a faint halo may linger under hair; edge refinement on the Enhance step is there when you want to polish those last pixels. Most people can export with confidence once the background looks even.
When automatic removal struggles
- Busy backgrounds — patterns, shelves, or windows behind you confuse the model. Use a plain wall or sheet.
- Backlight — bright windows behind you blow out the silhouette; face the light source.
- Matching colours — blonde hair on a beige wall, or a white shirt on a white wall, reduces contrast at the boundary.
- Very low resolution — the model upsamples a small input; fine hair detail may not survive. Start with the largest file your camera provides.
Privacy and data handling
Background removal requires sending your portrait to our server for inference. We do not use your photo to train models; processing is stateless per request. The returned matte lives in your browser memory until you leave the session or export. For a broader privacy overview, see our privacy policy.