face-filter

Composite your live webcam eyes and mouth onto any base image in real time. Use it as an OBS window capture source to appear as a photo, meme, or any face while chatting.

demo mediapipe

How it works

  1. You provide a base image (any photo with a clear frontal face)
  2. MediaPipe detects face landmarks on the base image once at startup
  3. Each webcam frame, your face is detected and your eyes and mouth are warped to match the base image's face geometry
  4. The result displays in a window — capture it in OBS with Window Capture

Requirements

  • Python 3.9+
  • Webcam
pip install opencv-python mediapipe numpy

The face landmark model (~29 MB) is downloaded automatically on first run.

Usage

python face_filter.py <base_image>
python face_filter.py "C:\Users\you\Pictures\photo.jpg"

A window opens showing the base image with your live eyes and mouth blended in. Two sliders let you tune the result:

Slider Effect
Pad Expands the eye/mouth mask outward (default 20px)
Blur Feathers the mask edges for a softer blend (default 8px)

Press Q to quit.

OBS setup

  1. Run the script with your chosen base image
  2. In OBS: Add Source → Window Capture
  3. Select the Face Filter window
  4. Crop/resize the source to fit your scene

Base image tips

  • Use a clear, frontal face photo with good lighting
  • The face should be roughly the same size and angle you'll be at on webcam
  • Works with photos, cartoons, memes — anything with a detectable face
S
Description
Composite your live webcam eyes and mouth onto any base image — use as OBS window capture source
Readme
85 KiB
Languages
Python 100%