Mr DeepFakes Forums
  • New and improved dark forum theme!
  • Guests can now comment on videos on the tube.
   
dpfksInstalling Faceswap Python Scripts
#1
Installing Faceswap Python Scripts to Make DeepFakes

I recommend using the faceswap python scripts over FakeApp for better results. Getting started with it is only a bit trickier, but it will make a huge difference in quality, and time saved. This tutorial will get you started on a Windows OS, and is based off the package from deepfakes.club - where they have already preinstalled everything.

Prerequisites
  • This assumes you are using Windows 10 and have an Nvidia graphics card with at least 2GB of vRAM
  • Install CUDA 9.0 (please install this version only) - You are not allowed to view links. Register or Login to view. (install the base along with all updates)
  • Install cuDNN 7.0 (NOT 7.1) - You are not allowed to view links. Register or Login to view. (you will need to sign up and login to download)
  • Update your graphics card drivers - You are not allowed to view links. Register or Login to view.
Okay, that wasn't too hard right? Now lets move on.

Installing Faceswap Python Scripts
The easiest method to install this script is to use the preinstalled portable version created by deepfakes.club. This can be downloaded You are not allowed to view links. Register or Login to view.. That's it! Everything should be installed and functional.

Note: this portable package also includes dfaker, which is another Python script that can be used to make DeepFakes. Since there are limitations to that script, we do not recommend using it.

----------------------- 

Manually Installing Faceswap
If he above portable installer does not work for you, you can try to install everything manually. This is a bit more work.
  • Install Python 3.6 Anaconda from You are not allowed to view links. Register or Login to view. (this will install Python along with dev tools that are required)
  • Install Microsoft Visual Studio 2015 with SDK and C++ packages - You are not allowed to view links. Register or Login to view.
  • Install CMake - You are not allowed to view links. Register or Login to view.
  • Boost latest version - You are not allowed to view links. Register or Login to view.
  • GitHub for windows - You are not allowed to view links. Register or Login to view.
After installation open the Anaconda command prompt to start installing the dependencies required to run Faceswap

Installing Dependencies

First we need to create a virtual environment within conda. For simplicity, we will name it "myenv" and then activate the environment.


Code:
conda create -n myenv python=3.6 numpy pyyaml mkl
activate myenv

Now lets install dlib using the following command:

Code:
git clone https://github.com/davisking/dlib

This should have copied files into a folder named "dlib". Now we want to open that folder in the environment and compile dlib:


Code:
cd dlib
python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA

Now let's install the rest of the required packages:


Code:
pip install pathlib==1.0.1
pip install scandir==1.6
pip install h5py==2.7.1
pip install Keras==2.1.2
pip install opencv-python==3.3.0.10
pip install tensorflow-gpu==1.5.0
pip install scikit-image
pip install tqdm

Install Faceswap into the original directory:

Code:
cd /
git clone https://github.com/deepfakes/faceswap

Now you also have a folder named "faceswap" which is where the script is kept.

Still can't get it working? This video just came out with a slightly different variation for installing on windows:

#2
thanks for the guide. i wish i had a better computer to make my own Sad
#3
Sorry for my ignorance, but I don't know how to install:

Installing Faceswap Python Scripts

I've downloaded it but... How to install it?
#4
(05-22-2018, 07:25 AM)darkchacal23 Wrote: You are not allowed to view links. Register or Login to view.Sorry for my ignorance, but I don't know how to install:

Installing Faceswap Python Scripts

I've downloaded it but... How to install it?

Which one did you install? Let me know where you're stuck and I'll see if I can help
#5
I donwloaded and installed:

Prerequisites:
* This assumes you are using Windows 10 and have an Nvidia graphics card with at least 2GB of vRAM
* Install CUDA 9.0 (please install this version only) - DOWNLOAD HERE (install the base along with all updates)
* Install cuDNN 7.0 (NOT 7.1) - DOWNLOAD HERE (you will need to sign up and login to download)
* Update your graphics card drivers - DOWNLOAD HERE

I donwloaded but I don't know how to install / use:
Installing Faceswap Python Scripts

But at this moment I donwload fakeApp 2.2.0 and seems that it's working
#6
Ah yes, the new FakeApp is easiest to use. Only think is that it watermarks all the videos =P Hope to see some of your work soon!
#7
Hi again,

If you can explain me how to use that python scripts, or a link for a guide like You are not allowed to view links. Register or Login to view..

Then I'll don't use FakeApp, but I don't know hot to use this python scripts.

One question that I have, it's that FakeApp train to change A to B and B to A at the same time, and if we only go to change A to B, Is not this a waste of time and resources?

Best regards.
#8
The FakeApp I believe trains both A to B and B to A, but the python stand alone scripts ALSO does this. I believe it needs to do this to build a proper model and get better results, even though we are only converting in one direction.

The page you linked gave pretty good directions for FakeApp. I would suggest using that first to play around with the app, and if you don't like the results you can move onto python scripts.
#9
The python faceswap scripts *finally* have an extensive step by step guide for setup on Windows (The original instructions here are a little outdated). Tried myself and works perfectly:
You are not allowed to view links. Register or Login to view.
#10
I follow the instructions from the REPO (You are not allowed to view links. Register or Login to view.) but i'm getting a error when try to EXRACT:


Code:
Loading...
12/20/2018 01:41:59 INFO Log level set to: INFO
12/20/2018 01:42:01 INFO Output Directory: C:\Users\ZeroCool22\Miniconda3\envs\faceswap\output
12/20/2018 01:42:01 INFO Input Directory: C:\Users\ZeroCool22\Miniconda3\envs\faceswap\input
12/20/2018 01:42:01 INFO Loading Detect from Mtcnn plugin...
12/20/2018 01:42:01 INFO Loading Align from Fan plugin...
12/20/2018 01:42:01 INFO NB: Parallel processing disabled.You may get faster extraction speeds by enabling it with the -mp switch
12/20/2018 01:42:01 INFO Starting, this may take a while...
12/20/2018 01:42:01 INFO Initializing MTCNN Detector...
12/20/2018 01:42:02 ERROR Caught exception in child process: 7588
12/20/2018 01:43:01 INFO Waiting for Detector... Time out in 4 minutes
12/20/2018 01:44:01 INFO Waiting for Detector... Time out in 3 minutes
12/20/2018 01:45:01 INFO Waiting for Detector... Time out in 2 minutes
12/20/2018 01:46:01 INFO Waiting for Detector... Time out in 1 minutes
12/20/2018 01:47:03 ERROR Got Exception on main handler:
Traceback (most recent call last):
File "C:\Users\ZeroCool22\Miniconda3\envs\faceswap\lib\cli.py", line 90, in execute_script
process.process()
File "C:\Users\ZeroCool22\Miniconda3\envs\faceswap\scripts\extract.py", line 51, in process
self.run_extraction(save_thread)
File "C:\Users\ZeroCool22\Miniconda3\envs\faceswap\scripts\extract.py", line 149, in run_extraction
self.run_detection(to_process)
File "C:\Users\ZeroCool22\Miniconda3\envs\faceswap\scripts\extract.py", line 202, in run_detection
self.plugins.launch_detector()
File "C:\Users\ZeroCool22\Miniconda3\envs\faceswap\scripts\extract.py", line 386, in launch_detector
raise ValueError("Error initializing Detector")
ValueError: Error initializing Detector
12/20/2018 01:47:03 CRITICAL An unexpected crash has occurred. Crash report written to C:\Users\ZeroCool22\Miniconda3\envs\faceswap\crash_report.2018.12.20.014701426414.log. Please verify you are running the latest version of faceswap before reporting
Process exited.

I'm using the GUI:
[Image: GUI-error-2.png]

Crash Report: You are not allowed to view links. Register or Login to view.

Forum Jump:

Users browsing this thread: 1 Guest(s)