Ingest
—
Waiting for the camera
Person segmentation on your camera, on your GPU through WebGPU with tract. Your camera feed never leaves your machine.
“” from the Livestorm virtual background library.
Side by side keeps the camera on the left. Output only shows the composited picture or the mask.
—
Waiting for the camera
—
Waiting for a mask
—
Waiting for a frame
—
Waiting for a picture
The camera frames stay on the GPU. MediaPipe and the fp32 RVM come over the network and stay in the browser's cache. The other weights ship with the page. MediaPipe Selfie Segmentation, square or landscape (0.5 MB), comes from Hugging Face at a pinned revision, under the Apache 2.0 license. PP-HumanSegV2 (3.7 MB, Apache 2.0) is the 256 × 144 person channel, downloaded while the site is built because that sliced file is not published upstream. MODNet (26 MB, Apache 2.0) is the webcam matte at 512 × 288, downloaded while the site is built. Longpipe landscape mattes (MIT) are xs 384 × 240, small 384 × 224, medium 512 × 320, large 640 × 400, and xl 1280 × 768. The camera and the mask stay float32 and the body runs in float16. RVM MobileNetV3 fp16 is the model the page opens on. It is the official v1.0.0 fp16 graph (GPL-3.0) with a float32 camera cast and a float32 matte cast, written while the site is built. The fp32 file (15 MB) stays on a pinned Hugging Face copy, because the release host does not let a web page read it. It reads the camera frame itself. The downsample keeps the long side of the inner frame at 512, and a smaller camera is not shrunk. The page shows that factor for the capture size. The composited picture uses the camera frame the mask was measured from, so a slower model holds that pair instead of painting the new picture with the old mask. The preview keeps running live. The mask latency runs from handing a frame to the model to its mask being ready to composite. “Smooth mask edges” softens the mask on its own. “Hold uncertain mask” is shown for the single-frame models. An unsure pixel keeps most of the previous mask, and a sure pixel updates. The picture shows background below 0.1 and solid person from 0.7. Smooth mask edges feathers the outline onto the camera picture and does not remember the previous frame. RVM already remembers the previous frame, so the control is hidden and the blend is not applied. “Move the mask with the camera” keeps the output on the camera clock. A frame that gets its own mask is shown as that pair. A frame that arrives while a mask is still being computed is filled by moving the last mask onto it. Skin follows that motion. Only the outline is checked against the picture, so a flat colour does not show through a fringe or a hand that has closed, and the face is left whole. It holds the matched pair when the warp has no source frame. A one-pixel hole inside the mask is closed. Coverage the mask never had is not invented. Source code