Python-Faceswap: Deepfakes Software For All

deepfakes_faceswap


FaceSwap is a tool that utilizes deep learning to recognize and swap faces in pictures and videos.


Jennifer Lawrence/Steve Buscemi FaceSwap using the Villain model

Build Status Documentation Status

Make sure you check out INSTALL.md before getting started.

Manifesto

FaceSwap has ethical uses.

When faceswapping was first developed and published, the technology was groundbreaking, it was a huge step in AI development. It was also completely ignored outside of academia because the code was confusing and fragmentary. It required a thorough understanding of complicated AI techniques and took a lot of effort to figure it out. Until one individual brought it together into a single, cohesive collection. It ran, it worked, and as is so often the way with new technology emerging on the internet, it was immediately used to create inappropriate content. Despite the inappropriate uses the software was given originally, it was the first AI code that anyone could download, run and learn by experimentation without having a Ph.D. in math, computer theory, psychology, and more. Before "deepfakes" these techniques were like black magic, only practiced by those who could understand all of the inner workings as described in esoteric and endlessly complicated books and papers.

"Deepfakes" changed all that and anyone could participate in AI development. To us, developers, the release of this code opened up a fantastic learning opportunity. It allowed us to build on ideas developed by others, collaborate with a variety of skilled coders, experiment with AI whilst learning new skills and ultimately contribute towards an emerging technology which will only see more mainstream use as it progresses.

Are there some out there doing horrible things with similar software? Yes. And because of this, the developers have been following strict ethical standards. Many of us don't even use it to create videos, we just tinker with the code to see what it does. Sadly, the media concentrates only on the unethical uses of this software. That is, unfortunately, the nature of how it was first exposed to the public, but it is not representative of why it was created, how we use it now, or what we see in its future. Like any technology, it can be used for good or it can be abused. It is our intention to develop FaceSwap in a way that its potential for abuse is minimized whilst maximizing its potential as a tool for learning, experimenting and, yes, for legitimate faceswapping.

We are not trying to denigrate celebrities or to demean anyone. We are programmers, we are engineers, we are Hollywood VFX artists, we are activists, we are hobbyists, we are human beings. To this end, we feel that it's time to come out with a standard statement of what this software is and isn't as far as us developers are concerned.

  • FaceSwap is not for creating inappropriate content.
  • FaceSwap is not for changing faces without consent or with the intent of hiding its use.
  • FaceSwap is not for any illicit, unethical, or questionable purposes.
  • FaceSwap exists to experiment and discover AI techniques, for social or political commentary, for movies, and for any number of ethical and reasonable uses.

We are very troubled by the fact that FaceSwap can be used for unethical and disreputable things. However, we support the development of tools and techniques that can be used ethically as well as provide education and experience in AI for anyone who wants to learn it hands-on. We will take a zero tolerance approach to anyone using this software for any unethical purposes and will actively discourage any such uses.

How To setup and run the project

FaceSwap is a Python program that will run on multiple Operating Systems including Windows, Linux, and MacOS.

See INSTALL.md for full installation instructions. You will need a modern GPU with CUDA support for best performance. AMD GPUs are partially supported.

Overview

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

  • Gather photos and/or videos
  • Extract faces from your raw photos
  • Train a model on the faces extracted from the photos/videos
  • Convert your sources with the model

Check out USAGE.md for more detailed instructions.

Extract

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

Train

From your setup folder, run python faceswap.py train. This will take photos from two folders containing pictures of both faces and train a model that will be saved inside the models folder.

Convert

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

GUI

Alternatively, you can run the GUI by running python faceswap.py gui

General notes:

  • All of the scripts mentioned have -h/--help options with arguments that they will accept. You're smart, you can figure out how this works, right?!

NB: there is a conversion tool for video. This can be accessed by running python tools.py effmpeg -h. Alternatively, you can use ffmpeg to convert video into photos, process images, and convert images back to the video.

Some tips:

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

Help I need support!

Discord Server

Your best bet is to join the FaceSwap Discord server where there are plenty of users willing to help. Please note that, like this repo, this is a SFW Server!

FaceSwap Forum

Alternatively, you can post questions in the FaceSwap Forum. Please do not post general support questions in this repo as they are liable to be deleted without response.

Donate

The developers work tirelessly to improve and develop FaceSwap. Many hours have been put in to provide the software as it is today, but this is an extremely time-consuming process with no financial reward. If you enjoy using the software, please consider donating to the devs, so they can spend more time implementing improvements.

Patreon

The best way to support us is through our Patreon page:

become-a-patron

One time Donations

Alternatively you can give a one off donation to any of our Devs:

@torzdf

There is very little FaceSwap code that hasn't been touched by torzdf. He is responsible for implementing the GUI, FAN aligner, MTCNN detector and porting the Villain, DFL-H128 and DFaker models to FaceSwap, as well as significantly improving many areas of the code.

Bitcoin: 385a1r9tyZpt5LyZcNk1FALTxC8ZHta7yq

Ethereum: 0x18CBbff5fA7C78de7B949A2b0160A0d1bd649f80

Paypal: torzdf

@andenixa

Creator of the Unbalanced and OHR models, as well as expanding various capabilities within the training process. Andenixa is currently working on new models and will take requests for donations.

Paypal: andenixa

@kvrooman

Responsible for consolidating the converters, adding a lot of code to fix model stability issues, and helping significantly towards making the training process more modular, kvrooman continues to be a very active contributor.

Ethereum: 0x18CBbff5fA7C78de7B949A2b0160A0d1bd649f80

How to contribute

For people interested in the generative models

  • Go to the 'faceswap-model' to discuss/suggest/commit alternatives to the current algorithm.

For devs

  • Read this README entirely
  • Fork the repo
  • Play with it
  • Check issues with the 'dev' tag
  • For devs more interested in computer vision and openCV, look at issues with the 'opencv' tag. Also feel free to add your own alternatives/improvements

For non-dev advanced users

  • Read this README entirely
  • Clone the repo
  • Play with it
  • Check issues with the 'advuser' tag
  • Also go to the 'faceswap Forum' and help others.

For end-users

  • Get the code here and play with it if you can
  • You can also go to the faceswap Forum and help or get help from others.
  • Be patient. This is a relatively new technology for developers as well. Much effort is already being put into making this program easy to use for the average user. It just takes time!
  • Notice Any issue related to running the code has to be opened in the faceswap Forum!

For haters

Sorry, no time for that.

About github.com/deepfakes

What is this repo?

It is a community repository for active users.

Why this repo?

The joshua-wu repo seems not active. Simple bugs like missing http:// in front of urls have not been solved since days.

Why is it named 'deepfakes' if it is not /u/deepfakes?

  1. Because a typosquat would have happened sooner or later as project grows
  2. Because we wanted to recognize the original author
  3. Because it will better federate contributors and users

What if /u/deepfakes feels bad about that?

This is a friendly typosquat, and it is fully dedicated to the project. If /u/deepfakes wants to take over this repo/user and drive the project, he is welcomed to do so (Raise an issue, and he will be contacted on Reddit). Please do not send /u/deepfakes messages for help with the code you find here.

About machine learning

How does a computer know how to recognize/shape faces? How does machine learning work? What is a neural network?

It's complicated. Here's a good video that makes the process understandable: How Machines Learn

Here's a slightly more in depth video that tries to explain the basic functioning of a neural network: How Machines Learn

tl;dr: training data + trial and error

Comments

  • .local/lib/python3.8/site-packages/cv2/../../lib64': No such file or directory
    .local/lib/python3.8/site-packages/cv2/../../lib64': No such file or directory

    Dec 4, 2021

    Note: For general usage questions and help, please use either our FaceSwap Forum or FaceSwap Discord server. General usage questions are liable to be closed without response.

    Crash reports MUST be included when reporting bugs.

    Describe the bug Unable to extract faces from .mp4 file using default settings.

    To Reproduce Steps to reproduce the behavior:

    1. Install on Ubuntu 20.04 using the faceswap_setup_x64.sh script.
    2. Use pre-existing conda, and default folder & environment names (faceswap)
    3. Enable Nvidia. Using nvidia-driver-495.
    4. Attempt face extract from .mp4 file using S3Fd Detector, Fan Aligner- all default values.
    5. Error ls: cannot access '/home/suciokhan/.local/lib/python3.8/site-packages/cv2/../../lib64': No such file or directory

    Expected behavior Extraction of faces.

    Desktop (please complete the following information):

    • Ubuntu 20.04
    • Python 3.8
    • Conda Version 4.10.3
    • Commit ID --don't know how to check this

    Crash Report 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Found spec: ModuleSpec(name='keras', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f72eb7e8fa0>, origin='/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras/init.py', submodule_search_locations=['/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras']) 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Importing 'tf.keras' as keras for backend: 'nvidia' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Found spec: ModuleSpec(name='keras', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f72ebe05790>, origin='/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras/init.py', submodule_search_locations=['/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras']) 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Importing 'tf.keras' as keras for backend: 'nvidia' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Found spec: ModuleSpec(name='keras', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f72ebe05f70>, origin='/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras/init.py', submodule_search_locations=['/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras']) 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Importing 'tf.keras' as keras for backend: 'nvidia' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Found spec: ModuleSpec(name='keras', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f72ec94e670>, origin='/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras/init.py', submodule_search_locations=['/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras']) 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Importing 'tf.keras' as keras for backend: 'nvidia' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Found spec: ModuleSpec(name='keras', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f72ec94e790>, origin='/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras/init.py', submodule_search_locations=['/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras']) 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Importing 'tf.keras' as keras for backend: 'nvidia' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Found spec: ModuleSpec(name='keras', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f72ec94e760>, origin='/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras/init.py', submodule_search_locations=['/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras']) 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Importing 'tf.keras' as keras for backend: 'nvidia' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/faceswap/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python38.zip/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/lib-dynload/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/.local/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow_core/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Scanning: '/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2' for 'keras' 12/04/2021 16:32:13 MainProcess MainThread utils find_spec DEBUG Found spec: ModuleSpec(name='keras', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f72eb379fa0>, origin='/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras/init.py', submodule_search_locations=['/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras']) 12/04/2021 16:32:13 MainProcess MainThread launcher _test_for_tf_version DEBUG Installed Tensorflow Version: 2.6 12/04/2021 16:32:13 MainProcess MainThread queue_manager init DEBUG Initializing QueueManager 12/04/2021 16:32:13 MainProcess MainThread queue_manager init DEBUG Initialized QueueManager Traceback (most recent call last): File "/home/suciokhan/faceswap/lib/cli/launcher.py", line 180, in execute_script script = self._import_script() File "/home/suciokhan/faceswap/lib/cli/launcher.py", line 46, in _import_script module = import_module(mod) File "/home/suciokhan/anaconda3/envs/faceswap/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 843, in exec_module File "", line 219, in _call_with_frames_removed File "/home/suciokhan/faceswap/scripts/extract.py", line 10, in from lib.image import encode_image, generate_thumbnail, ImagesLoader, ImagesSaver File "/home/suciokhan/faceswap/lib/image.py", line 35, in class FfmpegReader(imageio.plugins.ffmpeg.FfmpegFormat.Reader): AttributeError: module 'imageio.plugins' has no attribute 'ffmpeg'

    ============ System Information ============ encoding: UTF-8 git_branch: master git_commits: 808e008 Bugfix -Weights freezing/loading for dfl-sae gpu_cuda: No global version found. Check Conda packages for Conda Cuda gpu_cudnn: No global version found. Check Conda packages for Conda cuDNN gpu_devices: GPU_0: NVIDIA GeForce RTX 2060 with Max-Q Design gpu_devices_active: GPU_0 gpu_driver: 470.86 gpu_vram: GPU_0: 5934MB os_machine: x86_64 os_platform: Linux-5.15.6-051506-generic-x86_64-with-glibc2.17 os_release: 5.15.6-051506-generic py_command: /home/suciokhan/faceswap/faceswap.py extract -i /home/suciokhan/faceswap/mp4s/bernie.mp4 -o /home/suciokhan/faceswap/face_pics/bernie -D mtcnn -A fan -nm hist -rf 1 -min 0 -l 0.4 -sz 512 -een 1 -si 0 -L INFO -gui py_conda_version: conda 4.10.3 py_implementation: CPython py_version: 3.8.12 py_virtual_env: True sys_cores: 16 sys_processor: x86_64 sys_ram: Total: 23518MB, Available: 20283MB, Used: 2808MB, Free: 11763MB

    =============== Pip Packages =============== absl-py==0.15.0 aiofiles==0.7.0 astunparse==1.6.3 autopep8==1.5.7 awscli==1.22.10 backports.zoneinfo==0.2.1 boto3==1.20.10 botocore==1.23.10 cachetools==4.2.4 certifi==2021.5.30 charset-normalizer==2.0.7 clang==5.0 cligj==0.7.2 cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work Deprecated==1.2.13 dill==0.3.4 docutils==0.15.2 eventlet==0.33.0 Faker==9.5.2 fastcluster==1.1.26 ffmpy==0.2.3 fiftyone==0.14.1 fiftyone-brain==0.7.1 fiftyone-db==0.3.0 fiftyone-desktop==0.19.0 Fiona==1.8.20 flatbuffers==1.12 gast==0.4.0 geopandas==0.9.0 glob2==0.7 google-auth==1.35.0 google-auth-oauthlib==0.4.6 google-pasta==0.2.0 grpcio==1.42.0 h11==0.12.0 h5py==3.1.0 httpcore==0.14.3 httpx==0.21.1 idna==2.10 imageio==2.11.1 imageio-ffmpeg @ file:///home/conda/feedstock_root/build_artifacts/imageio-ffmpeg_1629987409325/work importlib-metadata==4.8.2 influxdb==5.3.1 influxdb-client==1.23.0 ipywidgets==7.6.3 jmespath==0.10.0 joblib==1.1.0 jupyter-contrib-core==0.3.3 jupyter-contrib-nbextensions==0.5.1 jupyter-highlight-selected-word==0.2.0 jupyter-latex-envs==1.4.6 jupyter-nbextensions-configurator==0.4.1 jupyterlab-widgets==1.0.0 kaleido==0.2.1 keplergl==0.3.0 keras==2.6.0 Keras-Preprocessing==1.1.2 kiwisolver==1.3.1 Markdown==3.3.6 matplotlib @ file:///tmp/build/80754af9/matplotlib-base_1592846008246/work mkl-fft==1.3.0 mkl-random==1.1.1 mkl-service==2.3.0 mongoengine==0.20.0 motor==2.5.1 msgpack==1.0.2 munch==2.5.0 ndjson==0.3.1 numpy @ file:///tmp/build/80754af9/numpy_and_numpy_base_1603570489231/work nvidia-ml-py==11.495.46 oauthlib==3.1.1 olefile @ file:///Users/ktietz/demo/mc3/conda-bld/olefile_1629805411829/work opencv-python==4.5.4.60 opencv-python-headless==4.5.4.60 opt-einsum==3.3.0 patool==1.12 patsy==0.5.1 Pillow==8.4.0 plotly==4.14.3 plotly-express==0.4.1 pprintpp==0.4.0 protobuf==3.19.1 psutil @ file:///tmp/build/80754af9/psutil_1612298023621/work pyasn1==0.4.8 pyasn1-modules==0.2.8 pycodestyle==2.7.0 pyFFTW==0.12.0 pyfiglet==0.8.post1 pymongo==3.12.1 pyparsing==2.4.7 PyQt5==5.12 PyQt5-Qt5==5.15.2 PyQt5_sip==4.19.19 PyQtWebEngine==5.12 python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work python-dotenv==0.19.2 pytz-deprecation-shim==0.1.0.post0 PyWavelets==1.2.0 QSpectrumAnalyzer==2.1.0 Qt.py==1.3.3 requests==2.26.0 requests-oauthlib==1.3.0 rfc3986==1.5.0 roboflow==0.1.8 rsa==4.7.2 Rx==3.2.0 s3transfer==0.5.0 scikit-image==0.18.3 scikit-learn==1.0.1 Shapely==1.7.1 SimpleSoapy==1.5.1 SimpleSpectral==1.0.0 sip==4.19.13 six==1.15.0 soapy-power==1.6.1 sortedcontainers==2.4.0 SQLAlchemy==1.4.26 statsmodels==0.12.2 tabulate==0.8.9 tenacity==8.0.0 tensorboard==2.6.0 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.0 tensorflow-estimator==2.6.0 tensorflow-gpu==2.6.2 termcolor==1.1.0 text-unidecode==1.3 threadpoolctl==3.0.0 tifffile==2021.11.2 tornado @ file:///tmp/build/80754af9/tornado_1606942300299/work tqdm==4.61.2 traittypes==0.2.1 typing-extensions==3.7.4.3 tzdata==2021.5 tzlocal==4.1 universal-analytics-python3==1.1.1 urllib3==1.26.7 voxel51-eta==0.6.0 Werkzeug==2.0.2 wget==3.2 widgetsnbextension==3.5.1 wrapt==1.12.1 xmltodict==0.12.0 zipp==3.6.0

    ============== Conda Packages ==============

    packages in environment at /home/suciokhan/anaconda3/envs/faceswap:

    Name Version Build Channel

    _libgcc_mutex 0.1 main
    _openmp_mutex 4.5 1_gnu
    absl-py 0.15.0 pypi_0 pypi astunparse 1.6.3 pypi_0 pypi blas 1.0 mkl
    bzip2 1.0.8 h7b6447c_0
    c-ares 1.17.1 h27cfd23_0
    ca-certificates 2021.10.8 ha878542_0 conda-forge cachetools 4.2.4 pypi_0 pypi certifi 2021.10.8 py38h578d9bd_1 conda-forge clang 5.0 pypi_0 pypi cudatoolkit 11.2.2 he111cf0_8 conda-forge cudnn 8.1.0.77 h90431f1_0 conda-forge curl 7.78.0 h1ccaba5_0
    cycler 0.11.0 pyhd3eb1b0_0
    dbus 1.13.18 hb2f20db_0
    expat 2.4.1 h2531618_2
    fastcluster 1.1.26 py38hc5bc63f_2 conda-forge ffmpeg 4.3.2 hca11adc_0 conda-forge ffmpy 0.2.3 pypi_0 pypi flatbuffers 1.12 pypi_0 pypi fontconfig 2.13.1 h6c09931_0
    freetype 2.11.0 h70c0345_0
    gast 0.4.0 pypi_0 pypi gettext 0.21.0 hf68c758_0
    giflib 5.2.1 h7b6447c_0
    git 2.32.0 pl5262hc120c5b_1
    glib 2.69.1 h5202010_0
    gmp 6.2.1 h58526e2_0 conda-forge gnutls 3.6.13 h85f3911_1 conda-forge google-auth 1.35.0 pypi_0 pypi google-auth-oauthlib 0.4.6 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi grpcio 1.42.0 pypi_0 pypi gst-plugins-base 1.14.0 h8213a91_2
    gstreamer 1.14.0 h28cd5cc_2
    h5py 3.1.0 pypi_0 pypi icu 58.2 he6710b0_3
    imageio 2.9.0 pyhd3eb1b0_0
    imageio-ffmpeg 0.4.5 pyhd8ed1ab_0 conda-forge importlib-metadata 4.8.2 pypi_0 pypi intel-openmp 2021.4.0 h06a4308_3561
    jpeg 9d h7f8727e_0
    keras 2.6.0 pypi_0 pypi keras-preprocessing 1.1.2 pypi_0 pypi kiwisolver 1.3.1 py38h2531618_0
    krb5 1.19.2 hac12032_0
    lame 3.100 h7f98852_1001 conda-forge lcms2 2.12 h3be6417_0
    ld_impl_linux-64 2.35.1 h7274673_9
    libcurl 7.78.0 h0b77cf5_0
    libedit 3.1.20210910 h7f8727e_0
    libev 4.33 h7f8727e_1
    libffi 3.3 he6710b0_2
    libgcc-ng 9.3.0 h5101ec6_17
    libgomp 9.3.0 h5101ec6_17
    libiconv 1.15 h63c8f33_5
    libnghttp2 1.46.0 hce63b2e_0
    libpng 1.6.37 hbc83047_0
    libssh2 1.9.0 h1ba5d50_1
    libstdcxx-ng 9.3.0 hd4cf53a_17
    libtiff 4.2.0 h85742a9_0
    libuuid 1.0.3 h7f8727e_2
    libwebp 1.2.0 h89dd481_0
    libwebp-base 1.2.0 h27cfd23_0
    libxcb 1.14 h7b6447c_0
    libxml2 2.9.12 h03d6c58_0
    lz4-c 1.9.3 h295c915_1
    markdown 3.3.6 pypi_0 pypi matplotlib 3.2.2 0
    matplotlib-base 3.2.2 py38hef1b27d_0
    mkl 2020.2 256
    mkl-service 2.3.0 py38he904b0f_0
    mkl_fft 1.3.0 py38h54f3939_0
    mkl_random 1.1.1 py38h0573a6f_0
    ncurses 6.3 h7f8727e_2
    nettle 3.6 he412f7d_0 conda-forge numpy 1.19.2 py38h54aff64_0
    numpy-base 1.19.2 py38hfa32c7d_0
    nvidia-ml-py 11.495.46 pypi_0 pypi oauthlib 3.1.1 pypi_0 pypi olefile 0.46 pyhd3eb1b0_0
    openh264 2.1.1 h780b84a_0 conda-forge openssl 1.1.1l h7f8727e_0
    opt-einsum 3.3.0 pypi_0 pypi pcre 8.45 h295c915_0
    pcre2 10.35 h14c3975_1
    perl 5.26.2 h14c3975_0
    pillow 8.4.0 py38h5aabda8_0
    pip 21.2.4 py38h06a4308_0
    protobuf 3.19.1 pypi_0 pypi psutil 5.8.0 py38h27cfd23_1
    pyasn1-modules 0.2.8 pypi_0 pypi pyparsing 3.0.4 pyhd3eb1b0_0
    pyqt 5.9.2 py38h05f1152_4
    python 3.8.12 h12debd9_0
    python-dateutil 2.8.2 pyhd3eb1b0_0
    python_abi 3.8 2_cp38 conda-forge qt 5.9.7 h5867ecd_1
    readline 8.1 h27cfd23_0
    requests 2.26.0 pypi_0 pypi requests-oauthlib 1.3.0 pypi_0 pypi setuptools 58.0.4 py38h06a4308_0
    sip 4.19.13 py38he6710b0_0
    six 1.15.0 pypi_0 pypi sqlite 3.36.0 hc218d9a_0
    tensorboard 2.6.0 pypi_0 pypi tensorboard-data-server 0.6.1 pypi_0 pypi tensorboard-plugin-wit 1.8.0 pypi_0 pypi tensorflow-estimator 2.6.0 pypi_0 pypi tensorflow-gpu 2.6.2 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi tk 8.6.11 h1ccaba5_0
    tornado 6.1 py38h27cfd23_0
    tqdm 4.62.3 pyhd3eb1b0_1
    typing-extensions 3.7.4.3 pypi_0 pypi urllib3 1.26.7 pypi_0 pypi werkzeug 2.0.2 pypi_0 pypi wheel 0.37.0 pyhd3eb1b0_1
    wrapt 1.12.1 pypi_0 pypi x264 1!161.3030 h7f98852_1 conda-forge xz 5.2.5 h7b6447c_0
    zipp 3.6.0 pypi_0 pypi zlib 1.2.11 h7b6447c_3
    zstd 1.4.9 haebb681_0

    ================= Configs ================== --------- .faceswap --------- backend: nvidia

    --------- convert.ini ---------

    [scaling.sharpen] method: none amount: 150 radius: 0.3 threshold: 5.0

    [color.color_transfer] clip: True preserve_paper: True

    [color.manual_balance] colorspace: HSV balance_1: 0.0 balance_2: 0.0 balance_3: 0.0 contrast: 0.0 brightness: 0.0

    [color.match_hist] threshold: 99.0

    [mask.mask_blend] type: normalized kernel_size: 3 passes: 4 threshold: 4 erosion: 0.0

    [mask.box_blend] type: gaussian distance: 11.0 radius: 5.0 passes: 1

    [writer.opencv] format: png draw_transparent: False jpg_quality: 75 png_compress_level: 3

    [writer.ffmpeg] container: mp4 codec: libx264 crf: 23 preset: medium tune: none profile: auto level: auto skip_mux: False

    [writer.pillow] format: png draw_transparent: False optimize: False gif_interlace: True jpg_quality: 75 png_compress_level: 3 tif_compression: tiff_deflate

    [writer.gif] fps: 25 loop: 0 palettesize: 256 subrectangles: False

    --------- gui.ini ---------

    [global] fullscreen: False tab: extract options_panel_width: 30 console_panel_height: 20 icon_size: 14 font: default font_size: 9 autosave_last_session: prompt timeout: 120 auto_load_model_stats: True

    --------- extract.ini ---------

    [global] allow_growth: False

    [align.fan] batch-size: 12

    [mask.bisenet_fp] batch-size: 8 include_ears: False include_hair: False include_glasses: True

    [mask.vgg_obstructed] batch-size: 2

    [mask.vgg_clear] batch-size: 6

    [mask.unet_dfl] batch-size: 8

    [detect.cv2_dnn] confidence: 50

    [detect.mtcnn] minsize: 20 scalefactor: 0.709 batch-size: 8 threshold_1: 0.6 threshold_2: 0.7 threshold_3: 0.7

    [detect.s3fd] confidence: 70 batch-size: 4

    --------- train.ini ---------

    [global] centering: face coverage: 87.5 icnr_init: False conv_aware_init: False optimizer: adam learning_rate: 5e-05 epsilon_exponent: -7 reflect_padding: False allow_growth: False mixed_precision: False nan_protection: True convert_batchsize: 16

    [global.loss] loss_function: ssim mask_loss_function: mse l2_reg_term: 100 eye_multiplier: 3 mouth_multiplier: 2 penalized_mask_loss: True mask_type: extended mask_blur_kernel: 3 mask_threshold: 4 learn_mask: False

    [model.unbalanced] input_size: 128 lowmem: False clipnorm: True nodes: 1024 complexity_encoder: 128 complexity_decoder_a: 384 complexity_decoder_b: 512

    [model.villain] lowmem: False

    [model.original] lowmem: False

    [model.phaze_a] output_size: 128 shared_fc: none enable_gblock: True split_fc: True split_gblock: False split_decoders: False enc_architecture: fs_original enc_scaling: 40 enc_load_weights: True bottleneck_type: dense bottleneck_norm: none bottleneck_size: 1024 bottleneck_in_encoder: True fc_depth: 1 fc_min_filters: 1024 fc_max_filters: 1024 fc_dimensions: 4 fc_filter_slope: -0.5 fc_dropout: 0.0 fc_upsampler: upsample2d fc_upsamples: 1 fc_upsample_filters: 512 fc_gblock_depth: 3 fc_gblock_min_nodes: 512 fc_gblock_max_nodes: 512 fc_gblock_filter_slope: -0.5 fc_gblock_dropout: 0.0 dec_upscale_method: subpixel dec_norm: none dec_min_filters: 64 dec_max_filters: 512 dec_filter_slope: -0.45 dec_res_blocks: 1 dec_output_kernel: 5 dec_gaussian: True dec_skip_last_residual: True freeze_layers: keras_encoder load_layers: encoder fs_original_depth: 4 fs_original_min_filters: 128 fs_original_max_filters: 1024 mobilenet_width: 1.0 mobilenet_depth: 1 mobilenet_dropout: 0.001

    [model.realface] input_size: 64 output_size: 128 dense_nodes: 1536 complexity_encoder: 128 complexity_decoder: 512

    [model.dfaker] output_size: 128

    [model.dlight] features: best details: good output_size: 256

    [model.dfl_h128] lowmem: False

    [model.dfl_sae] input_size: 128 clipnorm: True architecture: df autoencoder_dims: 0 encoder_dims: 42 decoder_dims: 21 multiscale_decoder: False

    [trainer.original] preview_images: 14 zoom_amount: 5 rotation_range: 10 shift_range: 5 flip_chance: 50 color_lightness: 30 color_ab: 8 color_clahe_chance: 50 color_clahe_max_size: 4

    Reply
  • Please Support for Apple M1 pro/max
    Please Support for Apple M1 pro/max

    Dec 11, 2021

    As we know, Apple release New silicon named M1 pro/max.

    It has powerful GPUs and CPUs.

    Is there any chance to run FaceSwap on new Mac book pro?

    Reply
  • installer does not work with fresh python 3.9.x
    installer does not work with fresh python 3.9.x

    Dec 22, 2021

    Note: For general usage questions and help, please use either our FaceSwap Forum or FaceSwap Discord server. General usage questions are liable to be closed without response.

    Crash reports MUST be included when reporting bugs.

    Describe the bug

    installer does not work with fresh python 3.9.x

    To Reproduce

    1. install presh python
    2. start ./faceswap_setup_x64.sh
    3. answer questions
    4. See result

    Expected behavior installation must pass

    Screenshots

    INFO    Setting up Faceswap...
    INFO    Running without root/admin privileges
    INFO    The tool provides tips for installation
            and installs required python packages
    INFO    Setup in Linux 5.10.84-1-MANJARO
    INFO    Installed Python: 3.9.9 64bit
    ERROR   Please run this script with Python version 3.7 or 3.8 64bit and try again.
    INFO    Faceswap installation is complete!
    INFO    You can launch Faceswap from the icon on your desktop
    

    Desktop (please complete the following information):

    • OS: Linux
    • Python Version 3.9.9
    • Conda Version : even not reached
    • Commit ID : latest release

    Additional context Add any other context about the problem here.

    Crash Report The crash report generated in the root of your Faceswap folder

    Reply
  • faceswap graph crashes
    faceswap graph crashes

    Jan 1, 2022

    The training module of faceswap used to have a broken line statistical chart. Now I click the chart, and the program crashes and exits

    Reply
  • Crash on starting. Potential fix provided
    Crash on starting. Potential fix provided

    Jan 16, 2022

    Note: For general usage questions and help, please use either our FaceSwap Forum or FaceSwap Discord server. General usage questions are liable to be closed without response.

    Crash reports MUST be included when reporting bugs.

    Describe the bug Maybe the language setting for OS is prevent GUI from starting.

    To Reproduce Steps to reproduce the behaviour:

    1. Simplified Chinese as OS language(windows 10)
    2. run python3.8 faceswap.py gui

    Expected behaviour crashed

    Desktop (please complete the following information):

    • OS: win10
    • Python Version 3.8
    • Conda Version not using conda

    Additional context Fixed by changing stdout.decode() to stdout.decode("utf-8","ignore") on line 271 of faceswap/lib/gui/menu.py

    Crash Report

    Traceback (most recent call last): File "D:\deepswap\faceswap\lib\cli\launcher.py", line 181, in execute_script process = script(arguments) File "D:\deepswap\faceswap\scripts\gui.py", line 179, in init self.root = FaceswapGui(arguments.debug) File "D:\deepswap\faceswap\scripts\gui.py", line 34, in init self.build_gui() File "D:\deepswap\faceswap\scripts\gui.py", line 58, in build_gui self.configure(menu=MainMenuBar(self)) File "D:\deepswap\faceswap\lib\gui\menu.py", line 47, in init self.help_menu = HelpMenu(self) File "D:\deepswap\faceswap\lib\gui\menu.py", line 207, in init self.build() File "D:\deepswap\faceswap\lib\gui\menu.py", line 220, in build if self._build_branches_menu(): File "D:\deepswap\faceswap\lib\gui\menu.py", line 241, in _build_branches_menu stdout = self._get_branches() File "D:\deepswap\faceswap\lib\gui\menu.py", line 271, in _get_branches retcode, stdout.decode().strip().replace("\n", " - ")) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 6: invalid start byte

    Reply
  • After I install XQuartz, it can't detected screen on Mac Big Sur yet.
    After I install XQuartz, it can't detected screen on Mac Big Sur yet.

    Jan 17, 2022

    Note: For general usage questions and help, please use either our FaceSwap Forum or FaceSwap Discord server. General usage questions are liable to be closed without response.

    Describe the bug

    Firstly, I run python faceswap.py gui on Mac but it shows

    No display detected. GUI mode has been disabled. macOS users need to install XQuartz.

    Then I installed XQuartz-2.7.7.dmg, it still shown it couldn't detected the screen

    Desktop (please complete the following information):

    • OS: MacBook Pro Big Sur 11.1
    • Python Version: 3.7
    • Conda Version: 4.10.1
    • Commit ID: 183aee3

    Crash Report The crash report generated in the root of your Faceswap folder

    Reply
  • Misc updates on master before GAN. Added multithreading + mmod face detector
    Misc updates on master before GAN. Added multithreading + mmod face detector

    Feb 3, 2018

    In order to progress on GAN release, I'm pushing a couple of non GAN related changes.

    This release brings multithreading, like what @iSevenDays suggested in #62

    The code is mostly clean but could be improved, so feel free to test and give a feedback

    Reply
  • Landmarks not matching with CNN/MMOD detector
    Landmarks not matching with CNN/MMOD detector

    Feb 12, 2018

    From: https://github.com/deepfakes/faceswap-playground/issues/43

    Aligning faces does not work on some faces found with the cnn option. See below for the landmarks returned.

    Can someone tell where the problem come from?

    [Images Removed]

    Code to reproduce (put in plugins/Extract_Align.py):

        def extract(self, image, face, size):
            if face.landmarks == None:
                print("Warning! landmarks not found. Switching to crop!")
                return cv2.resize(face.image, (size, size))
    
            # Draws landmarks for debug
            for (x, y) in face.landmarksAsXY():
                cv2.circle(image, (x, y), 1, (0, 0, 255), -1)
    
            alignment = get_align_mat( face )
            return self.transform( image, alignment, size, 48 )
    
    bug help wanted 
    Reply
  • [DRAFT] GAN plugin
    [DRAFT] GAN plugin

    Jan 8, 2018

    This PR is specific to the GAN plugin that you can test and play with. Note that this is a Work in Progress and that latest features from the GAN repo are not totally integrated

    dev advuser feedback wanted 
    Reply
  • Original Model 128 worth it?
    Original Model 128 worth it?

    May 2, 2018

    I have created a rough version of Original Model with dimensions 128, 128, 3.

    Rationale:

    There seems to be increasing demand for HD face-swapping while none had any luck with GAN128 as far as I can tell from issue and the playground. In addition it could also cover more face area.

    Is releasing Original128 worth it? Still assessing the efficiency. I had to sacrifice some color data to keep up with memory / speed limitations but overally its not very visible (as opposed to GAN128 that discards original color data). Speed seems to be up to snuff. Trying one-to-many scenarios as well. No LowMem version probably will ever be created for that.

    Could also do Orig256 and Orig512 but definably won't fit in consumer GPU RAM. --cheers

    enhancement feature feedback wanted test needed 
    Reply
  • [Draft] Adding DFaker model plugin
    [Draft] Adding DFaker model plugin

    Mar 10, 2018

    Note: This is not working!

    I'm in the process of adding DFaker model as plugin. It behaves quite differently on some parts so it is still work in progress. Note that the image load is not plugged in, so this PR won't even launch. But if you are interested, have a look and propose some solution.

    I should be able to finish this in a couple of days if everything goes fine (extract and convert may be harder than i expect so I'm still not sure)

    work in progress 
    Reply
  • Update GAN64 to v2
    Update GAN64 to v2

    Feb 22, 2018

    Based from Clorr's fork after the GAN128 draft.

    The GAN64 model is still mostly based off shaoanlu's v1.

    The mask results I was getting were unusable; I'd have masks that were basically all transparent. I updated GAN64 to shaoanlu's v2.

    With these changes, my mask results are better. It could be that only I was having this problem so please test yourself!

    Reply