How AI Background Removal Actually Works
Automatic background removal uses a machine learning model trained on a technique called semantic segmentation, which classifies every pixel in an image as belonging to the main subject or to the background — the model outputs a mask marking exactly which pixels to keep, and everything else is made transparent, all without any manual selection or tracing.
This same underlying technique now runs efficiently enough to execute directly in a web browser, rather than requiring a server round-trip.
What the model is actually predicting
Rather than detecting simple edges or color differences, the model has learned, from being trained on a large number of labeled example images, what generally distinguishes a foreground subject (a person, product, or object) from background content — producing a per-pixel confidence mask for what counts as "subject" versus "background" in a new image it hasn't seen before.
Why it can run in your browser now
Advances in model compression and WebAssembly (a browser technology for running near-native-speed code) have made it practical to run a reasonably capable segmentation model directly on your device, rather than needing to upload your image to a remote server for processing — which is also why your photo never leaves your browser with this kind of tool.