Background removal in passport photos — what AI actually does (2026)
How AI background removal works for passport photos. Models, hard cases, local vs cloud, will authorities reject it.
What “AI background removal” really is
When a passport-photo service says it removes the background using AI, what's happening is semantic segmentation: a neural network classifies each pixel of your photo as either “person” or “not-person.” The person pixels are kept, the not-person pixels are replaced with the regulation background color (white, light grey, off-white, or pale blue depending on the country).
It's not Photoshop magic. It's a well-understood class of computer-vision model that has gotten quietly excellent over the past three years — to the point where, on most photos, the result is indistinguishable from a studio capture against a proper backdrop.
The models that actually power 2026 services
- RMBG (Bria AI). The current state-of-the-art for portrait segmentation in commercial use. Hair-edge accuracy was the breakthrough — earlier models would either keep stray hairs (visible against a clean white background) or chop the hairline cleanly (looking unnaturally like a wig). RMBG handles loose hair gracefully.
- U2Net and ISNet (open-source). Older but still capable. Many free apps use these. The visible difference is glasses and earring edges; ISNet sometimes punches small holes in glass-frame areas, which a careful service patches but a careless one ships as a small white spot inside the lens.
- BiRefNet. Newer architecture, very good at fine edges. Slower than RMBG but worth it for clients with curly or fluffy hair where per-strand accuracy matters.
The hard cases (where AI still fails)
- Hair color matching the background. Light blond hair against a white wall, or black hair against a dark backdrop. The model can't tell where the hair stops if there's no contrast. Best fix: shoot against a wall that contrasts your hair color, then let the model swap it to white.
- Translucent earrings, glasses lenses, hair accessories. Dangly earrings have background showing through them; the model has to decide whether to keep the earring or treat the gap as background. Different models make different calls.
- Loose strands far from the head. Single hairs floating off a windswept hairstyle often get trimmed because the model can't distinguish them from background noise. Solution is usually invisible — the result looks fine even without those hairs.
- Holding glasses or wearing a thin necklace chain. Anything thin and dark against a dark backdrop loses contrast and may disappear partially.
Local vs cloud — the trade-off most services hide
Background removal can run locally in your browser (using ONNX Runtime or TensorFlow.js with a smaller model like RMBG-1.4) or in the cloud (using a larger, more accurate model). The trade-off:
- Local: 1-3 seconds processing time, no photo uploaded anywhere, smaller model (slightly worse on hard cases).
- Cloud:3-8 seconds processing time, photo uploaded to the service's inference endpoint, larger model (better on hard cases like glasses with reflection or curly hair).
Privacy-focused services (us included) run a local model first and only fall back to cloud if the local result is poor — that way the typical photo never leaves your device.
How to tell if the AI did a clean job
- Zoom to 200% on the head edges. Look for a one-pixel-wide grey halo (sign of imperfect alpha-blending) or chunky stair-step edges (sign of a hard mask without anti-aliasing).
- Check inside glasses lenses. The lens area should be transparent enough to show the eye; if there's a discolored patch, the AI got confused.
- Check between hair strands, especially around the ears. A clean cut-out lets the new background show through where hair is sparse. A bad one paints everything as “person” and you get a weird helmet-of-hair look.
Will authorities reject AI-replaced backgrounds?
No, provided the result looks natural. The official rule is that the background must be a single uniform color in the regulation range — not that it must be a physical wall. Authorities cannot, in practice, detect whether a background was original or replaced, and even the strictest checking systems (German PointID, US Photo Tool) don't test for AI replacement. What they DO test for is uniformity, correct color, and absence of visible artifacts at the head edges. A bad AI replacement gets rejected for visible artifacts, not for being AI.
Want a photo with cleanly-replaced background and AI compliance check? start your passport photo with Foto2Pass — €8.99 / $11.99, local-first AI for privacy, RMBG 2.0 for hard cases, full refund if rejected.
Redo att pröva Foto2Pass?
Ladda upp en selfie, vi sköter beskärning, ljus och godkännandekontroll. Du betalar bara om resultatet klarar.
Starta mitt passfoto