Become Angela Merkel with a webcam and 68 facial dots
A 2017 pix2pix demo that turns your face into a trained target face in real time, using only landmark points as the intermediate language.

What it does
This repo wires together dlib facial-landmark detection, Christopher Hesse’s pix2pix-tensorflow implementation, and a webcam feed. You train on a video of a target face (the default is Angela Merkel), then run a script that captures your live facial landmarks, feeds them through the trained generator, and outputs the synthesized face on screen. The heavy lifting—image-to-image translation—is delegated entirely to pix2pix-tensorflow; this repo is mostly glue code for data prep, model export, and the OpenCV webcam loop.
The interesting bit
The trick is the indirection: instead of mapping face A directly to face B, the system learns to reconstruct a face from 68 sparse landmark dots. That makes the live demo lightweight in concept, though not necessarily in practice—your expression is compressed to a stick-figure face, then hallucinated back into reality by the GAN.
Key highlights
- Generates paired training data automatically from any video using dlib’s
shape_predictor_68_face_landmarks.dat - Includes model-reduction and freezing scripts to shrink the exported TensorFlow graph for inference
- Pre-trained Merkel model and dataset available via Dropbox links
- Live webcam demo with a toggle to show raw landmarks alongside the generated output
- Requires Python 3.5, TensorFlow 1.2, OpenCV 3.0, and dlib 19.4 (all circa-2017 versions)
Caveats
- The README is a straight recipe with no discussion of training convergence, output quality, or failure modes
- Dependencies are pinned to versions that are now several years old; getting this running on modern hardware may require archaeology
- The project is explicitly a “demo” and leans heavily on external repos for the actual neural-network implementation
Verdict
Worth a look if you want a concrete, end-to-end example of 2017-era face-swap pipelines using conditional GANs. Skip it if you need production-grade deepfakes or modern frameworks—this is a museum piece with educational value, not a tool.