real-time stylized face pixelation for streaming and recording. keeps your identity anonymous while tracking facial motion.
saw someone using this filter on instagram and couldn't find it anywhere, so i just built it myself. now you can use it too.
- blocks stay stuck to your face even when you turn sideways
- instant privacy protection (covers your face from frame 1)
- runs at 60fps with GPU acceleration
- works with OBS for streaming
- face-only mode hides everything except the mosaic for maximum anonymity
- node.js v16 or higher (download)
- npm v7 or higher (comes with node)
check your versions:
node -v
npm -vjust want to use it?
git clone https://github.com/yungalgo/mosaic-facefilter.git
cd mosaic-facefilter
npm install
npm startgit clone https://github.com/yungalgo/mosaic-facefilter.git
cd mosaic-facefilter
# install (downloads Electron binary via postinstall)
npm install --no-optional --foreground-scripts
# run
npm startthe app opens, asks for camera permissions, and you're done.
want a standalone app you can double-click?
build it once:
# mac - creates a .dmg installer
npm run build:mac
# windows - creates a .exe installer
npm run build:winthen just distribute/install the built app. no terminal needed after that.
- electron - desktop app framework, gives us a browser window with camera access
- mediapipe tasks-vision - google's face tracking library, finds 468 facial landmark points
- webgl - GPU shaders for the pixelation effect, renders at 60fps
- custom UV pipeline - unwraps your face to a flat texture, pixelates it, then wraps it back with depth testing
edit src/renderer/app.js:
const TILES_U = 12; // fewer = bigger blocks
const TILES_V = 14;
const FACE_SCALE_Y_DOWN = 1.1; // how much to extend down (chin coverage)uses mediapipe to track 468 face points, then renders chunky pixels that follow your face in 3D. depth testing makes sure the front of your face covers the back when you turn.
two-tier detection: fast bbox pixelation kicks in immediately, then switches to high-quality mesh-based rendering once tracking locks.
november 9, 2025
- added face-only mode toggle for maximum anonymity. when enabled, shows only the pixelated face on a chroma green background. if no face is detected, screen goes completely blank. perfect for zero-leak privacy streaming.
october 21, 2025
- added camera selector dropdown. switch between multiple cameras on the fly without restarting the app.
thx to @lschmelzeisen for understanding-mediapipe-facemesh-output — v helpful
windows: Electron failed to install correctly
Delete the broken electron package and reinstall with scripts enabled:
rmdir /s /q node_modules\electron
npm cache clean --force
npm install electron@28 --save-dev --foreground-scripts
npm install --no-optional --foreground-scriptscamera not working? check system privacy settings
laggy? lower the TILES values
@yungalgorithm · MIT license · star if useful ⭐
