Git Product home page Git Product logo

face_swapping's Introduction

Face Swapping

alt text

Code for face swapping method preprocessing on image-to-image, video frames, and realtime camera.

This app is written by Python3 and uses OpenCV, and MediaPipe Face Mesh and image blending to swap the face of a person in destination image/video or seen by camera with a face of a person in a provided target image/video.

Introduction

Face swapping has become a popular application in recent years, allowing users to swap their faces with others in images or videos. Using the Mediapipe Face Mesh, a facial landmark detection model, our application offers a seamless and realistic face swapping experience.

By incorporating 3D facial angle estimation, the task of face swapping has become even more accurate and precise. With this advanced technology, we are able to map and manipulate facial features in three-dimensional space, resulting in a more realistic and seamless face swapping experience, providing an entertaining and engaging experience for users.

Requirement

To start the program you will have to run a Python file. You need to have Python3 and some additional libraries installed (Numpy, OpenCV-Python, Glob).

You also have to install Mediapipe pakages from Google: https://google.github.io/mediapipe/getting_started/python.html

Mediapipe can be installed with the following command:

pip install mediapipe

Usage

Firstly, change the path to your own destination and target image/video in **_Face_Swapping.py source code file.

For running the applications, run the following commands:

  • Image swapping:
python Image_Face_Swapping.py
  • Video swapping:
python Video_Face_Swapping.py
  • Realtime swapping:
python Realtime_Face_Swapping.py

Related

face_swapping's People

Contributors

htuannn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

face_swapping's Issues

Save New face

On image swap what do I need to change in image_face_swapping.py to save the new_face, I find this tool is perfect for creating masks.

Save video

Great work, suprisingly easy to install & run!

I dont see how to save a video in the video_face_swapping.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.