← tract demos

Background replacement, in your browser

Person segmentation on your camera, on your GPU through WebGPU with tract. Nothing leaves your machine.

Starting…
Camera
Composited on the GPU

The camera frames stay on the GPU; only the models come over the network, straight from Hugging Face at a pinned revision, and stay in your browser's cache: MediaPipe Selfie Segmentation, square or landscape (0.5 MB), and MODNet (26 MB), all under the Apache 2.0 license. The camera is composited at its own frame rate with the latest mask, so a slower model makes the mask lag, not the video; the mask latency runs from handing a frame to the model to its mask being ready to composite. Source code