Code Monkey home page Code Monkey logo

faceswap's Introduction

FaceSwap

Instructions to run FaceSwap using Traditional approach (triangulation & Thin Plate Spline):

  1. Set input1 and input 2 as the required source and destination paths in Wrapper.py main. Note:
    • If the two inputs are the same video, set input1 as video path and input2 as None
    • If one input is a video and the other an image, set input1 as video path and input2 as image path
  2. Set method as "TRI" for triangulation or "TPS" for Thin Plate Spline algorithms respectively.
  3. Run Wrapper.py using python3 Wrapper.py

Instructions to run PRNet:

  1. Download the model weight from https://drive.google.com/file/d/1UoE-XuW1SDLUjZmJPkIZ1MLxvQFgmTFH/view
  2. Place the file in ./PRNet/Data/net-data
  3. Create a conda environment or venv with python2.7, tf 1.13 (gpu version), cv2 4.2.1, numpy and dlib.
  4. In prnetWrapper.py, specify path to the source image/video and path to the destination image/video.
  5. Run in command line: python prnetWrapper.py.

FaceSwap results

Facial Landmarks

Delaunay's Triangulation

Final Swap

Swap in the same frame

faceswap's People

Contributors

niteshjha08 avatar pwin17 avatar

Watchers

 avatar

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.