Code Monkey home page Code Monkey logo

faceswap-playground's Introduction

faceswap-playground

This repo has been opened for users playing with the project.

Sadly the project is not yet ready to use for non technical people, it will improve over time, so check for updates regularly and discuss with other.

What can you do here?

  • Discuss here about your experience of the project
  • Help people having trouble running it
  • Add guidelines and help for newcomers
  • Share data/models

If you are a more experienced user you can help by proposing solutions for a better user-experience. Ideally, the goal is to get to a release that can be used to non technical people.

Quick start

Get the code from the main 'faceswap' repo and set it up (setup section below)

The project has multiple entry points. You will have to:

  • Gather photos (or use the one provided in the training data provided below)
  • Extract faces from your raw photos
  • Train a model on your photos (or use the one provided in the training data provided below)
  • Convert your sources with the model

Extract

From your setup folder, run python extract.py. This will take photos from src folder and extract faces into extract folder.

Train

From your setup folder, run python train.py. This will take photos from data/trump and data/cage folder and train a model that will be saved inside the models folder.

Convert

From your setup folder, run python convert_photo.py. This will take photos from original folder and apply new faces into modified folder.

Note: there is no conversion for video yet. You can use MJPG to convert video into photos,, process images, and convert images back to video

Training Data

Whole project with training images and trained model (~300MB):
https://anonfile.com/p7w3m0d5be/face-swap.zip or click here to download

How To setup and run the project

Setup

Clone the repo and setup you environment. There is a Dockerfile that should kickstart you. Otherwise you can setup things manually, see in the Dockerfiles for dependencies

Main Requirements: Python 3 Opencv 3 Tensorflow 1.3+(?) Keras 2

You also need a modern GPU with CUDA support for best performance

Some tips:

Reuse existing models will train much faster than start from nothing.
If there are not enough training data, start with someone looks similar, then switch the data.

faceswap-playground's People

Contributors

deepfakes avatar clorr avatar

Watchers

Aravindan Chockalingam avatar James Cloos 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.