#403 · Primary category: Computer Vision

FaceSwap

3d-models computer-vision face-alignment face-swap optimization

3D face swapping implemented in Python

Project last updated:04/23/23

GitHub Stars

759

Forks

209

Contributors

2

License

MIT

Why we included this project

This is a compact Python implementation of real-time 3D face swapping, originally written as a teaching exercise for a university course. Rather than leaning on a deep-learning black box, it walks through the classic pipeline: facial landmarks are detected, a 3D model with blendshapes is fitted using Gauss-Newton optimization, and the textured result is rendered with pygame and blended onto the live camera feed. The code is short enough to read in one sitting, which makes it a handy reference for anyone prototyping face-alignment or avatar features who wants to see how the pieces connect. One caveat: it is an educational project, not a maintained production library, so expect to download the dlib landmark model yourself and adapt the code before putting it to real use.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category