GithubHelp home page GithubHelp logo

frankiegu / avatarify-fast Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kaiotter/avatarify-fast

1.0 0.0 0.0 3.88 MB

One-click video face-swap. This is a pure python scripts without any GUI. It's based on avatarify-python and uses face landmarks lib to implement a pipeline for processing frames automaticly.

Python 99.82% Shell 0.18%

avatarify-fast's Introduction

avatarify-fast

One-click video face-swap. This is a pure python scripts without any GUI. It's based on avatarify-python and uses face landmarks lib to implement a pipeline for processing frames automaticly.

I merge code from:

https://github.com/alievk/avatarify-python
https://github.com/AliaksandrSiarohin/motion-cosegmentation
https://github.com/ainrichman/Peppa-Facial-Landmark-PyTorch

How Fast?

12fps!! with TITAN X (Pascal)

Requirements

pytorch
opencv-python==4.2.0.34
face-alignment==1.3.3
pyzmq==20.0.0
msgpack-numpy==0.4.7.1
pyyaml==5.3.1

Weights prepare

Downlowd models' weights of avatarify-python "vox-adv-cpk.pth.tar" from
https://github.com/alievk/avatarify-python/tree/master/docs#download-network-weights

avatarify-python need face-alligment library.

git clone https://github.com/1adrianb/face-alignment
cd face-alignment
pip install -r requirements.txt
python setup.py install

Running Steps

  1. run extract_audio.sh to gain soundtrack mp3 file.
  2. run demo.py with re-write params in local path.
  3. run merge_audio.sh to merge soundtrack and video.

TODO

  • A better face swap model which cases to less color shift.
  • Or, maybe a better landmark model which contains brow.
  • Corner case process, like with cap/hat, large scale head pose, etc.
  • Maybe we need a face recognition to locate the specific person in multi-persons scene.

avatarify-fast's People

Contributors

kaiotter avatar

Stargazers

junphine 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.