a disguise for video calls

Mosaic Mask

Your face, as a shifting mosaic of strangers

Every part of your face (eyes, brows, nose, mouth, cheeks, chin, forehead) comes from a different person and keeps changing, so nobody on the call ever sees one face. It follows you as you talk, turn and frown, and goes to Zoom, Teams, Discord or Meet as an ordinary camera. The strangers are AI-generated people who don't exist.

MediaPipe Face MeshOpenCVOBS Virtual Camera 30 fps on a CPUPython
A face on the left, the same face on the right as a shifting mosaic of strangers

The scramble suit

Inspired by the scramble suit in A Scanner Darkly by Philip K. Dick (the 1977 novel, and Richard Linklater's 2006 film of it): the undercover agents' disguise, a shroud that shows a constantly shifting blur of thousands of different people's faces and bodies, so the wearer is nobody in particular. Mosaic Mask does the face, live, on a webcam.

What it looks like

Each row is one face: as the camera sees it, then as the mosaic half a second, a second and a second and a half later. Every piece follows the face's own shape, and every piece changes on its own timer, so the face never settles. Click to enlarge.

Four faces, each as the camera sees it, then as the mosaic at three moments half a second apart

Use it

  1. Put face images in faces/ (the repo comes with 27).
  2. Start run.bat. The first time it sets itself up: Python 3.11 with MediaPipe, OpenCV and pyvirtualcam.
  3. In your call, pick the camera OBS Virtual Camera. OBS Studio must be installed for its virtual camera; it doesn't have to be running.

Keys

Mmosaic on / off
Vvirtual camera on / off
Rreload faces/
Q Escquit

Sliders

fragmentshow many pieces the face is cut into
swap mshow often each piece changes to someone else
fade mshow long a piece blends into the next face
colour %how much the mosaic takes on your skin tone

The faces

The more there are, the less any one of them shows: 100 or more is good. Generate them rather than using photos of real people: a disguise made of real people's faces isn't fair on them. What works best: looking at the camera, the whole face visible, even light, a neutral face or a slight smile, and every age, skin tone and gender. The mix is the point.

How it works

1

The face pool

Every face in faces/ is read once: MediaPipe Face Mesh finds 468 points on it, and it's unwrapped onto one shared layout, so a piece of any face lines up with the same piece of any other.

2

The mosaic

The shared face is cut into a patchwork around the eyes, brows, nose, mouth, cheeks, chin, jaw and forehead. Each piece shows a different face and swaps to a new one on its own timer, blending as it goes.

3

Onto you

Every frame, Face Mesh finds your face and the patchwork is warped onto it triangle by triangle, so the borrowed mouth moves with yours. Its colour leans towards your skin, its edge melts into your head.

4

Out

The finished frame goes to OBS's virtual camera, about 30 times a second at 720p, on the CPU: only the face's box is worked on.